From 119ae0c8994cb9da904589fcbbc3063ec8b0494c Mon Sep 17 00:00:00 2001 From: Tipragot Date: Sun, 29 Oct 2023 23:04:39 +0100 Subject: [PATCH] Fix les annimations --- assets/textures/{loupe.png => attack_point.png} | Bin src/scenes/directory_search.py | 7 +++++-- 2 files changed, 5 insertions(+), 2 deletions(-) rename assets/textures/{loupe.png => attack_point.png} (100%) diff --git a/assets/textures/loupe.png b/assets/textures/attack_point.png similarity index 100% rename from assets/textures/loupe.png rename to assets/textures/attack_point.png diff --git a/src/scenes/directory_search.py b/src/scenes/directory_search.py index ee77c8f..a759dc9 100644 --- a/src/scenes/directory_search.py +++ b/src/scenes/directory_search.py @@ -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