From 9a0eacc91c75d95fbf9d084db5df1c8e71df27d0 Mon Sep 17 00:00:00 2001 From: Sergey Monchenko <14358100+msvsergey@users.noreply.github.com> Date: Wed, 2 Nov 2022 14:40:54 +0300 Subject: [PATCH] Fix flappy animation. --- applications/plugins/flappy_bird/flappy_bird.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/plugins/flappy_bird/flappy_bird.c b/applications/plugins/flappy_bird/flappy_bird.c index 9895c2c31..d8ed3892b 100644 --- a/applications/plugins/flappy_bird/flappy_bird.c +++ b/applications/plugins/flappy_bird/flappy_bird.c @@ -217,10 +217,10 @@ static void flappy_game_render_callback(Canvas* const canvas, void* ctx) { for(int h = 0; h < FLAPPY_BIRD_HEIGHT; h++) { for(int w = 0; w < FLAPPY_BIRD_WIDTH; w++) { // Switch animation - int bird = 0; + int bird = 1; if(game_state->bird.gravity < -0.5) - bird = 1; - else + bird = 0; + else if(game_state->bird.gravity > 0.5) bird = 2; // Draw bird pixels