I n开发者_开发问答eed to apply multi touch events together(vertical drag,horizontal drag) in xna. If any one knows please help.
I use the gesture as horizontal, vertical drag, this is an example :
while (TouchPanel.IsGestureAvailable)
{
GestureSample gesture =TouchPanel.ReadGesture();
if (gesture.GestureType == GestureType.VerticalDrag)
{
//insert the code here that execute when the event is detected
}
}
this is the code in your update or your thread, however, you must declare this in your class
TouchPanel.EnabledGestures = GestureType.VerticalDrag;
精彩评论