protected override void Initialize() { // Initialise the application // ================ // Load settings Settings.LoadSettings(); // Set up window h_graphicsDeviceHandler.IsFullScreen = Settings.m_fullscreen; h_graphicsDeviceHandler.PreferredBackBufferWidth = Settings.m_screenWidth; h_graphicsDeviceHandler.PreferredBackBufferHeight = Settings.m_screenHeight; h_graphicsDeviceHandler.ApplyChanges(); GraphicsHandler.Initialise(GraphicsDevice, Content); // Initialise states m_menuState = new MenuState(); m_inGameState = new InGameState(); m_victoryState = new VictoryState(); // Set initial state switch (Settings.m_startState) { case GameState.MAIN_MENU: m_currentState = m_menuState; break; case GameState.IN_GAME: m_currentState = m_inGameState; break; case GameState.VICTORY_SCREEN: m_currentState = m_victoryState; break; } base.Initialize(); }