Change animations to use the proper SequenceProvider
Remove references to the global "Game" and use the SequenceProvider of the current world/map.
This commit is contained in:
@@ -17,13 +17,15 @@ namespace OpenRA.Mods.RA.Effects
|
||||
class CrateEffect : IEffect
|
||||
{
|
||||
readonly string palette;
|
||||
Actor a;
|
||||
Animation anim = new Animation("crate-effects");
|
||||
readonly Actor a;
|
||||
readonly Animation anim;
|
||||
|
||||
public CrateEffect(Actor a, string seq, string palette)
|
||||
{
|
||||
this.a = a;
|
||||
this.palette = palette;
|
||||
|
||||
anim = new Animation(a.World, "crate-effects");
|
||||
anim.PlayThen(seq, () => a.World.AddFrameEndTask(w => w.Remove(this)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user