public void StartGame(string name) { overworldState.Initialize(); shooterState.Initialize(); shipManagerState.Initialize(); planetState.Initialize(); stationState.Initialize(); missionScreenState.Initialize(); ChangeState(name); }
public void Initialize() { gameStates = new List <GameState>(); mainMenuState = new MainMenuState(Game, "MainMenuState"); startGameState = new StartGameState(Game, "StartGameState"); optionsMenuState = new OptionsMenuState(Game, "OptionsMenuState"); helpScreenState = new HelpScreenState(Game, "HelpScreenState"); introFirstState = new IntroFirstState(Game, "IntroFirstState"); introSecondState = new IntroSecondState(Game, "IntroSecondState"); outroState = new OutroState(Game, "OutroState"); overworldState = new OverworldState(Game, "OverworldState"); mapCreatorState = new MapCreatorState(Game, "MapCreatorState"); shooterState = new ShooterState(Game, "ShooterState"); shipManagerState = new ShipManagerState(Game, "ShipManagerState"); planetState = new PlanetState(Game, "PlanetState"); stationState = new StationState(Game, "StationState"); missionScreenState = new MissionScreenState(Game, "MissionScreenState"); creditState = new CreditState(Game, "CreditState"); levelTesterState = new LevelTesterState(Game, "LevelTesterState"); campaignState = new CampaignState(Game, "CampaignState"); gameStates.Add(mainMenuState); gameStates.Add(startGameState); gameStates.Add(optionsMenuState); gameStates.Add(helpScreenState); gameStates.Add(introFirstState); gameStates.Add(introSecondState); gameStates.Add(outroState); gameStates.Add(overworldState); gameStates.Add(shooterState); gameStates.Add(shipManagerState); gameStates.Add(planetState); gameStates.Add(stationState); gameStates.Add(missionScreenState); gameStates.Add(mapCreatorState); gameStates.Add(creditState); gameStates.Add(levelTesterState); gameStates.Add(campaignState); mainMenuState.Initialize(); startGameState.Initialize(); optionsMenuState.Initialize(); helpScreenState.Initialize(); introFirstState.Initialize(); introSecondState.Initialize(); outroState.Initialize(); mapCreatorState.Initialize(); overworldState.Initialize(); shooterState.Initialize(); shipManagerState.Initialize(); planetState.Initialize(); stationState.Initialize(); missionScreenState.Initialize(); creditState.Initialize(); levelTesterState.Initialize(); campaignState.Initialize(); ChangeState("MainMenuState"); }