public interface Behavior
Goal
API, which can be made backwards compatible by extending
BehaviorGoalAdapter
.
A behavior is a common term for the parts of a behavior tree, which is a simple directed acyclic graph (DAG)
for AI that is easy for designers to use. It is a simple state machine using BehaviorStatus
as the separate
states.
This can be represented as shouldExecute() returning true -> RUNNING -> FAILURE | SUCCESS. The graph is made up of
many Selector
s and Sequence
s, with the leaf nodes being concrete actions.Modifier and Type | Method and Description |
---|---|
void |
reset()
Resets the behavior and any state it is holding.
|
BehaviorStatus |
run()
Ticks the behavior, optionally changing the state that it is in.
|
boolean |
shouldExecute() |
void reset()
BehaviorStatus run()
boolean shouldExecute()
Copyright © 2021. All rights reserved.