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