| Collision-2D documentation | view source | Contained in the Collision-2D distribution. |
This is an entity with height and width. Attributes (x, y) is one corner of the rect, whereas (x+w,y+h) is the opposite corner.
Width and height of the rectangle.
Anything in Collision::2D::Entity.
See Collision::2D::Entity->collide
print 'boom' if $rect->collide($rect); print 'zing' if $rect->collide($circle); print 'yotz' if $rect->collide($grid);
See Collision::2D::Entity->intersect
print 'bam' if $rect->intersect($rect); # etc..
| Collision-2D documentation | view source | Contained in the Collision-2D distribution. |