private bool Contains(float x, float y) { List <Vector2> vertices = polygon.GetVertices(); return(vertices.Contains(new Vector2(x, y))); }