/// <summary> /// Updates the keyboard and gamepad control states. /// </summary> public static void Update() { Gestures.Clear(); // update the keyboard state previousKeyboardState = currentKeyboardState; currentKeyboardState = Keyboard.GetState(); // update the gamepad state previousGamePadState = currentGamePadState; currentGamePadState = GamePad.GetState(PlayerIndex.One); // Update the touch state previousTouchState = currentTouchState; currentTouchState = TouchPanel.GetState(); while (TouchPanel.IsGestureAvailable) { var gesture = TouchPanel.ReadGesture(); Gestures.Add(gesture); } }