/// <summary> /// Handles the GameStateChange, pretty basic /// </summary> public void handleGameState() { Console.Out.Write("GameState change! \n"); switch (currentGameState) { case EGameState.MainMenu: gameState = new GameStates.MainMenu(); break; case EGameState.InGame: gameState = new GameStates.InGame(); break; case EGameState.Credits: gameState = new GameStates.Credits(); break; case EGameState.Options: gameState = new GameStates.Options(); break; } gameState.loadContent(); gameState.initialize(); prevGameState = currentGameState; }
/// <summary> /// Handles the GameStateChange, pretty basic /// </summary> public void handleGameState() { switch (currentGameState) { case EGameState.MainMenu: gameState = new GameStates.MainMenu(); break; case EGameState.InGame: gameState = new GameStates.InGame(gameState.eInGameState ,gameState.getPlayerList()); break; case EGameState.Credits: gameState = new GameStates.Credits(); break; case EGameState.Options: gameState = new GameStates.Options(); break; case EGameState.Exit: this.Exit(); break; case EGameState.CharacterSelection: gameState = new GameStates.CharacterSelection(); break; case EGameState.Help: gameState = new GameStates.Help(); break; } gameState.initialize(); gameState.loadContent(); prevGameState = currentGameState; sounds.gameStateChange.Play(Settings.getSoundVolume(), 0, 0); }