ai refactoring

This commit is contained in:
2026-05-22 00:06:23 +02:00
parent b22f219a5e
commit 0c237430ea
10 changed files with 67 additions and 68 deletions

View File

@@ -1,13 +1,9 @@
extends State
const IDLE_STATE_ID: StringName = &"idle"
@onready var agent: AIBase = owner
func enter() -> void:
run_animation()
agent.navigate_to_random_point()
agent.run_walking_animation()
func physics_update(_delta) -> void:
if agent.nav_agent.is_navigation_finished():
transitioned.emit(self, IDLE_STATE_ID)
transitioned.emit(self, next_state_id)