Esempio n. 1
0
        //-----------------------------------------------------------------------
        //Notify the managers when a game state change occurs
        public void ChangeDifficulty()
        {
            switch (CurrentDifficulty)
            {
            case GameDifficulty.Easy:
                m_CurrentSpeed = EASY_SPEED;
                break;

            case GameDifficulty.Medium:
                m_CurrentSpeed = MEDIUM_SPEED;
                break;

            case GameDifficulty.Hard:
                m_CurrentSpeed = HARD_SPEED;
                break;
            }

            if (CurrentDifficulty != GameDifficulty.Easy)                          //The Hazard manager has to be notified later when the game starts
            {
                m_HazardsManager.IncreaseElementsSpeed(m_CurrentSpeed);
            }

            m_EnvironmentManager.IncreaseElementsSpeed(m_CurrentSpeed);
            m_PathManager.IncreasePathsSpeed(m_CurrentSpeed);
            m_EffectManager.UpdateSpeed(m_CurrentSpeed);                            //Inrcrease snow speed
            m_MainCharacter.SetWalkSpeed();                                         //Increase main character animation speed
            m_HazardsManager.SetHazardCount();                                      //Increase number of different hazards
            SetTimeRange();                                                         //Increase time to calculate score
        }