Chore(Game Logic) - Update player life increment logic to respect max lives; fix typo in SpeedBoost collision handling method.

This commit is contained in:
Félix MARQUET
2025-04-09 13:37:53 +02:00
parent a76a713e2e
commit 3e91e855bc
2 changed files with 2 additions and 2 deletions

View File

@@ -487,7 +487,7 @@ class Player(Entity):
coin_sound = pygame.mixer.Sound("assets/sound/Coin.mp3")
coin_sound.play()
self.coins += 1
if self.lives != 5:
if self.lives < self.max_lives:
self.lives += 1
self.draw_lives(surface)
if speedrun_timer:

View File

@@ -70,7 +70,7 @@ class SpeedBoost(Entity):
# Simple floating animation
self.rect.y += [-1, 0, 1, 0][self.animation_frame]
def on_collision(self, player, game_ressources):
def on_collision(self, player, game_resources):
"""
Handle speed boost collision with player