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