Animatedsprite ya no permite indices fuera de rango

This commit is contained in:
2022-09-25 13:00:39 +02:00
parent 66840ebf11
commit 8a4d2a541d
18 changed files with 79 additions and 71 deletions

View File

@@ -232,7 +232,7 @@ void Player::checkState()
{
vx = 0.0f;
vy = maxVY;
++fallCounter;
fallCounter++;
playFallSound();
}
@@ -249,7 +249,7 @@ void Player::checkState()
else if (state == s_jumping)
{
++jumpCounter;
jumpCounter++;
playJumpSound();
}
}