|
FabGL
ESP32 Display Controller and Graphics Library
|
Scene is an abstract class useful to encapsulate functionalities of a scene (sprites, collision detector and updates). More...
#include <scene.h>
Public Member Functions | |
| Scene (int maxSpritesCount, int updateTimeMS, int width, int height, int stackSize=2048) | |
| The Scene constructor. More... | |
| void | addSprite (Sprite *sprite) |
| Adds the specified sprite to collision detector. More... | |
| virtual void | collisionDetected (Sprite *spriteA, Sprite *spriteB, Point collisionPoint)=0 |
| This is an abstract method called whenever a collision has been detected. More... | |
| int | getHeight () |
| Determines scene height. More... | |
| int | getWidth () |
| Determines scene width. More... | |
| virtual void | init ()=0 |
| This is an abstract method called when the scene needs to be initialized. More... | |
| void | removeSprite (Sprite *sprite) |
| Removes the specified sprite from collision detector. More... | |
| void | start (bool suspendTask=true) |
| Starts scene updates and suspends current task. More... | |
| void | stop () |
| Stops scene updates and resumes suspended task. More... | |
| virtual void | update (int updateCount)=0 |
| This is an abstract method called whenever the scene needs to be updated. More... | |
| void | updateSprite (Sprite *sprite) |
| Updates collision detector. More... | |
| void | updateSpriteAndDetectCollisions (Sprite *sprite) |
| Updates collision detector and generate collision events. More... | |
Scene is an abstract class useful to encapsulate functionalities of a scene (sprites, collision detector and updates).