Example #1
0
    public void SetState(UiState state)
    {
        HideAllScreens();
        currentState = state;
        switch (currentState)
        {
        case UiState.Intro:
            introScreen.Show();
            break;

        case UiState.Session:
            hudScreen.Reset(sessionPlayer.TopScore, sessionPlayer.CurrentHealth);
            hudScreen.Show();
            break;

        case UiState.GameOver:
            gameOverScreen.SetHighscore(sessionPlayer.LastScore);
            gameOverScreen.Show();
            break;
        }
    }