another movement done

This commit is contained in:
Priec
2025-11-14 20:39:58 +01:00
parent a59192cf05
commit 528e38b428
5 changed files with 132 additions and 71 deletions

View File

@@ -0,0 +1,16 @@
// 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;
}