public override void Update(DwarfTime gameTime) { DwarfGame.GumInput.FireActions(GuiRoot, (@event, args) => { if (@event == InputEvents.KeyUp && args.KeyValue == (int)Microsoft.Xna.Framework.Input.Keys.Escape) { GameStateManager.PopState(); } }); GuiRoot.Update(gameTime.ToRealTime()); SoundManager.Update(gameTime, null, null); base.Update(gameTime); }
public override void Update(DwarfTime gameTime) { foreach (var @event in DwarfGame.GumInputMapper.GetInputQueue()) { GuiRoot.HandleInput(@event.Message, @event.Args); if ([email protected]) { // Pass event to game... if (@event.Message == InputEvents.KeyUp && @event.Args.KeyValue == (int)Microsoft.Xna.Framework.Input.Keys.Escape) { StateManager.PopState(); } } } GuiRoot.Update(gameTime.ToRealTime()); SoundManager.Update(gameTime, null, null); base.Update(gameTime); }