void Update()
    {
        #region Scene Management
        if (_waitUntilGameLoads && SceneManager.GetSceneByName("Game").isLoaded)
        {
            _waitUntilGameLoads = false;
            InitializeGameScene();
            StartPlaying();
        }
        else if (_waitUntilMenuLoads && SceneManager.GetSceneByName("Menu").isLoaded)
        {
            _waitUntilMenuLoads = false;
            InitializeMenuScene();
        }
        else if (_waitUntilGameUnloads && !SceneManager.GetSceneByName("Game").isLoaded)
        {
            //Color c = menuButtonHandler.loadingScreen.color;
            //c.a = 1;
            //menuButtonHandler.loadingScreen.color = c;
            _waitUntilGameUnloads = false;
            LoadGame(false);
        }
        #endregion

        #region Pause and Resume

        if (_pausing)
        {
            if (Time.timeScale > 0.1f)
            {
                Time.timeScale -= 0.03f;
            }
            else
            {
                Time.timeScale = 0;
                _pausing       = false;
            }
        }
        else if (_resuming)
        {
            if (Time.timeScale < 0.9f)
            {
                Time.timeScale += 0.03f;
            }
            else
            {
                Time.timeScale = 1;
                _resuming      = false;
            }
        }
        #endregion

        #region Button events
        //check if Back Button (escape key) was pressed this frame
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            switch (gameState)
            {
            case GameState.MainMenu:
                menuSceneManager.BackRequested();
                break;

            case GameState.Playing:
            case GameState.Paused:
            case GameState.Results:
                gameSceneManager.BackRequested();
                break;

            default:
                break;
            }
        }
        //check if Enter was pressed this frame
        if (Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Return))
        {
            switch (gameState)
            {
            case GameState.MainMenu:
                menuSceneManager.EnterRequested();
                break;

            case GameState.Playing:
            case GameState.Paused:
            case GameState.Results:
                gameSceneManager.EnterRequested();
                break;

            default:
                break;
            }
        }
        #endregion
    }