public void SetInitialData(string cityName, Province provinceOwner, Player playerOwner, float foodBonus, float productionBonus, int foodLvl, int prodLvl, float currentFood, float currentProd, int citizens) { cityData.cityName = cityName; cityData.provinceOwner = provinceOwner; cityData.playerOwner = playerOwner; cityData.foodBonus = foodBonus; cityData.productionBonus = productionBonus; cityData.citizens = citizens; cityData.currentFood = currentFood; cityData.currentProd = currentProd; cityData.infraData.foodLvl = foodLvl; cityData.infraData.prodLvl = prodLvl; cityData.CalculateAddResources(); }
public void ShowCityData(CityData cityData) { cityNameText.text = cityData.cityName; if (cityData.playerOwner == GlobalData.currentPlayer) { cityData.CalculateAddResources(); cityFoodValue.text = String.Format("{0}({1}{2})", cityData.currentFood, Sign(Mathf.Sign(cityData.surplusesFood)), cityData.surplusesFood); cityProdValue.text = String.Format("{0}({1}{2})", cityData.currentProd, Sign(Mathf.Sign(cityData.surplusesProd)), cityData.surplusesProd); cityCitizensValue.text = "" + cityData.citizens; } else { cityFoodValue.text = "???"; cityProdValue.text = "???"; cityCitizensValue.text = "???"; } }