|
FabGL
ESP32 VGA Controller and Graphics Library
|
| void fabgl::CollisionDetector::detectCollision | ( | Sprite * | sprite, |
| CollisionDetectionCallback | callbackFunc, | ||
| void * | callbackObj | ||
| ) |
Detect multiple collisions with the specified sprite.
It is necessary to call CollisionDetector.update() before detectCollision() so sprites position and size are correctly updated.
| sprite | The sprite to detect collision. |
| callbackFunc | The callback function called whenever a collision is detected. |
| callbackObj | Pointer passed as parameter to the callback function. |