Ejemplo n.º 1
0
    private void UpdateBankBalance()
    {
        int bankBalance = GamerPrefs.GetOkane();

        bankBalance += okane;
        GamerPrefs.SetOkane(bankBalance);
    }
Ejemplo n.º 2
0
    public void AddMoney()
    {
        int money = GamerPrefs.GetOkane();

        money += 1;
        GamerPrefs.SetOkane(money);
        this.money.text = GamerPrefs.GetOkane().ToString();
    }
Ejemplo n.º 3
0
 public void UpgradeShield()
 {
     if (!(shieldDuration >= Shield_Duration_Cap))
     {
         if (balance >= shildDurationUpgrCost)
         {
             balance        -= shildDurationUpgrCost;
             shieldDuration += 2;
             GamerPrefs.SetShieldDuration(shieldDuration);
             GamerPrefs.SetOkane(balance);
             HandleOkaneBalance();
             HandleShield();
         }
     }
 }
Ejemplo n.º 4
0
 public void UpgradeMaxLife()
 {
     if (!(maxLife >= Max_Life_Cap))
     {
         if (balance >= maxLifeUpgrCost)
         {
             balance -= maxLifeUpgrCost;
             maxLife += 1;
             GamerPrefs.SetMaxLife(maxLife);
             GamerPrefs.SetOkane(balance);
             HandleOkaneBalance();
             HandleMaxLife();
         }
     }
 }
Ejemplo n.º 5
0
 public void UpgradeTimeSlow()
 {
     if (!(timeSlow >= Time_Slow_Cap))
     {
         if (balance >= timeSlowUpgrCost)
         {
             balance  -= timeSlowUpgrCost;
             timeSlow += 2;
             GamerPrefs.SetSlowTimeDuration(timeSlow);
             GamerPrefs.SetOkane(balance);
             HandleOkaneBalance();
             HandleTimeSlow();
         }
     }
 }