Avoid killing two times the same ennemy

This commit is contained in:
theo@manjaro 2021-12-07 22:23:10 +01:00
parent 5c1a518ded
commit b9f238bca9
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ class Ennemy(Movable):
else:
if self.candie:
for rect in self.player.hitrects:
if self.rect.colliderect(rect):
if not self.dead and self.rect.colliderect(rect):
# Die
self.dead = True
self.deadtrigger()