speed control of player and the ground

This commit is contained in:
Filipriec
2025-11-15 20:44:05 +01:00
parent 11f5eb7fd1
commit 0ff2be6564
3 changed files with 6 additions and 3 deletions

View File

@@ -19,8 +19,11 @@ void WalkingState::start_crawl() {
// TODO THIS NEEDS REDESIGN ACCORDING TO SPEED
void WalkingState::toggle_walk_frame() {
if (++walk_index >= 7) walk_index = 0;
if ((run_index += 3) >= 7) run_index = 0;
}
// void RunningState::toggle_run_frame() {
// if (++run_index >= 7) run_index = 0;
// }
FrameSelection WalkingState::get_frame_selection() const {
FrameSelection f{MovementType::Walk, 0};