예제 #1
0
    public void SwitchUI(UIState state)
    {
        switch (state)
        {
        case UIState.MainMenu:
            _mainMenu.Show();
            _inGameUI.Hide();
            _pauseMenu.Hide();
            _endGameMenu.Hide();
            break;

        case UIState.InGame:
            _mainMenu.Hide();
            _inGameUI.Show();
            _pauseMenu.Hide();
            _endGameMenu.Hide();
            break;

        case UIState.Pause:
            _mainMenu.Hide();
            _inGameUI.Hide();
            _pauseMenu.Show();
            _endGameMenu.Hide();
            break;

        case UIState.EndGame:
            _mainMenu.Hide();
            _inGameUI.Hide();
            _pauseMenu.Hide();
            _endGameMenu.Show();
            break;
        }
    }
예제 #2
0
    public void SwitchUI(UIState state)
    {
        switch (state)
        {
        case UIState.StartGame:
            _startGameMenu.Show();
            _inGameUI.Hide();
            _pauseMenu.Hide();
            _winGameMenu.Hide();
            _loseGameMenu.Hide();
            break;

        case UIState.InGame:
            _startGameMenu.Hide();
            _inGameUI.Show();
            _pauseMenu.Hide();
            _winGameMenu.Hide();
            _loseGameMenu.Hide();
            break;

        case UIState.Pause:
            _startGameMenu.Hide();
            _inGameUI.Hide();
            _pauseMenu.Show();
            _winGameMenu.Hide();
            _loseGameMenu.Hide();
            break;

        case UIState.WinGame:
            _startGameMenu.Hide();
            _inGameUI.Hide();
            _pauseMenu.Hide();
            _winGameMenu.Show();
            _loseGameMenu.Hide();
            break;

        case UIState.LoseGame:
            _startGameMenu.Hide();
            _inGameUI.Hide();
            _pauseMenu.Hide();
            _winGameMenu.Hide();
            _loseGameMenu.Show();
            break;
        }
    }
예제 #3
0
 /// <summary>
 /// State exit event. Hides view elements.
 /// </summary>
 public override void Exit()
 {
     ui.Hide();
     turn.Exit();
     turn = null;
     HideInGameMenu();
     DetachMapEventHandlers();
     DetachUiEventHandlers();
     base.Exit();
 }