private void UpdateBankBalance() { var bankBalance = GamerPrefs.GetMoney(); bankBalance += okane; GamerPrefs.SetMoney(bankBalance); }
public void AddMoney() { int money = GamerPrefs.GetMoney(); money += 1; GamerPrefs.SetMoney(money); this.money.text = GamerPrefs.GetMoney().ToString(); }
public void UpgradeShield() { var canUpgradeShield = shieldDuration >= ShieldDurationCap || balance < shildDurationUpgrCost; if (canUpgradeShield) { return; } balance -= shildDurationUpgrCost; shieldDuration += 2; GamerPrefs.SetShieldDuration(shieldDuration); GamerPrefs.SetMoney(balance); HandleOkaneBalance(); HandleShield(); }
public void UpgradeMaxLife() { var canUpgradeLife = maxLife >= MaxLifeCap || balance < maxLifeUpgrCost; if (canUpgradeLife) { return; } balance -= maxLifeUpgrCost; maxLife += 1; GamerPrefs.SetMaxLife(maxLife); GamerPrefs.SetMoney(balance); HandleOkaneBalance(); HandleMaxLife(); }
public void UpgradeTimeSlow() { var canUpgradeSlowTime = timeSlow >= TimeSlowCap || balance < timeSlowUpgrCost; if (canUpgradeSlowTime) { return; } balance -= timeSlowUpgrCost; timeSlow += 2; GamerPrefs.SetSlowTimeDuration(timeSlow); GamerPrefs.SetMoney(balance); HandleOkaneBalance(); HandleTimeSlow(); }