beet 0.0.8

Malleable Application Framework
//! This example demonstrates utility ai with constant score providers,
//! see `malenia.rs` for custom score providers
//!
use beet::prelude::*;

#[rustfmt::skip]
fn main() {
	App::new()
		.add_plugins((
			ControlFlowPlugin::default(),
			DebugFlowPlugin::default()
		))
		.world_mut()
		.spawn((
			Name::new("ScoreFlow will select the highest score"),
			HighestScore::default(),
			children![
				(
					Name::new("this child does not run"),
					EndWith(Score(0.4)),
				),
				(
					Name::new("this child runs"),
					EndWith(Score(0.6)),
				)
			]
		))
		.trigger_target(GetOutcome).flush();
}