public override void Update(GameTime gameTime) { menu.Update(); exit.Update(); if (exit.pressed) { Game1.quit = true; } base.Update(gameTime); }
public override void Update() { newState = Keyboard.GetState(); if (KeyboardStroke.KeyDown(oldState, newState, Keys.Escape)) { if (paused) { paused = false; } else { paused = true; } } oldState = newState; if (paused) { menu.show(); } else { menu.hide(); } menu.Update(); if (!game.IsActive) { paused = true; } base.Update(); }