ajout de l'annimation quand on prend des degats
This commit is contained in:
parent
1522fd9f79
commit
7e0898d848
BIN
assets/story/boss_fight/hurt_shield.png
Normal file
BIN
assets/story/boss_fight/hurt_shield.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
|
@ -96,6 +96,12 @@ class IsRunning:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class Player:
|
||||||
|
"""
|
||||||
|
Composant qui represente le joueur.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
def __initialize_world(world: World):
|
def __initialize_world(world: World):
|
||||||
"""
|
"""
|
||||||
TODO
|
TODO
|
||||||
|
@ -121,6 +127,7 @@ def __initialize_world(world: World):
|
||||||
),
|
),
|
||||||
smooth.Target(world[ShieldPos]),
|
smooth.Target(world[ShieldPos]),
|
||||||
Velocity(500 * world[Delta]),
|
Velocity(500 * world[Delta]),
|
||||||
|
Player(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -152,7 +159,15 @@ def __set_hurtable_hurt(world: World):
|
||||||
TODO
|
TODO
|
||||||
"""
|
"""
|
||||||
world.set(Hurtable.FALSE)
|
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)
|
world.set(Hurtable.TRUE)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue