diff --git a/Cargo.lock b/Cargo.lock index fd98a010..cb8844a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -407,7 +407,7 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "beet" -version = "0.0.4-rc.4" +version = "0.0.4" dependencies = [ "anyhow", "beet_examples", @@ -430,7 +430,7 @@ dependencies = [ [[package]] name = "beet_examples" -version = "0.0.4-rc.4" +version = "0.0.4" dependencies = [ "anyhow", "beet_flow", @@ -449,7 +449,7 @@ dependencies = [ [[package]] name = "beet_flow" -version = "0.0.4-rc.4" +version = "0.0.4" dependencies = [ "anyhow", "beet_flow_macros", @@ -469,7 +469,7 @@ dependencies = [ [[package]] name = "beet_flow_macros" -version = "0.0.4-rc.4" +version = "0.0.4" dependencies = [ "anyhow", "extend", @@ -482,7 +482,7 @@ dependencies = [ [[package]] name = "beet_ml" -version = "0.0.4-rc.4" +version = "0.0.4" dependencies = [ "anyhow", "beet_flow", @@ -517,7 +517,7 @@ dependencies = [ [[package]] name = "beet_rig" -version = "0.0.4-rc.4" +version = "0.0.4" dependencies = [ "anyhow", "beet_flow", @@ -534,7 +534,7 @@ dependencies = [ [[package]] name = "beet_sim" -version = "0.0.4-rc.4" +version = "0.0.4" dependencies = [ "anyhow", "beet_flow", @@ -547,7 +547,7 @@ dependencies = [ [[package]] name = "beet_spatial" -version = "0.0.4-rc.4" +version = "0.0.4" dependencies = [ "anyhow", "beet_flow", @@ -2478,7 +2478,7 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "emby" -version = "0.0.4-rc.4" +version = "0.0.4" dependencies = [ "anyhow", "beet", diff --git a/Cargo.toml b/Cargo.toml index 0ba66df7..57118f4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,9 +7,9 @@ opt-level = 1 opt-level = 3 [workspace.package] -version = "0.0.4-rc.4" +version = "0.0.4" edition = "2021" -description = "A very flexible AI behavior library for games and robotics." +description = "A modular behavior library for the Bevy Engine." documentation = "https://beetmash.com/docs/beet" readme = "README.md" homepage = "https://beetmash.com/docs/beet" @@ -32,13 +32,13 @@ members = ["crates/*", "crates/beet_flow/macros"] [workspace.dependencies] ## internal -beet = { path = "./", version = "0.0.4-rc.4" } -beet_spatial = { path = "crates/beet_spatial", version = "0.0.4-rc.4", default-features = false } -beet_flow = { path = "crates/beet_flow", version = "0.0.4-rc.4" } -beet_flow_macros = { path = "crates/beet_flow/macros", version = "0.0.4-rc.4" } -beet_ml = { path = "crates/beet_ml", version = "0.0.4-rc.4" } -beet_examples = { path = "crates/beet_examples", version = "0.0.4-rc.4" } -emby = { path = "crates/emby", version = "0.0.4-rc.4" } +beet = { path = "./", version = "0.0.4" } +beet_spatial = { path = "crates/beet_spatial", version = "0.0.4", default-features = false } +beet_flow = { path = "crates/beet_flow", version = "0.0.4" } +beet_flow_macros = { path = "crates/beet_flow/macros", version = "0.0.4" } +beet_ml = { path = "crates/beet_ml", version = "0.0.4" } +beet_examples = { path = "crates/beet_examples", version = "0.0.4" } +emby = { path = "crates/emby", version = "0.0.4" } ## local beetmash = { version = "0.0.7" } @@ -116,7 +116,11 @@ keywords.workspace = true categories.workspace = true include = [ - "scenes/*", + "CHANGELOG.md", + "README.md", + "/src", + "/examples", + "/scenes", ] [features] diff --git a/README.md b/README.md index 24d43eb4..2f7325ed 100644 --- a/README.md +++ b/README.md @@ -48,13 +48,6 @@ world.spawn(SequenceFlow) ## Examples - -> ⚠️⚠️⚠️ If you'd like to check out this repo please use the stable [v0.0.3](https://github.com/mrchantey/beet/tree/v0.0.3) commit ⚠️⚠️⚠️ -> -> Beet and my other crates it depends on are currently on a scene serialization bugfix Bevy fork, see [this issue](https://github.com/bevyengine/bevy/issues/14300) for details. The fix is scheduled for the `0.14.2` milestone so fingers crossed we'll be back on bevy main from then. - - - The examples for beet are *scene-based*, meaning each example provides a scene for a common base app. As Bevy scene workflows are a wip, there are a few `Placeholder` types used for not-yet-serializable types like cameras, asset handles etc. Most examples rely on assets that can be downloaded with the following commands, or manually from [here](https://beetmash-public.s3.us-west-2.amazonaws.com/assets.tar.gz). diff --git a/examples/hello_state_machine.rs b/examples/hello_state_machine.rs index 9f0aa631..0ab6e406 100644 --- a/examples/hello_state_machine.rs +++ b/examples/hello_state_machine.rs @@ -11,19 +11,25 @@ fn main() { app.insert_resource(BeetDebugConfig::default()) .add_plugins(minimal_beet_example_plugin); let world = app.world_mut(); - let say_world = world.spawn(( - Name::new("World"), - )).id(); + - world.spawn(( - Name::new("Hello"), - EndOnRun::success(), - RunOnRunResult::new_with_target(say_world), - )).flush_trigger(OnRun); + let state2 = world.spawn(( + Name::new("state2"), + EndOnRun::success(), + )).id(); + + // transitions are just behaviors that always trigger the next behavior + let transition = world.spawn(( + Name::new("transition"), + EndOnRun::success(), + RunOnRunResult::new_with_target(state2), + )).id(); world.spawn(( - Name::new("G'day"), - EndOnRun::success(), - RunOnRunResult::new_with_target(say_world), + Name::new("state1"), + EndOnRun::success(), + // here RunOnRunResult can be swapped out with a control flow action + // that decides which state to go to next + RunOnRunResult::new_with_target(transition), )).flush_trigger(OnRun); } diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 6fcf1274..530c2163 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -21,8 +21,8 @@ fn main() { EndOnRun::success(), )) .with_child(( - Name::new("child2"), - EndOnRun::success(), + Name::new("child2"), + EndOnRun::success(), )) .flush_trigger(OnRun); }