update AI and doc

This commit is contained in:
2026-04-16 15:51:10 +02:00
parent cf285153cf
commit a51e94d4d3
9 changed files with 66 additions and 43 deletions

View File

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