Пример #1
0
 // Methods
 /// <summary>
 /// Loads a new screen to be displayed
 /// </summary>
 public void LoadScreen(BaseScreen screen)
 {
     this.screenStack.Push(screen);
     //this.currentScreen.UnloadContent();
     this.currentScreen = screen;
     this.currentScreen.LoadContent(this.ScreenManagerContent);
 }
Пример #2
0
 /// <summary>
 /// Unloads the current screen and displays the previous
 /// </summary>
 public void UnloadScreen()
 {
     if (this.screenStack.Count > 1)
     {
         this.screenStack.Pop();
         this.currentScreen = this.screenStack.Peek();
     }
 }