update AI and doc
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user