File tree Expand file tree Collapse file tree
scenes/game_elements/characters/enemies/guard/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,17 +171,6 @@ func _process(delta: float) -> void:
171171 if Engine .is_editor_hint () and not move_while_in_editor :
172172 return
173173
174- _process_state ()
175- guard_movement .move ()
176-
177- if state != State .ALERTED :
178- _update_player_awareness (delta )
179-
180- _update_animation ()
181-
182-
183- ## Updates the guard's movement behavior based on its current state.
184- func _process_state () -> void :
185174 match state :
186175 State .PATROLLING :
187176 if patrol_path :
@@ -200,6 +189,13 @@ func _process_state() -> void:
200189 State .ALERTED :
201190 guard_movement .stop_moving ()
202191
192+ guard_movement .move ()
193+
194+ if state != State .ALERTED :
195+ _update_player_awareness (delta )
196+
197+ _update_animation ()
198+
203199
204200## Changes how PlayerAwareness looks to reflect how close is the player to
205201## being detected
You can’t perform that action at this time.
0 commit comments