document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. Vector2 offsetDirection = Vector2.Zero;
  2.  
  3. if (Controller.IsButtonDown(Buttons.Left))
  4.     offsetDirection.X -= 1;
  5. if (Controller.IsButtonDown(Buttons.Right))
  6.     offsetDirection.X += 1;
  7.  
  8. if (Controller.IsButtonDown(Buttons.Up))
  9.     offsetDirection.Y -= 1;
  10. if (Controller.IsButtonDown(Buttons.Down))
  11.     offsetDirection.Y += 1;
  12.  
  13. if (offsetDirection == Vector2.Zero)
  14.     return;
');