Fix end
This commit is contained in:
parent
2c7bcc41cc
commit
024be68ae8
|
@ -328,8 +328,14 @@ def __defeat(world: World):
|
|||
"""
|
||||
if world[Life] <= 0 and IsRunning in world:
|
||||
world.remove(IsRunning)
|
||||
for entity in world.query(Coroutine):
|
||||
entity.destroy()
|
||||
for entity in world.query(smooth.Target):
|
||||
entity.remove(smooth.Target)
|
||||
for entity in world.query(Animation):
|
||||
entity.remove(Animation)
|
||||
|
||||
for entity in world.query(Player):
|
||||
print("ANIMATIONS")
|
||||
entity.set(
|
||||
Animation(
|
||||
"explosion",
|
||||
|
@ -337,9 +343,6 @@ def __defeat(world: World):
|
|||
),
|
||||
Sound(world[Assets].get_sound("death")),
|
||||
)
|
||||
entity.remove(smooth.Target)
|
||||
for entity in world.query(without=(Player,)):
|
||||
entity.destroy()
|
||||
world.new_entity().set(Sprite(world[Assets].get_texture("background")))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue