private void UpdateBankBalance()
    {
        var bankBalance = GamerPrefs.GetMoney();

        bankBalance += okane;
        GamerPrefs.SetMoney(bankBalance);
    }
Exemple #2
0
    public void AddMoney()
    {
        int money = GamerPrefs.GetMoney();

        money += 1;
        GamerPrefs.SetMoney(money);
        this.money.text = GamerPrefs.GetMoney().ToString();
    }
Exemple #3
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();
    }
Exemple #4
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();
    }
Exemple #5
0
    public void UpgradeTimeSlow()
    {
        var canUpgradeSlowTime = timeSlow >= TimeSlowCap || balance < timeSlowUpgrCost;

        if (canUpgradeSlowTime)
        {
            return;
        }
        balance  -= timeSlowUpgrCost;
        timeSlow += 2;
        GamerPrefs.SetSlowTimeDuration(timeSlow);
        GamerPrefs.SetMoney(balance);
        HandleOkaneBalance();
        HandleTimeSlow();
    }