예제 #1
0
 protected override void Update(GameTime gameTime)
 {
     base.Update(gameTime);
     if (Keyboard.GetState().IsKeyDown(Keys.Escape) && LastKeyboardState.IsKeyUp(Keys.Escape))
     {
         if (Keyboard.GetState().IsKeyDown(Keys.LeftShift))
         {
             Fullscreen(null, _graphicDeviceManager);
         }
         else
         {
             ActiveScreen("Menu");
         }
     }
     for (int i = 0; i < Screens.Count; i++)
     {
         if (Screens[i] != _activeScreen)
         {
             Screens[i].UnloadContent();
         }
     }
     _activeScreen.Update(gameTime);
     LastMouseState    = Mouse.GetState();
     LastKeyboardState = Keyboard.GetState();
 }