Zach Morgan > Collision-2D-0.07 > Collision::2D::Entity::Point

Download:
Collision-2D-0.07.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source  

NAME ^

Collision::2D::Entity::Rect - A Point entity.

DESCRIPTION ^

This is a point entity. Attributes (x, y) are the location of this point. See Collision::2D::Entity.

Points can not collide with other points. Use a very small circle instead.

ATTRIBUTES ^

Anything in Collision::2D::Entity.

METHODS ^

Anything in Collision::2D::Entity.

collide

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

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

intersect

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

 print 'bam' if $point->intersect($rect);
 # etc..
syntax highlighting: