Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public enum GameState
- {
- MainMenu,
- InGame,
- GameOver
- };
- class MyGame
- {
- /// snip
- protected GameState gameState = GameState.MainMenu;
- protected override void Draw(GameTime gameTime)
- {
- /// snip
- switch(this.gameState)
- {
- case(GameState.MainMenu):
- break;
- // same for all the others
- default:
- throw new Exception("oh noes");
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement