mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 21:13:16 +00:00
Fix flappy animation.
This commit is contained in:
parent
ee665e1089
commit
9a0eacc91c
1 changed files with 3 additions and 3 deletions
|
@ -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 h = 0; h < FLAPPY_BIRD_HEIGHT; h++) {
|
||||||
for(int w = 0; w < FLAPPY_BIRD_WIDTH; w++) {
|
for(int w = 0; w < FLAPPY_BIRD_WIDTH; w++) {
|
||||||
// Switch animation
|
// Switch animation
|
||||||
int bird = 0;
|
int bird = 1;
|
||||||
if(game_state->bird.gravity < -0.5)
|
if(game_state->bird.gravity < -0.5)
|
||||||
bird = 1;
|
bird = 0;
|
||||||
else
|
else if(game_state->bird.gravity > 0.5)
|
||||||
bird = 2;
|
bird = 2;
|
||||||
|
|
||||||
// Draw bird pixels
|
// Draw bird pixels
|
||||||
|
|
Loading…
Reference in a new issue