Пример #1
0
    private void Start()
    {
        if (FindObjectOfType <GameSettingsManager>() != null)
        {
            waterSpeedAddition = GameSettingsManager.GetWaterRisingSpeed();

            if (GameSettingsManager.GetHandicapNoIndicator())
            {
                waterLevelIndicatorObject.SetActive(false);
            }

            if (GameSettingsManager.GetHandicapLimitedLives() || GameSettingsManager.GetHandicapOneLife())
            {
                lifePanel.SetActive(true);
                UpdateLifeCount();
            }
            else
            {
                lifePanel.SetActive(false);
            }
        }
        else
        {
            // Call when play from level straight from editor!
            Debug.Log("No GameSettingsManager script exists. Setting to default diffculty.");
            waterSpeedAddition = 1.0f;
        }
    }
Пример #2
0
    private void AddInCurrentScoreStats()
    {
        HighScoreStat currentStat = new HighScoreStat();

        currentStat.score                = playerScore;
        currentStat.difficulty           = playerDifficulty;
        currentStat.handicapNoIndicator  = GameSettingsManager.GetHandicapNoIndicator();
        currentStat.handicapLimitedLives = GameSettingsManager.GetHandicapLimitedLives();
        currentStat.handicapOneLife      = GameSettingsManager.GetHandicapOneLife();
        currentStat.handicapZeroDivine   = GameSettingsManager.GetHandicapZeroDivine();
        highScores.Add(currentStat);
    }