public void Refresh(bool showApplicantList = false) { if (!SelectedBuilding) { Disable(); return; } Enable(); label.text = string.Format("Manage Building | {0}", SelectedBuilding.Value.ToDisplay()); if (SelectedBuilding.State == BuildingState.Owned || SelectedBuilding.State == BuildingState.Renovating) { buyButton.gameObject.SetActive(false); sellButton.gameObject.SetActive(true); if (SelectedBuilding.HasRenovated) { renovateButton.gameObject.SetActive(false); } else { renovateButton.gameObject.SetActive(true); renovateText.text = string.Format("Renovate ${0}", SelectedBuilding.RenovationCost.ToDisplay()); renovateButton.GetComponent <Button>() .interactable = SelectedBuilding.CanRenovate; } rentInput.text = SelectedBuilding.PerRoomRent.ToString(); tenantList.Refresh(); applicantList.Refresh(); if (showApplicantList) { tenantList.gameObject.SetActive(false); applicantList.gameObject.SetActive(true); } else { tenantList.gameObject.SetActive(true); applicantList.gameObject.SetActive(false); } } if (SelectedBuilding.State == BuildingState.Renovating) { sellButton.gameObject.SetActive(false); renovateButton.gameObject.SetActive(true); renovateText.text = "Renovating"; renovateButton.GetComponent <Button>().interactable = false; rent.gameObject.SetActive(false); tabs.gameObject.SetActive(false); tenantList.gameObject.SetActive(false); applicantList.gameObject.SetActive(false); } if (SelectedBuilding.State == BuildingState.NotForSale || SelectedBuilding.State == BuildingState.ForSale) { sellButton.gameObject.SetActive(false); renovateButton.gameObject.SetActive(false); tabs.gameObject.SetActive(false); rent.gameObject.SetActive(false); tenantList.gameObject.SetActive(false); applicantList.gameObject.SetActive(false); } if (SelectedBuilding.State == BuildingState.ForSale) { buyButton.gameObject.SetActive(true); buyButton.GetComponent <Button>() .interactable = player.Wealth >= SelectedBuilding.Value; } }