Ejemplo n.º 1
0
        private void ReactToChangedGameState(object sender, GameStateEventArgs e)
        {
            switch (e.GameState)
            {
            case GameStates.Running:
                Continue();
                break;

            case GameStates.Paused:
                PauseGame();
                break;

            case GameStates.Lost:
                InitiateGameLost();
                break;

            case GameStates.Pre:
                StartGame();
                break;

            case GameStates.Error:
                CrashGame();
                break;

            default:
                CrashGame();
                break;
            }
        }
Ejemplo n.º 2
0
 private void OnGameState_Changed(object sender, GameStateEventArgs e)
 {
     if (e.GameState != m_GameState)
     {
         m_GameState = e.GameState;
     }
 }
Ejemplo n.º 3
0
 public void GameLost(object sender, GameStateEventArgs e)
 {
     GameState_Changed.Invoke(this, e);
 }