diff --git a/assets/textures/animations/search_directory/info.json b/assets/textures/animations/search_directory/info.json index 5aee946..ff880c4 100644 --- a/assets/textures/animations/search_directory/info.json +++ b/assets/textures/animations/search_directory/info.json @@ -1,5 +1,4 @@ { - "end_image": "directory.png", "offset": { "x": 8, "y": -83 diff --git a/src/scenes/directory_search.py b/src/scenes/directory_search.py index 979379f..1dfb7fb 100644 --- a/src/scenes/directory_search.py +++ b/src/scenes/directory_search.py @@ -162,8 +162,12 @@ def __attacks(world: World): world[AttackTimer] = AttackTimer(world[AttackTimer] + world[Delta]) timer = world[AttackTimer] if timer >= world[AttackSpeed] and world[State] == State.MOVING: - world[State] = State.SEARCHING - for entity in world.query(AttackPoint): + entities = world.query(AttackPoint) + if len(entities) > 0: + world[State] = State.SEARCHING + else: + world[State] = State.WAITING + for entity in entities: position = entity[AttackPoint] for directory_entity in world.query(DirectoryPosition): if directory_entity[DirectoryPosition] == position: @@ -173,9 +177,9 @@ def __attacks(world: World): del entity[Order] del entity[Centered] del entity[Texture] - elif timer >= world[AttackSpeed] + 4 and world[State] == State.SEARCHING: + elif timer >= world[AttackSpeed] + 4.5 and world[State] == State.SEARCHING: world[State] = State.WAITING - elif timer >= world[AttackSpeed] + 5 and world[State] == State.WAITING: + elif timer >= world[AttackSpeed] + 7 and world[State] == State.WAITING: world[State] = State.MOVING for _ in range(10): position = AttackPoint( @@ -187,7 +191,7 @@ def __attacks(world: World): Position(position.screen_position(State.MOVING)), Order(50), Centered(), - Texture("loupe.png"), + Texture("attack_point.png"), ) world[AttackTimer] = AttackTimer(0.0) world[AttackSpeed] = AttackSpeed(world[AttackSpeed] * 0.9)