FabGL
ESP32 Display Controller and Graphics Library

◆ updateAndDetectCollision() [1/2]

Sprite * updateAndDetectCollision ( Sprite sprite,
bool  removeCollidingSprites = true 
)

Updates collision detector and detect collision 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 collisions.

Parameters
spriteThe sprite to update and to check for collisions.
removeCollidingSpritesIf true the collided sprites are automatically removed from the collision detector.
Returns
The other sprite that collided with the specified sprite.

Definition at line 452 of file collisiondetector.cpp.