public void OnCollectible() { AudioManager.Instance.PlaySFX(SFXList.Collectible); var pearlCount = PlayerPrefHelper.LoadInt(PlayerPrefHelper.PEARL_COUNT); this.PearlCount = pearlCount + 1; PlayerPrefHelper.SaveInt(PlayerPrefHelper.PEARL_COUNT, this.PearlCount); }
public void OnRadarUpgradeButton() { var pearlCount = PlayerPrefHelper.LoadInt(PlayerPrefHelper.PEARL_COUNT); this.PearlCount = pearlCount - 10; PlayerPrefHelper.SaveInt(PlayerPrefHelper.PEARL_COUNT, this.PearlCount); PlayerPrefHelper.SaveBool(PlayerPrefHelper.UPGRADE_RADAR, 1); uiAnimator.UpdateMainText(); }
public void OnOxygenUpgradeButton() { var pearlCount = PlayerPrefHelper.LoadInt(PlayerPrefHelper.PEARL_COUNT); this.PearlCount = pearlCount - 2; PlayerPrefHelper.SaveInt(PlayerPrefHelper.PEARL_COUNT, this.PearlCount); this.OxygenAmount = PlayerPrefHelper.LoadFloat(PlayerPrefHelper.OXYGEN_AMOUNT, 30); PlayerPrefHelper.SaveFloat(PlayerPrefHelper.OXYGEN_AMOUNT, this.OxygenAmount + 30); uiAnimator.UpdateMainText(); }