Gameplay de la recherche dans les dossiers #44

Merged
CoCo_Sol merged 32 commits from directory-search into main 2023-10-30 00:49:00 +00:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 119ae0c899 - Show all commits

View file

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