R-Type 0.1
Loading...
Searching...
No Matches
rtk::systems::MovementSystem Class Referencefinal

Moves entities according to their Velocity. More...

#include <systems/MovementSystem.hpp>

Inheritance diagram for rtk::systems::MovementSystem:
[legend]

Public Member Functions

void onStart (rtk::ecs::Registry &) override
 Logs that the system is loaded.
 
void update (rtk::ecs::Registry &reg, float dt) override
 Adds velocity times elapsed time to every position.
 
void onStop (rtk::ecs::Registry &) override
 Does nothing.
 

Detailed Description

Moves entities according to their Velocity.

Member Function Documentation

◆ update()

void rtk::systems::MovementSystem::update ( rtk::ecs::Registry & reg,
float dt )
inlineoverride

Adds velocity times elapsed time to every position.

Parameters
regRegistry holding the entities.
dtElapsed time since the last frame, in seconds.