public GUIGroup RemoveUnit(PlayerUnit p) { GUIGroup ret = new GUIGroup(); ret.AddUnit(p); this.Units.RemoveAll(delegate(PlayerUnit p1) { return(p1.Info.GroupId == p.Info.GroupId); }); return(ret); }
public GUIGroup RemoveUnit(Enemy e) { GUIGroup ret = new GUIGroup(); ret.AddUnit(e); this.EnemyUnits.Remove(e); if (this.EnemyUnits.Count == 0) { GameManager.Instance.GUIManager.RemoveGroup(this); } return(ret); }