public void ShowConsumption(CivilBuilding building, ResourceConsumption consumption) { var extraAmount = building.GetCurrentExtraInhabitantsForResource(consumption.ResourceToConsume); this.m_currentExtraPesantsAmount.text = $"{extraAmount:+#;-#;0}/+{consumption.ExtraInhibitants}"; this.m_resourceIcon.sprite = consumption.ResourceToConsume.Icon; }
public void ShowCivilBuildingUI(CivilBuilding toShow) { this.m_productionBuildingUI.Hide(); this.m_wellUI.Hide(); this.m_streetUI.Hide(); this.m_civilBuildingUI.Show(toShow); }
public void Show(CivilBuilding building) { this.gameObject.SetActive(true); this.m_buildingToDisplay = building; this.m_buildingToDisplay.Data.Resource.ResourceController.ResourceValueChanged += this.PeasantsAmountChanged; if (this.m_currentShowRoutine != null) { this.StopCoroutine(this.m_currentShowRoutine); } this.UpdateInfo(); }
public void Show(CivilBuilding building, ResourceConsumption consumption) { this.m_resourceIcon.sprite = consumption.ResourceToConsume.Icon; this.m_consumptionPerMinute.text = $"{building.CurrentInhabitants * consumption.ConsumptionPerMinute}/min"; }