Exemplo n.º 1
0
    public void Upgrade(placementPanel panel, TurretUpgrade tu)
    {
        //Set the reference for the panel asking to upgrade
        UpgradeGUI.GetComponent<GUIRef>().GUIReference = panel;
        upgradeCostGUIText.text = "$" + tu.CostOfUpgrade().ToString();

        if (GM.GetCash() >= tu.CostOfUpgrade())
        {
            if (tu.CostOfUpgrade() == 0)
            {
                textTitle.text = "This turret is Max Level";
                upgradeCostGUIText.text = "";
                upgradeGUIConfirmButton.interactable = false;
            }
            else
            {
                textTitle.text = textTitleInitialValue;
                upgradeGUIConfirmButton.interactable = true;
            }
        }
        else
        {
            upgradeGUIConfirmButton.interactable = false;
        }

        DisableButtons();
        UpgradeGUI.SetActive(true);
    }
Exemplo n.º 2
0
 public void Confirm()
 {
     GUIReference.ConfirmUpgrade();
     GUIReference = null;
     upgradeCluster.SetActive(false);
 }