14 lines
471 B
GDScript
14 lines
471 B
GDScript
## A node in the behaviour tree. Every node must return `SUCCESS`, `FAILURE` or
|
|
## `RUNNING` when ticked.
|
|
@tool
|
|
class_name BeehaveNode extends BeehaveTree
|
|
|
|
## Executes this node and returns a status code.
|
|
## This method must be overwritten.
|
|
func tick(actor: Node, blackboard: Blackboard) -> int:
|
|
return SUCCESS
|
|
|
|
|
|
## Called when this node needs to be interrupted before it can return FAILURE or SUCCESS.
|
|
func interrupt(actor: Node, blackboard: Blackboard) -> void:
|
|
pass
|