Exemplo n.º 1
0
 def damage(self, damage):
     Character.damage(self, damage)
     if self.hp <= 0 and self.on_play_mode:
         self.kill()
         self.image = self.image_broken
         pg.sprite.Sprite.__init__(self, self.game.characters_sprites)
         pg.time.delay(400)
         pg.event.post(pg.event.Event(PLAYER_GAME_OVER))
Exemplo n.º 2
0
 def damage(self, damage):
     Character.damage(self, damage)
     if self.hp <= 0:
         if self.on_play_mode:
             pg.event.post(pg.event.Event(PLAYER_GAME_OVER))