Exemplo n.º 1
0
    private void UpdateBankBalance()
    {
        var bankBalance = GamerPrefs.GetMoney();

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

        money += 1;
        GamerPrefs.SetMoney(money);
        this.money.text = GamerPrefs.GetMoney().ToString();
    }
Exemplo n.º 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();
    }
Exemplo n.º 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();
    }
Exemplo n.º 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();
    }