diff --git a/doc_classes/BT.xml b/doc_classes/BT.xml new file mode 100644 index 0000000..2187edc --- /dev/null +++ b/doc_classes/BT.xml @@ -0,0 +1,24 @@ + + + + Base of [BTTask]. + + + + + + + + Task wasn't executed yet or execution was cancelled. + + + Task is being performed and hasn't finished yet. + + + Task has finished with failure. + + + Task has finished with success. + + + diff --git a/doc_classes/BTCondition.xml b/doc_classes/BTCondition.xml index b08a3c3..9ef152d 100644 --- a/doc_classes/BTCondition.xml +++ b/doc_classes/BTCondition.xml @@ -6,7 +6,7 @@ Base class for all [BehaviorTree] conditions. Extend [code]BTCondition[/code] to create your own conditions. Condition is a task in a [BehaviorTree] that checks for a specific condition before executing subsequent tasks and often used inside composite tasks to control the execution flow. It is used to verify the state of the environment, check for the presence of an enemy, or evaluate the health status of the agent. The use of [BehaviorTree] condition tasks can improve the efficiency of the system and avoid unnecessary actions. However, it may not be suitable for complex decision-making processes, and too many condition tasks can make the [BehaviorTree] difficult to read. - Conditions usually don't take multiple ticks to finish and return [constant BTTask.SUCCESS] or [constant BTTask.FAILURE] immeditely. + Conditions usually don't take multiple ticks to finish and return [code]SUCCESS[/code] or [code]BT.FAILURE[/code] immeditely. diff --git a/doc_classes/BTPlayer.xml b/doc_classes/BTPlayer.xml index 8dd0f13..11e39ea 100644 --- a/doc_classes/BTPlayer.xml +++ b/doc_classes/BTPlayer.xml @@ -12,7 +12,7 @@ - Returns last execution status. See [enum BTTask.TaskStatus]. + Returns last execution status. See [enum BT.Status]. diff --git a/doc_classes/BTTask.xml b/doc_classes/BTTask.xml index 361e8e9..51649f9 100644 --- a/doc_classes/BTTask.xml +++ b/doc_classes/BTTask.xml @@ -1,11 +1,11 @@ - + Base class for [BehaviorTree] tasks. Base class for all [BehaviorTree] tasks. A task is a building block in a [BehaviorTree] that represents a specific behavior or control flow. It is the basic unit of the Behavior Tree (BT) and is used to create complex behaviors by combining and nesting tasks in a hierarchy. - Tasks perform work and return their status with [method _tick]. See [enum TaskStatus]. + Tasks perform work and return their status with [method _tick]. See [enum BT.Status]. A Task can be an action, a condition, a composite, or a decorator. Each type of task has its own corresponding subclass: [BTAction], [BTCondition], [BTDecorator], [BTComposite]. [b]Note:[/b] Do not extend [code]BTTask[/code] directly for your own tasks, instead extend one of the subtypes above. @@ -15,14 +15,14 @@ - Called when task is "entered", i.e. when task is executed while not having a [constant RUNNING] [member status]. + Called when task is "entered", i.e. when task is executed while not having a [constant BT.RUNNING] [member status]. It is called before [method _tick] in the execution order. This method is used when preparation is needed before main work begins, usually when it takes more than one tick to finish the task. - Called when task is "exited", i.e. after [method _tick] returns [constant SUCCESS] or [constant FAILURE] status. + Called when task is "exited", i.e. after [method _tick] returns [constant BT.SUCCESS] or [constant BT.FAILURE] status. @@ -44,11 +44,11 @@ - + Called when task is "ticked", i.e. executed by [BTPlayer] or [BTState] during update. - Returns [enum TaskStatus]. + Returns [enum BT.Status]. *Note:* Tasks perform their main function by implementing this method. @@ -74,10 +74,10 @@ - + - Performs task's execution. During execution [method _enter] is called first, unless current task [member status] is [code]RUNNING[/code]. [method _tick] is called next to perform task's main function. If [constant SUCCESS] or [constant FAILURE] status is returned by [method _tick], [method _exit] will be called next. + Performs task's execution. During execution [method _enter] is called first, unless current task [member status] is [code]RUNNING[/code]. [method _tick] is called next to perform task's main function. If [constant BT.SUCCESS] or [constant BT.FAILURE] status is returned by [method _tick], [method _exit] will be called next. @@ -198,22 +198,8 @@ Elapsed time since the task was entered. Returns 0 when task is not [code]RUNNING[/code]. - - Last execution [enum TaskStatus] returned by [method _tick]. + + Last execution [enum BT.Status] returned by [method _tick]. - - - Task wasn't executed yet or execution was cancelled. - - - Task is being performed and hasn't finished yet. - - - Task has finished with failure. - - - Task has finished with success. - -