TouchGesture Sample
This sample shows you how to utilize the Gesture API in your games.Sample Overview
Included in this sample is instructional code for including hold, tap, drag, flick, and pinch gestures in a game. The sample uses the Gestures API built into XNA Game Studio 4.0.
Sample Controls
This sample uses the following keyboard and gamepad controls.
| Action | Widows Phone - Emulator | Windows Phone |
|---|---|---|
| Create Sprite | HOLD a screen press in empty space | HOLD a screen press on sprite |
| Remove Sprite | HOLD a screen press on sprite | HOLD a screen press on sprite |
| Change Sprite Color | TAP a sprite | TAP a sprite |
| Drag Sprite | DRAG a sprite | DRAG a sprite |
| Throw Sprite | FLICK a sprite by dragging and quickly releasing | FLICK a sprite by dragging and quickly releasing |
| Scale Sprite | PINCH a sprite by touching a sprite at two points and expanding or contracting the points. (Requires a multi-touch compatible display) | PINCH a sprite by touching a sprite at two points and expanding or contracting the points. |
| Exit. | BACK | BACK |