예제 #1
0
        public void SwitchState(GameStateType stateType)
        {
            switch (stateType)
            {
            case GameStateType.GameRunning:
                ActiveState = GameRunning.GetInstance();
                break;

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

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

            case GameStateType.GamePaused:
                ActiveState = GamePaused.GetInstance();
                break;
            }
        }
예제 #2
0
 public static SelectLevel GetInstance()
 {
     return(SelectLevel.instance ?? (SelectLevel.instance = new SelectLevel()));
 }