LastFrameGestures
Introduction
Code Example
foreach(var gesture in InputManager.TouchScreen.LastFrameGestures)
{
if(gesture.GestureType == GestureType.Tap)
{
// The user tapped the screen
float worldX;
float worldY;
MathFunctions.WindowToAbsolute(
gesture.Position.X,
gesture.Position.Y,
ref worldX,
ref worldY,
0, // The z position
SpriteManager.Camera,
CoordinateRelativity.RelativeToWorld);
// Do whatever is needed with world coordinates here
}
}Last updated
Was this helpful?