mirror of
https://github.com/BreizhHardware/bloubloulespoissons.git
synced 2026-03-18 21:50:32 +01:00
fix: update player sprite timing and tick threshold
This commit is contained in:
@@ -25,17 +25,17 @@ void Player::draw(SDL_Renderer* renderer) {
|
||||
case 0:
|
||||
this->currentSprite = PLAYER_SPRITE_1;
|
||||
break;
|
||||
case 5:
|
||||
case 50:
|
||||
this->currentSprite = PLAYER_SPRITE_2;
|
||||
break;
|
||||
case 8:
|
||||
case 150:
|
||||
this->currentSprite = PLAYER_SPRITE_3;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->ticks >= 8) {
|
||||
if (this->ticks >= 150) {
|
||||
this->ticks = 0;
|
||||
} else {
|
||||
this->ticks++;
|
||||
|
||||
Reference in New Issue
Block a user