예제 #1
0
 private void CheckExplGold()
 {
     if (_safePlayerPrefs.GetInt_EarnedGold() > 0)
     {
         ExplGold();
     }
 }
예제 #2
0
        protected void ShowWinAttemptsX(IGameWindow gameWindow)
        {
            if (_raceResult != RaceResultEnum.WIN && _safePlayerPrefs.GetInt_EarnedGold() > 0)
            {
                _textLabelWinAttempts.text = string.Format("{0}:", _defaultWinAttemptsLabel);
                _TitleExpForWin.text       = string.Format("{0}:", "stars");

                return;
            }

            int    triesCount = gameWindow.Get_TriesCount();
            string multiplier = "";

            switch (triesCount)
            {
            case 3:
                multiplier = "X1";
                break;

            case 2:
                multiplier = "X2";
                break;

            case 1:
                multiplier = "X3";
                break;

            default:
                #region DEBUG
#if UNITY_EDITOR
                Debug.Log("[ERROR] triesCount (must be 1 or 2 or 3), but it is = " + triesCount);
#endif
                #endregion
                break;
            }

            _textLabelWinAttempts.text = string.Format("{0} {1}:", _defaultWinAttemptsLabel, multiplier);
            _TitleExpForWin.text       = string.Format("{0} {1}:", "stars", multiplier);
        }
예제 #3
0
 private void CalculatePlayerGold(int bonusGold)
 {
     _safePlayerPrefs.AddPlayerGold(_safePlayerPrefs.GetInt_EarnedGold() + bonusGold);
 }