Ejemplo n.º 1
0
        public bool IsUnlocked()
        {
            switch (UnlockActionName)
            {
            case PLAY:
                var playTimes = PlayerPrefsHelper.GetGamesPlayed();
                return(playTimes >= Condition);

            case WATCH_ADS:
                var watchAdsTimes = PlayerPrefsHelper.GetWatchAdsTimes();
                return(watchAdsTimes >= Condition);

            case DAYS_PLAYED:
                var daysPlayed = PlayerPrefsHelper.GetDaysPlayed();
                return(daysPlayed >= Condition);

            case HIGH_SCORE:
                var highScore = PlayerPrefsHelper.GetHighScore();
                return(highScore >= Condition);
            }

            return(false);
        }