예제 #1
0
    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();
     }
 }
예제 #3
0
    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);
    }
예제 #4
0
 public void RetrieveFromDeposit(double amount)
 {
     m_CashDeposit     -= amount;
     m_DepositText.text = CashUtility.FormatToString(m_CashDeposit);
 }
예제 #5
0
 public void AddToDeposit(double amount)
 {
     m_CashDeposit     += amount;
     m_DepositText.text = CashUtility.FormatToString(m_CashDeposit);
 }
예제 #6
0
 private void SetPredictText(double predict)
 {
     m_PredictText.text = "+" + CashUtility.FormatToString(predict);
 }
예제 #7
0
 private void SetValueText(double value, string extra = "")
 {
     m_ValueText.text = CashUtility.FormatToString(value) + extra;
 }