From 1e26bc28512c5735a78d0891860769d4ec383f26 Mon Sep 17 00:00:00 2001 From: CoCo_Sol Date: Sat, 4 Nov 2023 19:46:22 +0100 Subject: [PATCH] fix erreur 2/2 --- src/scenes/story/boss_fight.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/scenes/story/boss_fight.py b/src/scenes/story/boss_fight.py index d4c78fb..1a01488 100644 --- a/src/scenes/story/boss_fight.py +++ b/src/scenes/story/boss_fight.py @@ -151,11 +151,11 @@ def __check_hurt(world: World): TODO """ for entity in world.query(Hurt, Sprite): - if world[Hurtable] == Hurtable.TRUE: - position = entity.get(Sprite).position - width, height = entity.get(Sprite).texture.get_size() + position = entity.get(Sprite).position + width, height = entity.get(Sprite).texture.get_size() - for shield in world.query(Velocity, Sprite): + for shield in world.query(Velocity, Sprite): + if world[Hurtable] == Hurtable.TRUE: shield_position = shield.get(Sprite).position shield_width, shield_height = shield.get(Sprite).texture.get_size() @@ -203,6 +203,7 @@ def __check_hurt(world: World): else: entity.destroy() world.new_entity().set(Coroutine(__set_hurtable_hurt(world))) + world.set(Hurtable.FALSE) def __defeat(world: World):