add gamestate, doc and fix

This commit is contained in:
2026-04-16 11:01:04 +02:00
parent dc0bf0ba37
commit e02bd1819f
29 changed files with 466 additions and 71 deletions

View File

@@ -9,9 +9,9 @@ class_name AIBase
toggle_enable_state_machine()
@onready var patrol_radius_shape: CollisionShape3D = $PatrolRadiusShape
@onready var nav_agent: NavigationAgent3D = $NavigationAgent3D
@onready var state_machine: StateMachine = $StateMachine
@onready var patrol_radius_shape: CollisionShape3D = $%PatrolRadiusShape
@onready var nav_agent: NavigationAgent3D = $%NavigationAgent3D
@onready var state_machine: StateMachine = $%StateMachine
func _ready() -> void:
@@ -19,7 +19,7 @@ func _ready() -> void:
toggle_enable_state_machine()
func toggle_enable_state_machine() -> void:
$StateMachine.enable = enable_state_machine
state_machine.enable = enable_state_machine
func _physics_process(delta: float) -> void:
if !enable_state_machine: