Files
storybook/tests/examples/behavior_and_lifearc.sb

51 lines
750 B
Plaintext
Raw Normal View History

// Test behavior trees and life arcs
life_arc Childhood {
state infant {
on ready -> toddler
}
state toddler {
on ready -> child
}
state child {
on ready -> teen
}
}
behavior SimpleBehavior {
walk_around
}
behavior SequenceBehavior {
then {
check_energy
move_to_location
perform_action
}
}
behavior SelectorBehavior {
choose {
try_option_a
try_option_b
fallback
}
}
behavior NestedBehavior {
then {
choose {
check_condition_a
check_condition_b
}
perform_action
}
}
behavior WithSubtree {
then {
include helpers::check_preconditions
main_action
}
}