Ejemplo n.º 1
0
    public void UpgradeShield()
    {
        var canUpgradeShield = shieldDuration >= ShieldDurationCap || balance < shildDurationUpgrCost;

        if (canUpgradeShield)
        {
            return;
        }
        balance        -= shildDurationUpgrCost;
        shieldDuration += 2;
        GamerPrefs.SetShieldDuration(shieldDuration);
        GamerPrefs.SetMoney(balance);
        HandleOkaneBalance();
        HandleShield();
    }
Ejemplo n.º 2
0
 public void UpgradeShield()
 {
     if (!(shieldDuration >= Shield_Duration_Cap))
     {
         if (balance >= shildDurationUpgrCost)
         {
             balance        -= shildDurationUpgrCost;
             shieldDuration += 2;
             GamerPrefs.SetShieldDuration(shieldDuration);
             GamerPrefs.SetOkane(balance);
             HandleOkaneBalance();
             HandleShield();
         }
     }
 }