title: MonoGame reading touch gestures
body: <p>I am currently writing a game using the fantastic monogame framework.  I am having trouble reacting to touch input correctly.  When a user drags horizontally or vertically I want to perform an action once per drag.  The problem is the gesture is getting issued multiple times for each drag.  Here is my code:</p>
  
  <pre><code>var gesture = default(GestureSample);
  
  while (TouchPanel.IsGestureAvailable)
      gesture = TouchPanel.ReadGesture();
  
  if (gesture.GestureType == GestureType.VerticalDrag)
  {
      if (gesture.Delta.Y &lt; 0)
          return new RotateLeftCommand(_gameController);
  
      if (gesture.Delta.Y &gt; 0)
          return new RotateRightCommand(_gameController);
  }
  
  if (gesture.GestureType == GestureType.HorizontalDrag)
  {
      if (gesture.Delta.X &lt; 0)
          return new RotateLeftCommand(_gameController);
  
      if (gesture.Delta.X &gt; 0)
          return new RotateRightCommand(_gameController);
  }
  </code></pre>
  
  <p>I have moved all of this code into one block for the purposes of this example.  The RotateRightCommand or RotateLeftCommand that is returned is then executed by the calling code which rotates the object on the screen.  This whole block of code is being run in the update loop in monogame.  I think I am missing something in terms of resetting the touch input and that's why I'm getting 3 or 4 RotateCommands returned for one drag.  What am I doing wrong?</p>