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; } } }
public void AddBuilding(building building) { buildingList.Add(building); }