public void Update(GameTime gameTime) { while (TouchPanel.IsGestureAvailable) { var gesture = TouchPanel.ReadGesture(); if (gesture.GestureType == GestureType.Tap) { screenComponent.InvokeContainerTap(gesture); } } }
public async void Update(GameTime gameTime) { mapRenderer.Update(gameTime); while (TouchPanel.IsGestureAvailable) { var gesture = TouchPanel.ReadGesture(); screenComponent.InvokeContainerGestureRead(gesture); if (gesture.GestureType == GestureType.FreeDrag) { Pan(gesture); } if (gesture.GestureType == GestureType.Pinch) { Zoom(gesture); } if (gesture.GestureType == GestureType.Tap) { screenComponent.InvokeContainerTap(gesture); await Tap(gesture); } if (gesture.GestureType == GestureType.Hold) { screenComponent.InvokeContainerHeld(gesture); } } screenComponent.Update(gameTime); foreach (var drawable in entities.Drawables) { drawable.Update(gameTime); } endTurnButton.IsHighlighted = lockedInCharacter != null && !lockedInCharacter.HasRemainingMoves && !lockedInCharacter.HasRemainingPlayableCards; }