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
"""
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)
if IsRunning in world:
if world[Life] <= 0:
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):
entity.set(
Animation(
"explosion",
24,
),
Sound(world[Assets].get_sound("death")),
for entity in world.query(Player):
entity.set(
Animation(
"explosion",
24,
),
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):