update AI and doc
This commit is contained in:
@@ -3,10 +3,13 @@ extends CharacterBody3D
|
||||
class_name AIBase
|
||||
|
||||
@export var speed: float = 4.0
|
||||
@export var enable_state_machine: bool = true:
|
||||
var _enable_state_machine: bool = true
|
||||
@export var enable_state_machine: bool:
|
||||
set(value):
|
||||
enable_state_machine = value
|
||||
_enable_state_machine = value
|
||||
toggle_enable_state_machine()
|
||||
get:
|
||||
return _enable_state_machine
|
||||
|
||||
|
||||
@onready var patrol_radius_shape: CollisionShape3D = $%PatrolRadiusShape
|
||||
@@ -19,10 +22,10 @@ func _ready() -> void:
|
||||
toggle_enable_state_machine()
|
||||
|
||||
func toggle_enable_state_machine() -> void:
|
||||
state_machine.enable = enable_state_machine
|
||||
state_machine.enable = _enable_state_machine
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if !enable_state_machine:
|
||||
if !_enable_state_machine:
|
||||
return
|
||||
|
||||
state_machine.physics_process(delta)
|
||||
|
||||
Reference in New Issue
Block a user