21 bool mouseButtonPressed;
103 std::vector<Entity*> entities;
Defines a component for collision detection.
Defines the core classes for the Entity-Component-System (ECS) architecture.
ComponentID getComponentTypeID() noexcept
Gets the unique ID for a given component type.
Definition ECS.h:39
A general-purpose object in the game world.
Definition ECS.h:84
An abstract class representing a distinct part of the game, like a main menu or a level.
Definition Scene.h:16
virtual void handleEvents(SDL_Event &event)=0
Pure virtual function to handle scene-specific SDL events.
virtual void reload()=0
Pure virtual function to reset the scene to its initial state.
void disableScene()
Deactivates all entities within the scene.
Definition Scene.cpp:43
std::string name
The unique name of the scene.
Definition Scene.h:18
const bool & getIsLocking() const
Gets whether the scene locks updates on lower layers.
Definition Scene.cpp:53
void removeEntityFromScene(Entity *entity)
Removes an entity from this scene's management.
Definition Scene.cpp:16
int buildIndex
The index of the scene for sequential loading.
Definition Scene.h:19
virtual void draw()=0
Pure virtual function for scene-specific drawing logic.
virtual void init()=0
Pure virtual function for scene-specific initialization logic.
virtual void update()=0
Pure virtual function for scene-specific update logic.
bool existsInScene(Entity *entity)
Checks if a specific entity is part of this scene.
Definition Scene.cpp:23
virtual void reloadWithState()=0
Pure virtual function to reload the scene while preserving some state (e.g., UI state).
void clearScene()
Removes all entities from the scene.
Definition Scene.cpp:32
void enableScene()
Activates all entities within the scene.
Definition Scene.cpp:37
void addEntityToScene(Entity &entity)
Registers an entity as belonging to this scene.
Definition Scene.cpp:12
int layer
The rendering layer, for handling multiple active scenes (e.g., UI panels).
Definition Scene.h:20
const bool & getIsPanel() const
Gets whether the scene is a UI panel.
Definition Scene.cpp:49