Behavior Tree addon

This commit is contained in:
Tony Bark 2023-01-21 04:04:13 -05:00
parent 5de5a0c315
commit 5fa863114a
50 changed files with 1762 additions and 3 deletions

View file

@ -0,0 +1,17 @@
extends Decorator
class_name InverterDecorator, "../../icons/inverter.svg"
func tick(action, blackboard):
for c in get_children():
var response = c.tick(action, blackboard)
if response == SUCCESS:
return FAILURE
if response == FAILURE:
return SUCCESS
if c is Leaf and response == RUNNING:
blackboard.set("running_action", c)
return RUNNING