Method: BehaviorTree::Sequence#on_tick
- Defined in:
- lib/behavior_tree/control_nodes/sequence.rb
#on_tick ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/behavior_tree/control_nodes/sequence.rb', line 6 def on_tick tick_each_children do |child| return status.running! if child.status.running? if child.status.failure? halt! # Halt, but set success only to children, not to self. # Self status must be overriden to failure. status.failure! return end end # Both self and children have the status set to success. halt! end |