use beet::prelude::*;
fn main() {
let mut app = App::new();
app.add_plugins((
MinimalPlugins,
ControlFlowPlugin::default(),
DebugFlowPlugin::default(),
))
.world_mut()
.spawn((
Name::new("root"),
Sequence,
Repeat::if_success(),
children![
(
Name::new("fails on third run"),
SucceedTimes::new(2),
),
(
Name::new("some action to perform"),
EndWith(Outcome::Pass),
)
],
))
.trigger_target(GetOutcome);
app.update();
app.update();
println!("done, subsequent updates will have no effect");
app.update();
app.update();
app.update();
}