Exemplo n.º 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;
        }
    }
Exemplo n.º 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);
    }
Exemplo n.º 3
0
 private void Awake()
 {
     if (GameSettingsManager.GetHandicapLimitedLives())
     {
         isMortal         = true;
         limitedLifeValue = LIMITED_LIFE_AMOUNT;
     }
     else if (GameSettingsManager.GetHandicapOneLife())
     {
         isMortal         = true;
         limitedLifeValue = 1;
     }
 }