GodotProjects/Sprout/addons/beehave/nodes/beehave_tree.gd
2023-01-03 16:54:53 -07:00

20 lines
435 B
GDScript

## Base class for all parts of the behaviour tree.
@tool
class_name BeehaveTree extends Node
@icon("../icons/category_bt.svg")
enum {
SUCCESS,
FAILURE,
RUNNING
}
func _get_configuration_warnings() -> PackedStringArray:
var warnings: PackedStringArray = []
if get_children().any(func(x): return not (x is BeehaveNode)):
warnings.append("All children of this node should inherit from BeehaveNode class.")
return warnings