public override bool Intersects(CollisionElement collisionElement) { if (collisionElement is CollisionConvexPolygon) return Intersects(collisionElement as CollisionConvexPolygon); if (collisionElement is CollisionCircle) return Intersects(collisionElement as CollisionCircle); return collisionElement.Intersects(this); }
public override bool Intersects(CollisionElement collisionElement) { if (collisionElement is CollisionConvexPolygon) { return(Intersects(collisionElement as CollisionConvexPolygon)); } if (collisionElement is CollisionCircle) { return(Intersects(collisionElement as CollisionCircle)); } return(collisionElement.Intersects(this)); }
public override bool Intersects(CollisionElement collisionElement) { var polygon = collisionElement as CollisionConvexPolygon; if (polygon != null) { return(Intersects(polygon)); } var circle = collisionElement as CollisionCircle; if (circle != null) { return(Intersects(circle)); } return(collisionElement.Intersects(this)); }
public override bool Intersects(CollisionElement collisionElement) { var polygon = collisionElement as CollisionConvexPolygon; if (polygon != null) return Intersects(polygon); var circle = collisionElement as CollisionCircle; if (circle != null) return Intersects(circle); return collisionElement.Intersects(this); }