Updatable Class
Interface for components that require per-frame updates. More...
Declaration
Derived Classes
| class | System |
|
Abstract base class for game systems. More... | |
Public Constructors Index
| Updatable ()=default | |
Public Destructor Index
| ~Updatable ()=default | |
Public Member Functions Index
| void | update (helios::engine::runtime::world::UpdateContext &updateContext) noexcept=0 |
|
Called each frame to update the component state. More... | |
Description
Interface for components that require per-frame updates.
Components implementing this interface will have their update() method called each frame by the owning GameObject. This enables frame-dependent behaviors such as physics simulation, animation, and input processing.
Example implementation: ```cpp class PhysicsComponent : public Component, public Updatable { public: void update(UpdateContext& ctx) noexcept override { velocity_ += gravity_ * ctx.deltaTime; position_ += velocity_ * ctx.deltaTime; } }; ```
Implementations must be noexcept to prevent exceptions from propagating during the game loop.
Definition at line 37 of file Updatable.ixx.
Public Constructors
Updatable()
| default |
Definition at line 41 of file Updatable.ixx.
Public Destructor
~Updatable()
| virtual default |
Definition at line 40 of file Updatable.ixx.
Public Member Functions
update()
| noexcept |
Called each frame to update the component state.
- Parameters
-
updateContext Context containing deltaTime, input state, and references to CommandBuffer and GameWorld.
Definition at line 49 of file Updatable.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.