开发者

Multi-touch events in XNA

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;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜