public override void update(GameTime gameTime) { base.update(gameTime); foreach (GestureSample gesture in GestureManager.Gestures) { if (gesture.GestureType == GestureType.Tap) { PatchButton hitButton = buttons.FindLast(x => x.checkForHit(gesture.Position)); if (hitButton != null) { hitButton.doAction(); } PatchField hitField = fields.FindLast(x => x.checkForHit(gesture.Position)); if (hitField != null) { hitField.getInput(); } } } foreach (Movable movable in movables) { movable.update(gameTime); } }
public override void update(GameTime gameTime) { base.update(gameTime); ticker.update(gameTime); foreach (GestureSample gesture in GestureManager.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (button.checkForHit(gesture.Position)) { button.doAction(); } } } }