Files
pvs/semestralka1/src/game/animation.cpp
2025-11-14 20:39:58 +01:00

17 lines
346 B
C++

// src/game/animation.cpp
#include "animation.h"
AnimationController::AnimationController() {
anim_timer.start();
}
bool AnimationController::tick(int speed) {
if (anim_timer.elapsed_time() >= ANIMATION_TICK) {
// speed determines scroll steps per tick
shift += speed;
anim_timer.reset();
return true;
}
return false;
}