Class Engine::PositionSystem¶
ClassList > Engine > PositionSystem
A system that updates the Position component of entities.More...
#include <PositionSystem.hpp>
Inherits the following classes: Engine::System
Public Attributes inherited from Engine::System¶
See Engine::System
| Type | Name |
|---|---|
| std::set< Entity > | m_Entities |
Public Functions¶
| Type | Name |
|---|---|
| virtual void | Update (Registry & registry, float dt) Snapshots prevX/prevY/prevZ (and the moved flag) for all Positions. |
Public Functions inherited from Engine::System¶
See Engine::System
| Type | Name |
|---|---|
| virtual void | OnSceneUnloaded (Registry & registry) Called right before the current scene's entities are destroyed. |
| virtual void | Render (Registry & registry) World pass: drawn inside the active camera. |
| virtual void | RenderScreen (Registry & registry) Screen pass: drawn after the world, in window pixels. |
| virtual void | Update (Registry & registry, float dt) |
| virtual | ~System () = default |
Detailed Description¶
Snapshots previous coordinates for EVERY Position holder (not just System::m_Entities, which nothing fills automatically) so HierarchySystem always sees a fresh baseline. Must run after HierarchySystem in the update order (see HierarchyPlugin).
Public Functions Documentation¶
function Update¶
Snapshots prevX/prevY/prevZ (and the moved flag) for all Positions.
Parameters:
registryThe ECS registry containing the components.dtDelta time for framerate independent movement.
Implements Engine::System::Update
The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Systems/PositionSystem.hpp