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

View File

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