Ajout d'une mechanique de dossier bloqués, et de nouvelles animations #52
|
@ -107,6 +107,12 @@ class UserDirectory:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class BlockedDirectory:
|
||||||
|
"""
|
||||||
|
Un component qui permet de savoir que le dossier est bloqué.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class GameStarted:
|
class GameStarted:
|
||||||
"""
|
"""
|
||||||
Une ressource qui permet de savoir que le jeu commence.
|
Une ressource qui permet de savoir que le jeu commence.
|
||||||
|
@ -249,6 +255,16 @@ def __attacks(world: World):
|
||||||
Centered(),
|
Centered(),
|
||||||
Texture("attack_point.png"),
|
Texture("attack_point.png"),
|
||||||
)
|
)
|
||||||
|
# On definit les directories comme bloques
|
||||||
|
for _ in range(3):
|
||||||
|
position = Vec2(
|
||||||
|
random.randint(0, COLUMNS - 1),
|
||||||
|
random.randint(0, LINES - 1),
|
||||||
|
)
|
||||||
|
for entity in world.query(DirectoryPosition):
|
||||||
|
if entity[DirectoryPosition] == position and UserDirectory not in entity:
|
||||||
|
entity[BlockedDirectory] = BlockedDirectory()
|
||||||
|
|
||||||
world[AttackTimer] = AttackTimer(0.0)
|
world[AttackTimer] = AttackTimer(0.0)
|
||||||
world[AttackSpeed] = AttackSpeed(world[AttackSpeed] * 0.9)
|
world[AttackSpeed] = AttackSpeed(world[AttackSpeed] * 0.9)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue