File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ class AsyncActionNode(StatefulActionNode):
32
32
this method can return a final `NodeStatus` value to indicate its exit
33
33
condition.
34
34
35
+ Optionally, subclasses can override the `on_halted()` method which is called
36
+ when the tree halts. The default implementation does nothing. The `run()`
37
+ method will never be called again after a halt.
38
+
35
39
Note:
36
40
It is the responsibility of the action author to not block the main
37
41
behavior tree loop with long-running tasks. `yield` calls should be
@@ -64,3 +68,7 @@ def on_running(self) -> NodeStatus:
64
68
# Otherwise, just assume the action finished successfully.
65
69
else :
66
70
return NodeStatus .SUCCESS
71
+
72
+ def on_halted (self ):
73
+ # Default action: do nothing
74
+ pass
You can’t perform that action at this time.
0 commit comments