public override bool contains(CHitShape otherShape) { switch (otherShape.shape) { case shapeType.circle: if ((Math.Sqrt(Math.Pow(position.X - otherShape.position.X, 2) + Math.Pow(position.Y - otherShape.position.Y, 2))) < radius + ((CHitSphere)otherShape).radius) { return(true); } break; case shapeType.box: break; } return(false); }
public override bool contains(CHitShape otherShape) { switch (otherShape.shape) { case shapeType.circle: if ( (Math.Sqrt(Math.Pow(position.X - otherShape.position.X,2) + Math.Pow(position.Y - otherShape.position.Y,2))) < radius + ((CHitSphere)otherShape).radius) { return true; } break; case shapeType.box: break; } return false; }
public abstract bool contains(CHitShape otherShape);
public abstract bool contains(CHitShape otherShape);