|
R-Type
Distributed multiplayer game engine in C++
|
System handling entity movement based on velocity. More...
#include <MovementSystem.hpp>


Public Member Functions | |
| MovementSystem ()=default | |
| Default constructor. | |
| ~MovementSystem () override=default | |
| Default destructor. | |
| void | update (Registry ®istry, float deltaTime) override |
| Updates entity positions based on their velocities. | |
| ComponentMask | getComponentMask () const override |
| Gets the component mask for this system. | |
Public Member Functions inherited from ecs::ISystem | |
| virtual | ~ISystem ()=default |
| Virtual destructor. | |
System handling entity movement based on velocity.
Updates entity positions by applying their velocity and speed. Requires Transform and Velocity components.
Definition at line 23 of file MovementSystem.hpp.
|
default |
Default constructor.
|
overridedefault |
Default destructor.
|
overridevirtual |
Gets the component mask for this system.
Implements ecs::ISystem.
Definition at line 31 of file MovementSystem.cpp.
Referenced by update().
|
overridevirtual |
Updates entity positions based on their velocities.
Applies velocity to transform positions for all moving entities.
Applies velocity vectors and speed to transform positions. Movement is frame-rate independent using deltaTime.
| registry | Reference to the ECS registry |
| deltaTime | Time elapsed since last frame (in seconds) |
Implements ecs::ISystem.
Definition at line 14 of file MovementSystem.cpp.
References ecs::Registry::getComponent(), getComponentMask(), ecs::Registry::getEntitiesWithMask(), ecs::Transform::getPosition(), and ecs::Transform::Vector2::x.
