wired up 'active' anim on host building for Rearm activity

This commit is contained in:
Chris Forbes
2009-12-31 13:27:43 +13:00
parent 52dea029d6
commit 21fc37e27e
2 changed files with 16 additions and 1 deletions

View File

@@ -56,6 +56,12 @@ namespace OpenRa.Game.Traits
return self.GetDamageState() == DamageState.Half ? "damaged-" : "";
}
public void PlayCustomAnim(Actor self, string name)
{
anim.PlayThen(GetPrefix(self) + name,
() => anim.PlayRepeating(GetPrefix(self) + "idle"));
}
public virtual void Damaged(Actor self, AttackInfo e)
{
if (!e.DamageStateChanged)