Ejemplo n.º 1
0
 public void PurchaseItem()
 {
     if (CDataController.GetInstance().GetGold() >= currentCost)
     {
         isPurchased = true;
         CDataController.GetInstance().SubGold(currentCost);
         level++;
     }
 }
Ejemplo n.º 2
0
    public void PurchaseUpgrade()
    {
        if (CDataController.GetInstance().GetGold() >= currentCost)
        {
            CDataController.GetInstance().SubGold(currentCost);
            level++;
            CDataController.GetInstance().AddGoldPerClick(goldByUpgrade);

            UpdateUpgrade();
            UpdateUI();
            CDataController.GetInstance().SaveUpgradeButton(this);
        }
    }
Ejemplo n.º 3
0
 void Start()
 {
     CDataController.GetInstance().LoadUpgradeButton(this);
     UpdateUI();
 }