add gamestate, doc and fix
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user