public bool InMousePosition(Vector2 MousePos) { if (Collider == null || Collider.vertices.Count < 3) { float x = MousePos.X, y = MousePos.Y; if (x >= AbsoluteLeft && x < AbsoluteLeft + Width && y >= AbsoluteTop && y < AbsoluteTop + Height) { return(true); } return(false); } else { return(Collider.Inside(Vector2.Subtract(MousePos, new Vector2(AbsoluteLeft, AbsoluteTop)))); } }