예제 #1
0
파일: city.cs 프로젝트: Calthum/pre-alpha
 public void checkForFinishedBuilding(unitLib uLib)
 {
     if (productionProgress >= buildingInProgress.prodCost)
     {
         if (buildingInProgress.name == "Scout")
         {
             uLib.CreateNewUnit(infoLibrary.Scout("max", 0), tileLibrary.FindIndex_AtTile(tileLibrary.FindTile_AtCityID(cityID)), tileLibrary);
             buildingInProgress = null;
         }
         else if (buildingInProgress.name == "Warrior")
         {
             uLib.CreateNewUnit(infoLibrary.Warrior("max", 0), tileLibrary.FindIndex_AtTile(tileLibrary.FindTile_AtCityID(cityID)), tileLibrary);
             buildingInProgress = null;
         }
         else
         {
             buildingList.Add(buildingInProgress);
             buildingInProgress = null;
         }
     }
 }
예제 #2
0
파일: city.cs 프로젝트: Calthum/pre-alpha
 public void AddBuilding(building building)
 {
     buildingList.Add(building);
 }