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

Scrolls background layers and wraps them to loop endlessly. More...

#include <systems/ParallaxSystem.hpp>

Inheritance diagram for rtk::systems::ParallaxSystem:
[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
 Moves each layer left and jumps it three tiles right once off screen.
 
void onStop (rtk::ecs::Registry &) override
 Does nothing.
 

Detailed Description

Scrolls background layers and wraps them to loop endlessly.

Member Function Documentation

◆ update()

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

Moves each layer left and jumps it three tiles right once off screen.

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