/// <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 (isInitialized) { screen.InitializeControls(); screen.LoadContent(); } screens.Add(screen); }
/// <summary> /// Removes a screen from the screen manager instantly /// </summary> public void RemoveScreen(GameScreen screen) { screens.Remove(screen); screensToUpdate.Remove(screen); }