void IScreen.Update(InputContext inputContext, IGameTiming gameTime) { this.InputConfiguration.Update(inputContext, gameTime); this.Scene.Update(gameTime); this.Update(gameTime); }
public void Update(InputContext inputContext, IGameTiming gameTime) { var keyState = inputContext.KeyboardGetState(); var mouseState = inputContext.MouseGetState(); var touchState = inputContext.TouchGetState(); foreach (var keyboardTracking in this.keyboardTrackings) { keyboardTracking.Update(keyState, gameTime); } foreach (var mouseTracking in this.mouseTrackings) { mouseTracking.Update(mouseState, gameTime); } foreach (var digitalButton in this.digitalButtons.Values) { digitalButton.Update(keyState, mouseState, gameTime); } foreach (var visualButton in this.visualButtons.Values) { visualButton.Update(touchState, mouseState, gameTime); } foreach (var touchTracking in this.touchTrackings) { touchTracking.Update(touchState, gameTime); } foreach (var inputEvent in this.inputEvents.Values) { inputEvent.Update(touchState, gameTime); } }