System Class
Abstract base class for game systems. More...
Declaration
Base class
| class | Updatable |
|
Interface for components that require per-frame updates. More... | |
Derived Classes
| class | LevelBoundsBehaviorSystem |
|
System that handles entity behavior when colliding with level boundaries. More... | |
| class | ProjectileSpawnSystem |
|
System that spawns projectiles for entities with active ShootComponents. More... | |
| class | DamageOnCollisionSystem |
|
System that processes solid collision events and applies damage. More... | |
| class | HealthUpdateSystem |
|
System that detects dead entities and issues despawn commands. More... | |
| class | TwinStickInputSystem |
|
Input component for twin-stick gamepad control schemes. More... | |
| class | DelayedComponentEnablerSystem |
|
System that processes delayed component activations each frame. More... | |
| class | CombatScoringSystem |
|
System that processes death events and awards scores. More... | |
| class | ScoreObserverClearSystem |
|
System that clears the hasUpdate flag on ScoreObserverComponents. More... | |
| class | ScoreObserverSystem |
|
System that updates ScoreObserverComponents from their referenced ScorePools. More... | |
| class | GameObjectSpawnSystem |
|
System that evaluates spawn conditions and enqueues spawn commands. More... | |
| class | ChaseSystem |
|
System that steers entities towards their chase targets. More... | |
| class | BoundsUpdateSystem |
|
System that updates AABB colliders based on entity transforms. More... | |
| class | CollisionStateClearSystem |
|
System that clears collision state components at the end of each frame. More... | |
| class | CollisionStateResponseSystem |
|
System that processes collision states and executes configured behaviors. More... | |
| class | GridCollisionDetectionSystem |
|
Collision detection system using uniform spatial partitioning for Broadphase and AABB overlaps in the Narrowphase. More... | |
| class | Move2DSystem |
|
System that processes 2D movement for entities. More... | |
| class | SpinSystem |
|
System that updates the spin rotation of entities. More... | |
| class | SteeringSystem |
|
System that processes heading and rotation physics. More... | |
| class | ComposeTransformSystem |
|
System that composes the final ComposeTransformComponent from state components. More... | |
| class | ScaleSystem |
|
System that applies scaling to entities based on their ScaleStateComponent. More... | |
| class | TransformClearSystem |
|
System that clears the dirty state of TransformComponents and ScaleComponents at the end of a frame. More... | |
| class | SceneSyncSystem |
|
System that synchronizes TransformComponents with SceneNodes. More... | |
| class | Score2UiTextUpdateSystem |
|
System for binding score values to UI text components. More... | |
| class | UiTransformSystem |
|
System for computing UI element screen positions. More... | |
| class | UiTextBoundsUpdateSystem |
|
System for updating UI text element bounds. More... | |
Public Destructor Index
| ~System ()=default | |
|
Virtual destructor for proper cleanup of derived systems. More... | |
Public Member Functions Index
| void | init (helios::engine::runtime::world::GameWorld &gameWorld) noexcept |
|
Called when the system is initialized by the GameWorld. More... | |
| void | update (helios::engine::runtime::world::UpdateContext &updateContext) noexcept override=0 |
|
Updates the system each frame. More... | |
Protected Member Attributes Index
| helios::engine::runtime::world::GameWorld * | gameWorld_ = nullptr |
|
Pointer to the GameWorld this system belongs to. More... | |
Description
Abstract base class for game systems.
Systems are global game logic processors that operate on the GameWorld rather than individual GameObjects, ideal for cross-cutting concerns like physics simulation, collision detection, or object pooling.
Systems are added to a GameWorld and receive update calls each frame. The `onAdd()` callback provides access to the GameWorld for initialization.
Example usage: ```cpp class PhysicsSystem : public System { public: void update(UpdateContext& ctx) noexcept override { // Apply physics to all rigid bodies } };
gameWorld.addSystem(std::make_unique<PhysicsSystem>()); ```
Definition at line 38 of file System.ixx.
Public Destructor
~System()
| virtual default |
Virtual destructor for proper cleanup of derived systems.
Definition at line 55 of file System.ixx.
Public Member Functions
init()
| inline noexcept virtual |
Called when the system is initialized by the GameWorld.
Override this method to perform initialization that requires access to the GameWorld (e.g., querying the scene graph, registering event handlers).
- Parameters
-
gameWorld The GameWorld this system is being added to.
@deprected use init
Definition at line 68 of file System.ixx.
Reference gameWorld_.
update()
| noexcept |
Updates the system each frame.
- Parameters
-
updateContext The update context containing frame timing information.
Definition at line 79 of file System.ixx.
Protected Member Attributes
gameWorld_
| protected |
Pointer to the GameWorld this system belongs to.
Set by `onAdd()` when the system is registered with a GameWorld. Non-owning pointer; valid for the lifetime of the system.
Definition at line 48 of file System.ixx.
Referenced by init, helios::engine::mechanics::bounds::systems::LevelBoundsBehaviorSystem::update, helios::engine::mechanics::combat::systems::ProjectileSpawnSystem::update, helios::engine::mechanics::health::systems::HealthUpdateSystem::update, helios::engine::mechanics::lifecycle::systems::DelayedComponentEnablerSystem::update, helios::engine::mechanics::scoring::systems::ScoreObserverClearSystem::update, helios::engine::mechanics::scoring::systems::ScoreObserverSystem::update, helios::engine::modules::ai::systems::ChaseSystem::update, helios::engine::modules::physics::collision::systems::BoundsUpdateSystem::update, helios::engine::modules::physics::collision::systems::CollisionStateClearSystem::update, helios::engine::modules::physics::collision::systems::CollisionStateResponseSystem::update, helios::engine::modules::physics::collision::systems::GridCollisionDetectionSystem::update, helios::engine::modules::physics::motion::systems::Move2DSystem::update, helios::engine::modules::physics::motion::systems::SpinSystem::update, helios::engine::modules::physics::motion::systems::SteeringSystem::update, helios::engine::modules::spatial::transform::systems::ComposeTransformSystem::update, helios::engine::modules::spatial::transform::systems::ScaleSystem::update, helios::engine::modules::spatial::transform::systems::TransformClearSystem::update, helios::engine::modules::systems::scene::SceneSyncSystem::update, helios::engine::modules::ui::binding::systems::Score2UiTextUpdateSystem::update, helios::engine::modules::ui::transform::systems::UiTransformSystem::update and helios::engine::modules::ui::widgets::systems::UiTextBoundsUpdateSystem::update.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.