Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp::server::MovementSystem Class Reference

System to handle entity movement based on input components. More...

#include <MovementSystem.hpp>

Inheritance diagram for rtp::server::MovementSystem:
Collaboration diagram for rtp::server::MovementSystem:

Public Member Functions

 MovementSystem (ecs::Registry &registry)
 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.
 

Detailed Description

System to handle entity movement based on input components.

Definition at line 29 of file MovementSystem.hpp.

Constructor & Destructor Documentation

◆ MovementSystem()

rtp::server::MovementSystem::MovementSystem ( ecs::Registry registry)

Constructor for MovementSystem.

Parameters
registryReference to the entity registry

Definition at line 16 of file MovementSystem.cpp.

Member Function Documentation

◆ update()

void rtp::server::MovementSystem::update ( float  dt)
overridevirtual

Update movement system logic for one frame.

Parameters
dtTime 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().

Member Data Documentation

◆ _registry

ecs::Registry& rtp::server::MovementSystem::_registry
private

Reference to the entity registry.

Definition at line 44 of file MovementSystem.hpp.

Referenced by update().


The documentation for this class was generated from the following files: