public override bool CollidesWithShape(Shape other, out CollisionResult result) { if (other is Polygon) { return(ShapeCollisions.PolygonToPolygon(this, other as Polygon, out result)); } if (other is Circle) { if (ShapeCollisions.CircleToPolygon(other as Circle, this, out result)) { result.InvertResult(); return(true); } return(false); } throw new NotImplementedException(string.Format("overlaps of Polygon to {0} are not supported", other)); }