more ported bits

This commit is contained in:
Chris Forbes
2010-01-10 19:11:58 +13:00
parent e7f9023aca
commit 8e944871fa
11 changed files with 51 additions and 21 deletions

View File

@@ -15,7 +15,8 @@ namespace OpenRa.Game.Effects
public Corpse(Actor fromActor, int death)
{
anim = new Animation(fromActor.LegacyInfo.Image ?? fromActor.LegacyInfo.Name);
var info = fromActor.Info.Traits.WithInterface<RenderSimpleInfo>().First();
anim = new Animation(info.Image ?? fromActor.Info.Name);
anim.PlayThen("die{0}".F(death + 1),
() => Game.world.AddFrameEndTask(w => w.Remove(this)));