Skip to main content

System Class

Abstract base class for game systems. More...

Declaration

class helios::engine::ecs::System { ... }

Base class

classUpdatable

Interface for components that require per-frame updates. More...

Derived Classes

classLevelBoundsBehaviorSystem

System that handles entity behavior when colliding with level boundaries. More...

classProjectileSpawnSystem

System that spawns projectiles for entities with active ShootComponents. More...

classDamageOnCollisionSystem

System that processes solid collision events and applies damage. More...

classHealthUpdateSystem

System that detects dead entities and issues despawn commands. More...

classTwinStickInputSystem

Input component for twin-stick gamepad control schemes. More...

classDelayedComponentEnablerSystem

System that processes delayed component activations each frame. More...

classCombatScoringSystem

System that processes death events and awards scores. More...

classScoreObserverClearSystem

System that clears the hasUpdate flag on ScoreObserverComponents. More...

classScoreObserverSystem

System that updates ScoreObserverComponents from their referenced ScorePools. More...

classGameObjectSpawnSystem

System that evaluates spawn conditions and enqueues spawn commands. More...

classChaseSystem

System that steers entities towards their chase targets. More...

classBoundsUpdateSystem

System that updates AABB colliders based on entity transforms. More...

classCollisionStateClearSystem

System that clears collision state components at the end of each frame. More...

classCollisionStateResponseSystem

System that processes collision states and executes configured behaviors. More...

classGridCollisionDetectionSystem

Collision detection system using uniform spatial partitioning for Broadphase and AABB overlaps in the Narrowphase. More...

classMove2DSystem

System that processes 2D movement for entities. More...

classSpinSystem

System that updates the spin rotation of entities. More...

classSteeringSystem

System that processes heading and rotation physics. More...

classComposeTransformSystem

System that composes the final ComposeTransformComponent from state components. More...

classScaleSystem

System that applies scaling to entities based on their ScaleStateComponent. More...

classTransformClearSystem

System that clears the dirty state of TransformComponents and ScaleComponents at the end of a frame. More...

classSceneSyncSystem

System that synchronizes TransformComponents with SceneNodes. More...

classScore2UiTextUpdateSystem

System for binding score values to UI text components. More...

classUiTransformSystem

System for computing UI element screen positions. More...

classUiTextBoundsUpdateSystem

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

voidinit (helios::engine::runtime::world::GameWorld &gameWorld) noexcept

Called when the system is initialized by the GameWorld. More...

voidupdate (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 helios::engine::ecs::System::~System ()
virtual default

Virtual destructor for proper cleanup of derived systems.

Definition at line 55 of file System.ixx.

Public Member Functions

init()

virtual void helios::engine::ecs::System::init (helios::engine::runtime::world::GameWorld & gameWorld)
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.

68 virtual void init(helios::engine::runtime::world::GameWorld& gameWorld) noexcept {
69 gameWorld_ = &gameWorld;
70 }

Reference gameWorld_.

update()

void helios::engine::ecs::System::update (helios::engine::runtime::world::UpdateContext & updateContext)
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_

helios::engine::runtime::world::GameWorld* helios::engine::ecs::System::gameWorld_ = nullptr
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.