An abstract class representing a distinct part of the game, like a main menu or a level. More...
#include <Scene.h>

Public Member Functions | |
| Scene (std::string name, int buildIndex, bool isPanel, bool isLocking, int layer) | |
| Constructs a Scene. | |
| virtual void | init ()=0 |
| Pure virtual function for scene-specific initialization logic. | |
| virtual void | update ()=0 |
| Pure virtual function for scene-specific update logic. | |
| virtual void | reload ()=0 |
| Pure virtual function to reset the scene to its initial state. | |
| virtual void | reloadWithState ()=0 |
| Pure virtual function to reload the scene while preserving some state (e.g., UI state). | |
| virtual void | handleEvents (SDL_Event &event)=0 |
| Pure virtual function to handle scene-specific SDL events. | |
| virtual void | draw ()=0 |
| Pure virtual function for scene-specific drawing logic. | |
| void | addEntityToScene (Entity &entity) |
| Registers an entity as belonging to this scene. | |
| void | removeEntityFromScene (Entity *entity) |
| Removes an entity from this scene's management. | |
| bool | existsInScene (Entity *entity) |
| Checks if a specific entity is part of this scene. | |
| void | clearScene () |
| Removes all entities from the scene. | |
| void | enableScene () |
| Activates all entities within the scene. | |
| void | disableScene () |
| Deactivates all entities within the scene. | |
| const bool & | getIsPanel () const |
| Gets whether the scene is a UI panel. | |
| const bool & | getIsLocking () const |
| Gets whether the scene locks updates on lower layers. | |
Public Attributes | |
| std::string | name |
| The unique name of the scene. | |
| int | buildIndex |
| The index of the scene for sequential loading. | |
| int | layer |
| The rendering layer, for handling multiple active scenes (e.g., UI panels). | |
| bool | mouseButtonPressed |
An abstract class representing a distinct part of the game, like a main menu or a level.
Manages a collection of entities that exist within it.
Constructs a Scene.
| name | The unique name of the scene. |
| buildIndex | The scene's build index. |
| isPanel | True if this scene is a UI panel that can overlay other scenes. |
| isLocking | True if this scene should prevent updates in scenes on lower layers. |
| layer | The rendering and update layer. |
Registers an entity as belonging to this scene.
| entity | The entity to add. |
Checks if a specific entity is part of this scene.
| entity | The entity to check for. |


Gets whether the scene locks updates on lower layers.

Gets whether the scene is a UI panel.

Pure virtual function to handle scene-specific SDL events.
| event | The SDL_Event to process. |

Removes an entity from this scene's management.
| entity | The entity to remove. |
