protected Update ( |
||
gameTime | Provides a snapshot of timing values. | |
return | void |
protected override void Update(GameTime gameTime)
{
// Allows the game to exit
if (Keyboard.GetState().IsKeyDown(Keys.Escape))
ToggleGameMenu();
if (Keyboard.GetState().IsKeyUp(Keys.Escape))
_menuToggling = false;
if (!_gameMenuOpen && IsActive)
Mouse.SetPosition(GraphicsDevice.Viewport.Width / 2, GraphicsDevice.Viewport.Height / 2);
if (Keyboard.GetState().IsKeyDown(Keys.LeftAlt) && Keyboard.GetState().IsKeyDown(Keys.Enter))
ToggleFullscreen();
else
_fullscreenToggling = false;
base.Update(gameTime);
}