Пример #1
0
    public void CheckGameStatus()
    {
        switch (_GameStatus)
        {
        case GameStatus.Mainmenu:

            inMainMenu     = true;
            inCredits      = false;
            inSettings     = false;
            paused         = false;
            loading        = false;
            isCursorLocked = false;

            _MainMenu.ActivateMainMenu();
            _MainMenu.DeActivateSettings();
            _MainMenu.DeActivateCredits();
            _PauseMenu.DeActivateInGame();

            break;

        case GameStatus.Loading:

            inMainMenu     = false;
            inCredits      = false;
            inSettings     = false;
            paused         = false;
            loading        = true;
            isCursorLocked = false;

            //_LoadController.

            break;

        case GameStatus.Ingame:

            inMainMenu     = false;
            inCredits      = false;
            inSettings     = false;
            paused         = false;
            loading        = false;
            isCursorLocked = true;

            _PauseMenu.ActivateInGame();
            _MainMenu.DeActivateMainMenu();


            break;

        case GameStatus.IngamePaused:

            inMainMenu     = false;
            inCredits      = false;
            inSettings     = false;
            paused         = true;
            loading        = false;
            isCursorLocked = false;
            toTitleScreen  = false;

            _PauseMenu.ToPauseMenu();
            _MainMenu.DeActivateMainMenu();
            _SettingsMenu.DeActivateSettings();
            _PauseMenu.DeActivateToMainMenu();


            break;

        case GameStatus.IngameUnpaused:

            inMainMenu     = false;
            inCredits      = false;
            inSettings     = false;
            paused         = false;
            loading        = false;
            isCursorLocked = true;

            _PauseMenu.ResumeIngame();
            _MainMenu.DeActivateMainMenu();
            _SettingsMenu.DeActivateSettings();


            break;

        case GameStatus.Credits:

            inMainMenu     = true;
            inCredits      = true;
            inSettings     = false;
            paused         = false;
            loading        = false;
            isCursorLocked = false;

            _MainMenu.ActivateCredits();

            break;

        case GameStatus.MainMenuSettings:

            inMainMenu     = true;
            inCredits      = false;
            inSettings     = true;
            paused         = false;
            loading        = false;
            isCursorLocked = false;

            _MainMenu.ActivateSettings();
            _MainMenu.DeActivateTitleScreen();

            break;

        case GameStatus.IngameSettings:

            inMainMenu     = false;
            inCredits      = false;
            inSettings     = true;
            paused         = true;
            loading        = false;
            isCursorLocked = false;

            _SettingsMenu.ActivateSettings();
            _MainMenu.DeActivateMainMenu();

            break;
        }
    }