Esempio n. 1
0
 public void Remove(Building building)
 {
     if (building.hasAuthority && building.playerId == playerId)
     {
         FriendlyBuildings.Remove(building);
     }
     else
     {
         EnemyBuildings.Remove(building);
     }
 }
Esempio n. 2
0
        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>());
            }
        }