CollisionDetector

Sprite to sprite collision detector. Collision detection is invoked when a sprite is moving, thus only testing sprites that are moving with all other sprites on the list. It tests rows to each other istead of pixels to speed up the process.

Constructors

this
this()
Undocumented in source.

Members

Functions

addCollisionListener
void addCollisionListener(CollisionListener c)
Undocumented in source. Be warned that the author may not have intended to support it.
addCollisionModel
void addCollisionModel(CollisionModel c, int i)
Undocumented in source. Be warned that the author may not have intended to support it.
removeCollisionListener
void removeCollisionListener(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
removeCollisionModel
void removeCollisionModel(int i)
Undocumented in source. Be warned that the author may not have intended to support it.
spriteMoved
void spriteMoved(int ID)

Implemented from the SpriteMovementListener interface, invoked when a sprite moves. Tests the sprite that invoked it with all other in its list.

testCollision
bool testCollision(int a, int b)

Tests if the two objects have collided. Returns true if they had. Pixel precise.

Variables

source
ISpriteCollision source;
Undocumented in source.

Inherited Members

From SpriteMovementListener

spriteMoved
void spriteMoved(int ID)
Undocumented in source.

Meta