public static circleToBox ( Circle circle, |
||
circle | Circle | First. |
box | Second. | |
result | CollisionResult | Result. |
return | bool |
public override bool collidesWithShape(Shape other, out CollisionResult result) { if (other is Box && (other as Box).isUnrotated) { return(ShapeCollisions.circleToBox(this, other as Box, out result)); } if (other is Circle) { return(ShapeCollisions.circleToCircle(this, other as Circle, out result)); } if (other is Polygon) { return(ShapeCollisions.circleToPolygon(this, other as Polygon, out result)); } throw new NotImplementedException(string.Format("Collisions of Circle to {0} are not supported", other)); }