|
Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
|
System to handle entity movement based on input components. More...
#include <MovementSystem.hpp>
Public Member Functions | |
| MovementSystem (ecs::Registry ®istry) | |
| Constructor for MovementSystem. | |
| void | update (float dt) override |
| Update movement system logic for one frame. | |
Public Member Functions inherited from rtp::ecs::ISystem | |
| virtual | ~ISystem () noexcept=default |
Private Attributes | |
| ecs::Registry & | _registry |
| Reference to the entity registry. | |
System to handle entity movement based on input components.
Definition at line 29 of file MovementSystem.hpp.
| rtp::server::MovementSystem::MovementSystem | ( | ecs::Registry & | registry | ) |
Constructor for MovementSystem.
| registry | Reference to the entity registry |
Definition at line 16 of file MovementSystem.cpp.
|
overridevirtual |
Update movement system logic for one frame.
| dt | Time elapsed since last update in seconds |
Implements rtp::ecs::ISystem.
Definition at line 19 of file MovementSystem.cpp.
References _registry, rtp::ecs::components::Velocity::direction, rtp::net::Player, rtp::Vec2< T >::x, and rtp::ecs::Registry::zipView().
|
private |
Reference to the entity registry.
Definition at line 44 of file MovementSystem.hpp.
Referenced by update().