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):
3232 this method can return a final `NodeStatus` value to indicate its exit
3333 condition.
3434
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+
3539 Note:
3640 It is the responsibility of the action author to not block the main
3741 behavior tree loop with long-running tasks. `yield` calls should be
@@ -64,3 +68,7 @@ def on_running(self) -> NodeStatus:
6468 # Otherwise, just assume the action finished successfully.
6569 else :
6670 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