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