Add addons
This commit is contained in:
parent
2c862b2235
commit
3367bad24f
527 changed files with 36197 additions and 0 deletions
15
Sprout/addons/beehave/nodes/leaves/leaf.gd
Normal file
15
Sprout/addons/beehave/nodes/leaves/leaf.gd
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
## Base class for all leaf nodes of the tree.
|
||||
@tool
|
||||
class_name Leaf extends BeehaveNode
|
||||
@icon("../../icons/category_leaf.svg")
|
||||
|
||||
|
||||
func _get_configuration_warnings() -> PackedStringArray:
|
||||
var warnings: PackedStringArray = []
|
||||
|
||||
var children: Array[Node] = get_children()
|
||||
|
||||
if children.any(func(x): return x is BeehaveNode):
|
||||
warnings.append("Leaf nodes should not have any child nodes. They won't be ticked.")
|
||||
|
||||
return warnings
|
||||
Loading…
Add table
Add a link
Reference in a new issue