FabGL
ESP32 Display Controller and Graphics Library

◆ updateAndDetectCollision() [2/2]

void updateAndDetectCollision ( Sprite sprite,
CollisionDetectionCallback  callbackFunc,
void *  callbackObj 
)

Updates collision detector and detect multiple collisions with the specified sprite.

When a sprite changes its position or size it is necessary to update the collision detector.
This method updates the detector and detects multiple collisions.

Parameters
spriteThe sprite to update and to check for collisions.
callbackFuncThe callback function called whenever a collision is detected.
callbackObjPointer passed as parameter to the callback function.

Definition at line 459 of file collisiondetector.cpp.