Documentation ¶
Overview ¶
Package aitree implements a very basic behavior tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ForceFailure ¶
ForceFailure returns failure on completion.
func NewForceFailure ¶
func NewForceFailure(name string, child Node) *ForceFailure
NewForceFailure returns a new ForceFailure decorator.
func (*ForceFailure) Tick ¶
func (node *ForceFailure) Tick() State
Tick will execute the child and return failure on completion.
type ForceSuccess ¶
ForceSuccess returns success on completion.
func NewForceSuccess ¶
func NewForceSuccess(name string, child Node) *ForceSuccess
NewForceSuccess returns a new ForceSuccess decorator.
func (*ForceSuccess) Tick ¶
func (node *ForceSuccess) Tick() State
Tick will execute the child and return success on completion.
type Inverter ¶
Inverter implements an inverter decorator (success on failure and vice versa).
func NewInverter ¶
NewInverter returns a new Inverter decorator.
type Repeater ¶
Repeater implements a repeater logic decorator.
func NewRepeater ¶
NewRepeater returns a new repeater decorator.
type Retry ¶
Retry implements a retry logic decorator.
type Selector ¶
Selector implements a selector decorator node.
func NewSelector ¶
NewSelector returns a new selector decorator node.
type Sequence ¶
Sequence implements a sequence decorator node.
func NewSequence ¶
NewSequence returns a new sequence decorator node.