Skip to content

Commit

Permalink
hotfix #999(2)
Browse files Browse the repository at this point in the history
  • Loading branch information
azlymoon committed May 29, 2022
2 parents d86dc9f + 8f3642c commit 82fa852
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Player.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def __init__(self, pos, obstacle_sprites, GameManager):
self.obstacle_sprites = obstacle_sprites
self.GameManager = GameManager


def import_assets(self):
path = './img/'
for animation in self.animations.keys():
Expand Down Expand Up @@ -171,8 +172,11 @@ def check_health(self):
if self.health <= 0:
self.GameManager.game_running = False

def check_health(self):
if self.health == 0:
self.GameManager.game_running = False

def update(self):
print(self.health)
self.check_health()
self.get_input()
self.get_status()
Expand Down
1 change: 0 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,3 @@ def run(self):
pygame.init()
Manager = GameManager()
Manager.run()

0 comments on commit 82fa852

Please sign in to comment.