Exemplo n.º 1
0
        private void SwitchState(GameStateType stateType)
        {
            switch (stateType)
            {
            case GameStateType.MainMenu:
                ActiveState = MainMenu.GetInstance();
                GameRunning.NewGetInstance();
                break;

            case GameStateType.GameRunning:
                ActiveState = GameRunning.GetInstance();
                break;

            case GameStateType.GamePaused:
                ActiveState = GamePaused.GetInstance();
                break;

            case GameStateType.GameOver:
                ActiveState = GameOver.GetInstance();
                break;
            }
        }
Exemplo n.º 2
0
 public static GameRunning NewGetInstance()
 {
     return(GameRunning.instance = new GameRunning());
 }