explosions are more or less correct now

This commit is contained in:
Chris Forbes
2009-10-29 22:04:04 +13:00
parent 9d543db7fc
commit 066ce1a203
8 changed files with 47 additions and 25 deletions

View File

@@ -13,13 +13,15 @@ namespace OpenRa.Game
Animation anim;
int2 pos;
public Explosion(int2 pixelPos)
public Explosion(int2 pixelPos, int style)
{
this.pos = pixelPos;
anim = new Animation("veh-hit3");
anim.PlayThen("idle", () => Game.world.AddFrameEndTask(w => w.Remove(this)));
Game.PlaySound("kaboom25.aud", false);
anim = new Animation("explosion");
if (style != 0)
anim.PlayThen(style.ToString(), () => Game.world.AddFrameEndTask(w => w.Remove(this)));
else
Game.world.AddFrameEndTask(w => w.Remove(this));
}
public void Tick() { anim.Tick(); }