public void Remove(Building building) { if (building.hasAuthority && building.playerId == playerId) { FriendlyBuildings.Remove(building); } else { EnemyBuildings.Remove(building); } }
void OnEnemyDied(System.Object obj) { IGameEntity g = ((GameObject)obj).GetComponent <IGameEntity>(); if (g.info.isUnit) { EnemyUnits.Remove((Unit)g); missionStatus.OnUnitKilled(((Unit)g).type); } else if (g.info.isBuilding) { EnemyBuildings.Remove(g); missionStatus.OnBuildingDestroyed(g.getType <Storage.BuildingTypes>()); } }