Bye les jeuns

This commit is contained in:
Tipragot 2023-11-05 19:16:59 +01:00
parent 341aa987da
commit 74ce12a352

View file

@ -326,24 +326,30 @@ def __defeat(world: World):
""" """
TODO TODO
""" """
if world[Life] <= 0 and IsRunning in world: if IsRunning in world:
world.remove(IsRunning) if world[Life] <= 0:
for entity in world.query(Coroutine): world.remove(IsRunning)
entity.destroy() for entity in world.query(Coroutine):
for entity in world.query(smooth.Target): entity.destroy()
entity.remove(smooth.Target) for entity in world.query(smooth.Target):
for entity in world.query(Animation): entity.remove(smooth.Target)
entity.remove(Animation) for entity in world.query(Animation):
entity.remove(Animation)
for entity in world.query(Player): for entity in world.query(Player):
entity.set( entity.set(
Animation( Animation(
"explosion", "explosion",
24, 24,
), ),
Sound(world[Assets].get_sound("death")), Sound(world[Assets].get_sound("death")),
)
world.new_entity().set(
Sprite(world[Assets].error_texture, order=20),
Animation("animation_bg_mort", 24),
) )
world.new_entity().set(Sprite(world[Assets].get_texture("background"))) elif len(world[Held]) > 0 and len(world.query(Animation)) == 0:
world[CurrentScene] = __new_game_scene()
def __wave(world: World): def __wave(world: World):