NAME

Collision::2D::Entity::Circle - A circle entity.

DESCRIPTION

This is an entity with a radius. Attributes x and y point to the center of the circle.

ATTRIBUTES

radius

Each point on the circle is this distance from the center, at ($circ->x, $circ->y)

METHODS

Anything in Collision::2D::Entity.

collide

See Collision::2D::Entity->collide

print 'boom' if $circle->collide($rect);
print 'zing' if $circle->collide($circle);
print 'yotz' if $circle->collide($grid);

intersect

See Collision::2D::Entity->intersect

print 'bam' if $circle->intersect($rect);
# etc..