Add addons
This commit is contained in:
parent
2c862b2235
commit
3367bad24f
527 changed files with 36197 additions and 0 deletions
7
Sprout/addons/beehave/nodes/leaves/action.gd
Normal file
7
Sprout/addons/beehave/nodes/leaves/action.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
## Actions are leaf nodes that define a task to be performed by an actor.
|
||||
## Their execution can be long running, potentially being called across multiple
|
||||
## frame executions. In this case, the node should return `RUNNING` until the
|
||||
## action is completed.
|
||||
@tool
|
||||
class_name ActionLeaf extends Leaf
|
||||
@icon("../../icons/action.svg")
|
||||
5
Sprout/addons/beehave/nodes/leaves/condition.gd
Normal file
5
Sprout/addons/beehave/nodes/leaves/condition.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
## Conditions are leaf nodes that either return SUCCESS or FAILURE depending on
|
||||
## a single simple condition. They should never return `RUNNING`.
|
||||
@tool
|
||||
class_name ConditionLeaf extends Leaf
|
||||
@icon("../../icons/condition.svg")
|
||||
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