private void SwitchState(StateTransformer.GameStateType stateType) { switch (stateType) { case StateTransformer.GameStateType.MainMenu: ActiveState = MainMenu.GetInstance(); break; case StateTransformer.GameStateType.GameRunning: ActiveState = GameRunning.GetInstance(game, ChoseLevel.GetInstance().Customer); break; case StateTransformer.GameStateType.GamePaused: ActiveState = GamePaused.GetInstance(); break; case StateTransformer.GameStateType.ChoseLevel: ActiveState = ChoseLevel.GetInstance(); break; case StateTransformer.GameStateType.GameOver: ActiveState = GameOver.GetInstance(); break; case StateTransformer.GameStateType.GameWon: ActiveState = GameWon.GetInstance(); break; } }
public static GameWon GetInstance() { return(GameWon.instance ?? (GameWon.instance = new GameWon())); }