revamp of damage notifs; added Explodes

This commit is contained in:
Chris Forbes
2009-12-19 10:42:35 +13:00
parent 10431a5038
commit 07b5b4c164
16 changed files with 128 additions and 60 deletions

View File

@@ -21,13 +21,8 @@ namespace OpenRa.Game
public void AddFrameEndTask( Action<World> a ) { frameEndActions.Add( a ); }
public event Action<Actor> ActorAdded = _ => { };
public event Action<Actor> ActorRemoved = a =>
{
a.Health = 0; /* make sure everyone sees it as dead */
foreach (var nr in a.traits.WithInterface<INotifyDamage>())
nr.Damaged(a, DamageState.Dead);
};
public event Action<Actor> ActorRemoved = _ => { };
public void Tick()
{
foreach (var a in actors) a.Tick();