ESP32 Display Controller and Graphics Library

◆ detectCollision() [2/2]

void detectCollision ( Sprite sprite,
CollisionDetectionCallback  callbackFunc,
void *  callbackObj 

Detects multiple collisions with the specified sprite.

It is necessary to call CollisionDetector.update() before detectCollision() so sprites position and size are correctly updated.

spriteThe sprite to detect collision.
callbackFuncThe callback function called whenever a collision is detected.
callbackObjPointer passed as parameter to the callback function.

Definition at line 440 of file collisiondetector.cpp.