TappyPlane (QuickWings rewrite/fix) #5

Open
brxxh wants to merge 13 commits from brxxh/paradiso:tappyplane into main
Showing only changes of commit 64311c8a4d - Show all commits

View file

@ -376,7 +376,7 @@ struct Plane {
init_aabb();
}
void update(const paradiso::Window::KeyboardInputStack& input) {
void update_animation() {
if (anim_counter < ANIM_INTERVAL) {
anim_counter++;
} else {
@ -389,6 +389,10 @@ struct Plane {
anim_direction = 1;
}
}
}
void update(const paradiso::Window::KeyboardInputStack& input) {
update_animation();
if (input.size() && input.top().key == ACTION_KEY &&
input.top().action == 1) {
@ -654,6 +658,7 @@ struct App {
}
background.update();
plane.update_animation(); // Only the animation.
ground.update();
start_ui.update();
} else if (game_state == GameState::Playing) {