/// <summary> /// Adds a new screen to the screen manager. /// </summary> public void AddScreen(GameScreen screen) { screen.ScreenManager = this; // If we have a graphics device, tell the screen to load content. if ((graphicsDeviceService != null) && (graphicsDeviceService.GraphicsDevice != null)) { screen.LoadContent(); } screens.Add(screen); }
/// <summary> /// Adds a new screen to the screen manager. /// </summary> public void AddScreen(GameScreen screen) { screen.ScreenManager = this; // If we have a graphics device, tell the screen to load content. if ((graphicsDeviceService != null) && (graphicsDeviceService.GraphicsDevice != null)) { screen.LoadContent(); } screens.Add(screen); }