fix erreur 2/2

This commit is contained in:
CoCo_Sol 2023-11-04 19:46:22 +01:00
parent 28037ae0ba
commit 1e26bc2851

View file

@ -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):