public void RefreshUI() { m_CashText.text = CashUtility.FormatToString(m_PlayerCash); double newBuyCost = m_MineShaftManager.GetNewBuyCost(); m_MineShaftCostText.text = "New Shaft\n" + CashUtility.FormatToString(newBuyCost); m_NewMineRect.GetComponent <Button>().interactable = (m_PlayerCash >= newBuyCost && m_NewMineRect != null); m_BuildingInfoController.RefreshInfo(); }
public void RefreshInfo() { if (m_InfoPanel.activeInHierarchy) { CheckCash(); m_HeadText.text = m_TargetBuilding.GetInfotext(); m_CostText.text = CashUtility.FormatToString(m_TargetBuilding.GetUpgradeCost(m_CurUpgradeAmount)); RefreshDetails(m_TargetBuilding); RefreshSliders(); } }
private IEnumerator Deposit() { double duration = GetWalkingTime(); while (duration > 0.0) { duration -= Time.deltaTime; yield return(null); } m_CashDeposit += m_TransportedCash; m_TransportedCash = 0.0; m_DepositText.text = CashUtility.FormatToString(m_CashDeposit); m_MinerButton.interactable = !m_MinerButton.interactable; yield return(null); }
public void RetrieveFromDeposit(double amount) { m_CashDeposit -= amount; m_DepositText.text = CashUtility.FormatToString(m_CashDeposit); }
public void AddToDeposit(double amount) { m_CashDeposit += amount; m_DepositText.text = CashUtility.FormatToString(m_CashDeposit); }
private void SetPredictText(double predict) { m_PredictText.text = "+" + CashUtility.FormatToString(predict); }
private void SetValueText(double value, string extra = "") { m_ValueText.text = CashUtility.FormatToString(value) + extra; }