|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
Base class for all ECS systems. More...
#include <System.hpp>

Public Member Functions | |
| virtual | ~System ()=default |
| Virtual destructor for proper cleanup. | |
| virtual void | init (Registry ®istry) |
| Called once when the system is added to a group. | |
| virtual void | update (World &world)=0 |
| Called every frame to execute system logic. | |
| virtual void | shutdown (Registry ®istry) |
| Called once when the system is removed. | |
| void | setEnabled (bool enabled) |
| Enables or disables the system. | |
| bool | isEnabled () const |
| Checks if the system is enabled. | |
| void | setPriority (i32 priority) |
| Sets the system's execution priority. | |
| i32 | getPriority () const |
| Gets the system's execution priority. | |
Protected Attributes | |
| bool | enabled_ = true |
| Whether the system is enabled. | |
| i32 | priority_ = 0 |
| Execution priority (lower = earlier). | |
Base class for all ECS systems.
Systems contain the logic that operates on entities with specific component configurations. Derive from this class and override update() to implement game logic.
Definition at line 59 of file System.hpp.
|
virtualdefault |
Virtual destructor for proper cleanup.
|
inline |
Gets the system's execution priority.
Definition at line 125 of file System.hpp.
References priority_.
|
inlinevirtual |
Called once when the system is added to a group.
| registry | Reference to the ECS registry |
Override to perform one-time initialization such as caching component pools or loading resources.
Reimplemented in esengine::ecs::TransformSystem.
Definition at line 71 of file System.hpp.
|
inline |
Checks if the system is enabled.
Definition at line 106 of file System.hpp.
References enabled_.
|
inline |
Enables or disables the system.
| enabled | True to enable, false to disable |
Disabled systems are skipped during update().
Definition at line 100 of file System.hpp.
References enabled_.
|
inline |
Sets the system's execution priority.
| priority | Lower values execute first |
Systems in a SystemGroup are sorted by priority. Default priority is 0.
Definition at line 119 of file System.hpp.
References priority_.
Referenced by esengine::ecs::TransformSystem::TransformSystem().
|
inlinevirtual |
Called once when the system is removed.
| registry | Reference to the ECS registry |
Override to cleanup resources allocated in init().
Definition at line 88 of file System.hpp.
|
pure virtual |
Called every frame to execute system logic.
| world | The world context (registry, services, deltaTime) |
Pure virtual - must be overridden. This is where the main system logic goes.
Implemented in esengine::ecs::TransformSystem.
|
protected |
Whether the system is enabled.
Definition at line 129 of file System.hpp.
Referenced by isEnabled(), and setEnabled().
|
protected |
Execution priority (lower = earlier).
Definition at line 131 of file System.hpp.
Referenced by getPriority(), and setPriority().