示例#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);
 }