Update Game_V2.py

master
Gerhards Kristians Tillers 2024-03-04 07:05:03 +00:00
parent a493b07760
commit cb9ed69a60
1 changed files with 1 additions and 0 deletions

View File

@ -61,6 +61,7 @@ class Player(pygame.sprite.Sprite):
def get_health(self, amnount): def get_health(self, amnount):
if self.target_health < self.maximum_health: if self.target_health < self.maximum_health:
self.target_health += amnount self.target_health += amnount
pygame.mixer.Sound("Sounds/health_plus.mp3")
if self.target_health >= self.maximum_health: if self.target_health >= self.maximum_health:
self.target_health = self.maximum_health self.target_health = self.maximum_health