Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
 public void Start()
 {
     this.PearlCount   = PlayerPrefHelper.LoadInt(PlayerPrefHelper.PEARL_COUNT);
     this.OxygenAmount = PlayerPrefHelper.LoadFloat(PlayerPrefHelper.OXYGEN_AMOUNT, 30);
     CheckDepth();
 }