コード例 #1
0
        private void CheckDepth()
        {
            float v       = PlayerPrefHelper.LoadFloat(PlayerPrefHelper.FURTHEST_DEPTH);
            float highest = v > this.Depth ? v : this.Depth;

            PlayerPrefHelper.SaveFloat(PlayerPrefHelper.FURTHEST_DEPTH, (int)highest);
            SetFurthestTextBoard((int)highest);
        }
コード例 #2
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();
        }