From 024be68ae82f48a6869e21ea88d9a54c016b836b Mon Sep 17 00:00:00 2001 From: Tipragot Date: Sun, 5 Nov 2023 19:05:36 +0100 Subject: [PATCH] Fix end --- src/scenes/story/boss_fight.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/scenes/story/boss_fight.py b/src/scenes/story/boss_fight.py index 25ddfec..cd69a1b 100644 --- a/src/scenes/story/boss_fight.py +++ b/src/scenes/story/boss_fight.py @@ -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")))