mirror of
https://github.com/BreizhHardware/project_sanic.git
synced 2026-03-18 21:50:33 +01:00
Chore(Game Logic) - Update player life increment logic to respect max lives; fix typo in SpeedBoost collision handling method.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user