예제 #1
0
 public void OnBuild(GameObject building, Building.BuildingType buildingtype)
 {
     Debug.Log(buildingtype.ToString());
     if (buildingtype == Building.BuildingType.House)
     {
         House house = building.GetComponent <House>();
         MaxPopulation += house.Room;
         es.MaxEnemies++;
         buildings.Add(house);
         HouseNumber++;
     }
     if (buildingtype == Building.BuildingType.Post)
     {
         Debug.Log("WTF4");
         Towers.Add(building);
     }
     if (buildingtype == Building.BuildingType.TownCenter)
     {
         TownCenter = building;
     }
     if (buildingtype == Building.BuildingType.ResourceStorage)
     {
         buildings.Add(building.GetComponent <StorageArea>());
     }
 }
예제 #2
0
 public override string ToString()
 {
     return($"Type : {type.ToString()}, Position {position}, Level : {level}, CurrentActiveAmount : {currentActiveAmount}, Constructing Status : {constructionStatus.isConstructing} " +
            $" Current active amount : {CurrentActiveAmount}/{maxActiveAmount}, Represent GO : {representGameObject.name}");
 }