diff --git a/assets/story/boss_fight/hurt_shield.png b/assets/story/boss_fight/hurt_shield.png new file mode 100644 index 0000000..6f34acd Binary files /dev/null and b/assets/story/boss_fight/hurt_shield.png differ diff --git a/src/scenes/story/boss_fight.py b/src/scenes/story/boss_fight.py index f0cfe62..a352a8b 100644 --- a/src/scenes/story/boss_fight.py +++ b/src/scenes/story/boss_fight.py @@ -96,6 +96,12 @@ class IsRunning: """ +class Player: + """ + Composant qui represente le joueur. + """ + + def __initialize_world(world: World): """ TODO @@ -121,6 +127,7 @@ def __initialize_world(world: World): ), smooth.Target(world[ShieldPos]), Velocity(500 * world[Delta]), + Player(), ) @@ -152,7 +159,15 @@ def __set_hurtable_hurt(world: World): TODO """ world.set(Hurtable.FALSE) - yield wait(2) + + for entity in world.query(Player): + for i in range(16): + yield wait(0.125) + if i % 2 == 1: + entity[Sprite].texture = world[Assets].get_texture("shield") + else: + entity[Sprite].texture = world[Assets].get_texture("hurt_shield") + world.set(Hurtable.TRUE)