bib is removed from smudge on building death

This commit is contained in:
Chris Forbes
2009-10-29 22:31:41 +13:00
parent db7b653daf
commit 7a5d75c393
3 changed files with 24 additions and 5 deletions

View File

@@ -1,7 +1,8 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using OpenRa.Game.Graphics;
using OpenRa.Game.Graphics;
using OpenRa.Game.Traits;
namespace OpenRa.Game
{
@@ -21,8 +22,13 @@ 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 */
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<INotifyRemoved>())
nr.Removed(a);
};
public void ResetTimer()
{