Fix les annimations

This commit is contained in:
Tipragot 2023-10-29 23:04:39 +01:00
parent c2681326dd
commit 119ae0c899
2 changed files with 5 additions and 2 deletions

View file

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -37,6 +37,7 @@ class State(Enum):
MOVING = 0
SEARCHING = 1
WAITING = 2
class SelectedDirectory:
@ -172,7 +173,9 @@ def __attacks(world: World):
del entity[Order]
del entity[Centered]
del entity[Texture]
elif timer >= world[AttackSpeed] + 5 and world[State] == State.SEARCHING:
elif timer >= world[AttackSpeed] + 4 and world[State] == State.SEARCHING:
world[State] = State.WAITING
elif timer >= world[AttackSpeed] + 5 and world[State] == State.WAITING:
world[State] = State.MOVING
for _ in range(10):
position = AttackPoint(
@ -195,7 +198,7 @@ def __move_directories(world: World):
Permet de déplacer les dossiers avec la souris.
"""
# Si on n'est pas dans le bon state on annule
if world[State] != State.MOVING:
if world[State] == State.SEARCHING:
return
# On met à jour la séléction