wtf.
This commit is contained in:
@@ -10,17 +10,12 @@ namespace OpenRa.Game.Effects
|
||||
{
|
||||
readonly int2 pos;
|
||||
readonly Animation anim = new Animation("smokey");
|
||||
bool removed;
|
||||
|
||||
public Smoke(int2 pos)
|
||||
{
|
||||
this.pos = pos;
|
||||
anim.PlayThen("idle",
|
||||
() =>
|
||||
{
|
||||
removed = true;
|
||||
Game.world.AddFrameEndTask(w => w.Remove(this));
|
||||
});
|
||||
() => Game.world.AddFrameEndTask(w => w.Remove(this)));
|
||||
}
|
||||
|
||||
public void Tick()
|
||||
@@ -30,8 +25,7 @@ namespace OpenRa.Game.Effects
|
||||
|
||||
public IEnumerable<Tuple<Sprite, float2, int>> Render()
|
||||
{
|
||||
if (!removed)
|
||||
yield return Tuple.New(anim.Image, pos.ToFloat2() - .5f * anim.Image.size, 0);
|
||||
yield return Tuple.New(anim.Image, pos.ToFloat2() - .5f * anim.Image.size, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user