diff --git a/crates/beet_examples/src/plugins/beet_example_plugin.rs b/crates/beet_examples/src/plugins/beet_example_plugin.rs index c4763610..137ff6c2 100644 --- a/crates/beet_examples/src/plugins/beet_example_plugin.rs +++ b/crates/beet_examples/src/plugins/beet_example_plugin.rs @@ -5,6 +5,8 @@ use beet_spatial::prelude::*; use beetmash::prelude::*; use bevy::prelude::*; + +/// A running app with flow and spatial pub fn running_beet_example_plugin(app: &mut App) { app.add_plugins(( BeetmashDefaultPlugins::with_beetmash_assets(), diff --git a/crates/beet_examples/src/scenes/ml/fetch.rs b/crates/beet_examples/src/scenes/ml/fetch.rs index dc5d17c1..c95ef603 100644 --- a/crates/beet_examples/src/scenes/ml/fetch.rs +++ b/crates/beet_examples/src/scenes/ml/fetch.rs @@ -42,12 +42,12 @@ pub fn fetch_npc(mut commands: Commands) { Name::new("Fetch Behavior"), TargetAgent(agent), AssetRunOnReady::::new("default-bert.ron"), - // InsertSentenceOnUserInput::default(), - // InsertSentenceSteerTarget::::default(), - // RunOnSteerTargetInsert::default().with_source(agent), - // RunOnSteerTargetRemove::default().with_source(agent), - // ScoreFlow::default(), - // RemoveOnTrigger::::default(), + InsertSentenceOnUserInput::default(), + InsertSentenceSteerTarget::::default(), + RunOnSteerTargetInsert::default().with_source(agent), + RunOnSteerTargetRemove::default().with_source(agent), + ScoreFlow::default(), + RemoveOnTrigger::::default(), )) .with_children(|parent| { parent.spawn(( diff --git a/crates/beet_examples/src/scenes/spatial/seek.rs b/crates/beet_examples/src/scenes/spatial/seek.rs index 19c66686..5b49343a 100644 --- a/crates/beet_examples/src/scenes/spatial/seek.rs +++ b/crates/beet_examples/src/scenes/spatial/seek.rs @@ -6,9 +6,9 @@ use bevy::prelude::*; pub fn seek(mut commands: Commands) { - // target let target = commands .spawn(( + Name::new("Target"), FollowCursor2d, AssetLoadBlockAppReady, BundlePlaceholder::Sprite("spaceship_pack/planet_6.png".into()), @@ -16,10 +16,9 @@ pub fn seek(mut commands: Commands) { )) .id(); - // agent commands .spawn(( - // Transform::default(), + Name::new("Agent"), BundlePlaceholder::Sprite("spaceship_pack/ship_2.png".into()), AssetLoadBlockAppReady, RotateToVelocity2d, @@ -27,7 +26,6 @@ pub fn seek(mut commands: Commands) { SteerBundle::default().scaled_to(500.).with_target(target), )) .with_children(|parent| { - // behavior parent.spawn(( Name::new("Seek"), RunOnAppReady::default(), diff --git a/crates/beet_flow/src/actions/misc/trigger_in_duration.rs b/crates/beet_flow/src/actions/misc/trigger_in_duration.rs index a4c2aebc..571c02ee 100644 --- a/crates/beet_flow/src/actions/misc/trigger_in_duration.rs +++ b/crates/beet_flow/src/actions/misc/trigger_in_duration.rs @@ -42,7 +42,6 @@ pub fn trigger_in_duration( mut query: Query<(Entity, &RunTimer, &TriggerInDuration), With>, ) { for (entity, timer, insert_in_duration) in query.iter_mut() { - println!("here!{:?}", timer.last_started.elapsed()); if timer.last_started.elapsed() >= insert_in_duration.duration { commands .entity(entity) diff --git a/examples/app_ml.rs b/examples/app_ml.rs index f4f2271b..eb1eb38b 100644 --- a/examples/app_ml.rs +++ b/examples/app_ml.rs @@ -10,17 +10,12 @@ //! - frozen lake - train: `beet-debug ui-terminal lighting-3d frozen-lake-scene frozen-lake-train` //! - frozen lake - run: `beet-debug ui-terminal lighting-3d frozen-lake-scene frozen-lake-run` //! -use beet::prelude::FrozenLakePlugin; use beet_examples::prelude::*; use bevy::prelude::*; + fn main() { App::new() - .add_plugins(( - BeetmashDefaultPlugins::with_beetmash_assets(), - ExamplePluginTypesFull, - MlPlugin, - FrozenLakePlugin - )) + .add_plugins((running_beet_example_plugin, plugin_ml)) .run(); } diff --git a/examples/fetch.rs b/examples/fetch.rs index 4ea63232..dea546ca 100644 --- a/examples/fetch.rs +++ b/examples/fetch.rs @@ -10,17 +10,17 @@ use bevy::prelude::*; pub fn main() { App::new() - .add_plugins(ExamplePluginFull) + .add_plugins((running_beet_example_plugin, plugin_ml)) .add_systems( Startup, ( - scenes::beet_debug, - scenes::ui_terminal_input, - scenes::lighting_3d, - scenes::ground_3d, - scenes::fetch_scene, - scenes::fetch_npc, + beetmash::core::scenes::ui_terminal_input, + beetmash::core::scenes::lighting_3d, + beetmash::core::scenes::ground_3d, + beet_examples::scenes::flow::beet_debug, + beet_examples::scenes::ml::fetch_scene, + beet_examples::scenes::ml::fetch_npc, ), ) .run(); -} +} \ No newline at end of file diff --git a/examples/flock.rs b/examples/flock.rs index b7c16943..c60af593 100644 --- a/examples/flock.rs +++ b/examples/flock.rs @@ -3,14 +3,14 @@ use bevy::prelude::*; pub fn main() { App::new() - .add_plugins(ExamplePluginBasics) + .add_plugins(running_beet_example_plugin) .add_systems( Startup, ( - scenes::beet_debug, - scenes::camera_2d, - scenes::space_scene, - scenes::flock, + beetmash::core::scenes::camera_2d, + beetmash::core::scenes::space_scene, + beet_examples::scenes::flow::beet_debug, + beet_examples::scenes::spatial::flock, ), ) .run(); diff --git a/examples/frozen_lake_run.rs b/examples/frozen_lake_run.rs index 660e6e64..060fc8dc 100644 --- a/examples/frozen_lake_run.rs +++ b/examples/frozen_lake_run.rs @@ -3,15 +3,15 @@ use bevy::prelude::*; pub fn main() { App::new() - .add_plugins(ExamplePluginFull) + .add_plugins((running_beet_example_plugin, plugin_ml)) .add_systems( Startup, ( - scenes::beet_debug, - scenes::ui_terminal, - scenes::lighting_3d, - scenes::frozen_lake::frozen_lake_scene, - scenes::frozen_lake::frozen_lake_run, + // beetmash::core::scenes::ui_terminal, + beetmash::core::scenes::lighting_3d, + // beet_examples::scenes::flow::beet_debug, + beet_examples::scenes::ml::frozen_lake_scene, + beet_examples::scenes::ml::frozen_lake_run, ), ) .run(); diff --git a/examples/frozen_lake_train.rs b/examples/frozen_lake_train.rs index 90e2a807..bd057bb5 100644 --- a/examples/frozen_lake_train.rs +++ b/examples/frozen_lake_train.rs @@ -3,15 +3,15 @@ use bevy::prelude::*; pub fn main() { App::new() - .add_plugins(ExamplePluginFull) + .add_plugins((running_beet_example_plugin, plugin_ml)) .add_systems( Startup, ( - scenes::beet_debug, - scenes::ui_terminal, - scenes::lighting_3d, - scenes::frozen_lake::frozen_lake_scene, - scenes::frozen_lake::frozen_lake_train, + // beetmash::core::scenes::ui_terminal, + beetmash::core::scenes::lighting_3d, + // beet_examples::scenes::flow::beet_debug, + beet_examples::scenes::ml::frozen_lake_scene, + beet_examples::scenes::ml::frozen_lake_train, ), ) .run(); diff --git a/examples/hello_animation.rs b/examples/hello_animation.rs index 4dec8422..f9f2ebba 100644 --- a/examples/hello_animation.rs +++ b/examples/hello_animation.rs @@ -3,15 +3,15 @@ use bevy::prelude::*; pub fn main() { App::new() - .add_plugins(ExamplePluginBasics) + .add_plugins(running_beet_example_plugin) .add_systems( Startup, ( - scenes::beet_debug, - scenes::ui_terminal, - scenes::lighting_3d, - scenes::ground_3d, - scenes::hello_animation, + beetmash::core::scenes::ui_terminal, + beetmash::core::scenes::lighting_3d, + beetmash::core::scenes::ground_3d, + beet_examples::scenes::flow::beet_debug, + beet_examples::scenes::spatial::hello_animation, ), ) .run(); diff --git a/examples/hello_ml.rs b/examples/hello_ml.rs index 7e4a8710..bf7d0f48 100644 --- a/examples/hello_ml.rs +++ b/examples/hello_ml.rs @@ -7,15 +7,15 @@ use bevy::prelude::*; pub fn main() { App::new() - .add_plugins(ExamplePluginFull) + .add_plugins((running_beet_example_plugin, plugin_ml)) .add_systems( Startup, ( - scenes::beet_debug, - scenes::camera_2d, - scenes::ui_terminal_input, - scenes::hello_ml, + beetmash::core::scenes::camera_2d, + beetmash::core::scenes::ui_terminal_input, + beet_examples::scenes::flow::beet_debug, + beet_examples::scenes::ml::hello_ml, ), ) .run(); -} \ No newline at end of file +} diff --git a/examples/hello_utility_ai.rs b/examples/hello_utility_ai.rs index 7e5f5dce..b309d0ad 100644 --- a/examples/hello_utility_ai.rs +++ b/examples/hello_utility_ai.rs @@ -1,17 +1,12 @@ use beet::prelude::*; -use bevy::log::LogPlugin; +use beet_examples::prelude::*; use bevy::prelude::*; #[rustfmt::skip] fn main() { App::new() .insert_resource(BeetDebugConfig::default()) - .add_plugins(( - LogPlugin::default(), - BeetDebugPluginBase, - BeetDebugPluginStdout, - LifecyclePlugin, - )) + .add_plugins(running_beet_example_plugin) .world_mut() .spawn(( Name::new("ScoreFlow will select the highest score"), diff --git a/examples/seek.rs b/examples/seek.rs index cdedbc60..d535fdac 100644 --- a/examples/seek.rs +++ b/examples/seek.rs @@ -3,14 +3,14 @@ use bevy::prelude::*; pub fn main() { App::new() - .add_plugins(ExamplePluginBasics) + .add_plugins(running_beet_example_plugin) .add_systems( Startup, ( - scenes::beet_debug, - scenes::camera_2d, - scenes::space_scene, - scenes::seek, + beetmash::core::scenes::camera_2d, + beetmash::core::scenes::space_scene, + beet_examples::scenes::flow::beet_debug, + beet_examples::scenes::spatial::seek, ), ) .run(); diff --git a/examples/seek_3d.rs b/examples/seek_3d.rs index 6774d7ec..806f342c 100644 --- a/examples/seek_3d.rs +++ b/examples/seek_3d.rs @@ -3,15 +3,15 @@ use bevy::prelude::*; pub fn main() { App::new() - .add_plugins(ExamplePluginBasics) + .add_plugins(running_beet_example_plugin) .add_systems( Startup, ( - scenes::beet_debug, - scenes::lighting_3d, - scenes::ground_3d, - scenes::seek_3d, - scenes::ui_terminal, + beetmash::core::scenes::ui_terminal, + beetmash::core::scenes::lighting_3d, + beetmash::core::scenes::ground_3d, + beet_examples::scenes::flow::beet_debug, + beet_examples::scenes::spatial::seek_3d, ), ) .run();