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 @@ -178,18 +178,21 @@ func _process(delta: float) -> void:
178178 guard_movement .set_destination (target_position )
179179 else :
180180 guard_movement .stop_moving ()
181+ guard_movement .move ()
182+ State .WAITING :
183+ guard_movement .move ()
184+ State .DETECTING :
185+ guard_movement .move ()
181186 State .INVESTIGATING :
182187 guard_movement .set_destination (last_seen_position )
188+ guard_movement .move ()
183189 State .RETURNING :
184190 if breadcrumbs :
185191 var target_position : Vector2 = breadcrumbs .back ()
186192 guard_movement .set_destination (target_position )
187193 else :
188194 state = State .PATROLLING
189- State .ALERTED :
190- guard_movement .stop_moving ()
191-
192- guard_movement .move ()
195+ guard_movement .move ()
193196
194197 if state != State .ALERTED :
195198 _update_player_awareness (delta )
@@ -288,6 +291,7 @@ func _set_state(new_state: State) -> void:
288291 player_awareness .ratio = 1.0
289292 player_awareness .tint_progress = Color .RED
290293 player_awareness .visible = true
294+ guard_movement .stop_moving ()
291295 State .INVESTIGATING :
292296 breadcrumbs .push_back (global_position )
293297 State .WAITING :
You can’t perform that action at this time.
0 commit comments