Avoid killing two times the same ennemy
This commit is contained in:
parent
5c1a518ded
commit
b9f238bca9
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user