ESP32 Display Controller and Graphics Library

◆ collisionDetected()

virtual void collisionDetected ( Sprite spriteA,
Sprite spriteB,
Point  collisionPoint 
pure virtual

This is an abstract method called whenever a collision has been detected.

This method is called one o more times as a result of calling Scene.updateSpriteAndDetectCollisions() method when one o more collisions has been detected.

spriteAOne of the two sprites collided. This is the same sprite specified in Scene.updateSpriteAndDetectCollisions() call.
spriteBOne of the two sprites collided.
collisionPointCoordinates of a collision point.