Exemplo n.º 1
0
 private void StartDragging(MouseState mouseState)
 {
     Mouse.SetCursor(MouseCursor.SizeAll);
     _mouseDragStart  = mouseState.GetPosition();
     _cameraDragStart = MainCamera.Position;
     _dragging        = true;
 }
Exemplo n.º 2
0
 public static Vector2 GetPositionDelta(this MouseState mouseState)
 {
     return(mouseState.GetPosition() - GameManager.PreviousMouseState.GetPosition());
 }
Exemplo n.º 3
0
 private void Drag(MouseState mouseState)
 {
     MainCamera.Position = _cameraDragStart - ((mouseState.GetPosition() - _mouseDragStart) / MainCamera.Zoom);
 }