/// <summary>
 /// Adds a screen to the list of screens managed by the screenManager.
 /// </summary>
 /// <param name="screen">Represents the screen that should be managed by the screenManager.</param>
 public void AddScreen(GameScreen screen)
 {
     screen.ScreenManager = this;
     screen.Initialize();
     screen.LoadContent();
     screens.Add(screen);
 }
 /// <summary>
 /// Removes a screen from the list of screens managed by the screenManager.
 /// </summary>
 /// <param name="screen">Represents the screen that should be removed from the list
 /// of screens managed by the screenManager.</param>
 public void RemoveScreen(GameScreen screen)
 {
     screen.UnloadContent();
     screens.Remove(screen);
     screensToUpdate.Remove(screen);
 }
예제 #3
0
 /// <summary>
 /// Removes a screen from the list of screens managed by the screenManager.
 /// </summary>
 /// <param name="screen">Represents the screen that should be removed from the list
 /// of screens managed by the screenManager.</param>
 public void RemoveScreen(GameScreen screen)
 {
     screen.UnloadContent();
     screens.Remove(screen);
     screensToUpdate.Remove(screen);
 }