
Untitled
By: a guest on
Apr 30th, 2012 | syntax:
C# | size: 0.40 KB | hits: 21 | expires: Never
TouchCollection touches = TouchPanel.GetState();
for (int x = 0; x < touches.Count; x++)
{
if (touches[x].State == TouchLocationState.Moved)
{
Vector2 diff = touches[x].Position - targetPos;
if (diff.Length() < 30)
targetPos.Y += 1;
}
}