cargo: support for actors being removed from the world, but not dying

This commit is contained in:
Chris Forbes
2010-01-05 12:47:20 +13:00
parent 52f99cb055
commit e74bcba694
3 changed files with 7 additions and 2 deletions

View File

@@ -11,7 +11,10 @@ namespace OpenRa.Game
List<Action<World>> frameEndActions = new List<Action<World>>();
public void Add(Actor a) { actors.Add(a); ActorAdded(a); }
public void Remove(Actor a) { actors.Remove(a); ActorRemoved(a); }
public void Remove(Actor a)
{
a.IsInWorld = false; actors.Remove(a); ActorRemoved(a);
}
public void Add(IEffect b) { effects.Add(b); }
public void Remove(IEffect b) { effects.Remove(b); }