Ejemplo n.º 1
0
    public void UpgradeMaxLife()
    {
        var canUpgradeLife = maxLife >= MaxLifeCap || balance < maxLifeUpgrCost;

        if (canUpgradeLife)
        {
            return;
        }
        balance -= maxLifeUpgrCost;
        maxLife += 1;
        GamerPrefs.SetMaxLife(maxLife);
        GamerPrefs.SetMoney(balance);
        HandleOkaneBalance();
        HandleMaxLife();
    }
Ejemplo n.º 2
0
 public void UpgradeMaxLife()
 {
     if (!(maxLife >= Max_Life_Cap))
     {
         if (balance >= maxLifeUpgrCost)
         {
             balance -= maxLifeUpgrCost;
             maxLife += 1;
             GamerPrefs.SetMaxLife(maxLife);
             GamerPrefs.SetOkane(balance);
             HandleOkaneBalance();
             HandleMaxLife();
         }
     }
 }