Skip to content

Commit

Permalink
update example to bevy 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
jcornaz committed Jul 12, 2023
1 parent 59d3f15 commit 4844cfc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ serde = { version = "1.0.170", features = ["derive"], optional = true }
[dev-dependencies]
serde_yaml = { version = "0.9.22", default-features = false }
rstest = { version = "0.18.1", default-features = false }
bevy = { version = "0.10.1", default-features = false, features = ["bevy_asset", "bevy_winit", "bevy_render", "bevy_sprite", "bevy_core_pipeline", "png", "x11", "dynamic_linking"] }
bevy = { version = "0.11.0", default-features = false, features = ["bevy_asset", "bevy_winit", "bevy_render", "bevy_sprite", "bevy_core_pipeline", "png", "x11", "dynamic_linking"] }
anyhow = "1.0.71"
toml = "0.7.6"

Expand Down
4 changes: 2 additions & 2 deletions examples/bevy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ struct AnimationState(benimator::State);
fn main() {
App::new()
.add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest()))
.add_startup_system(spawn)
.add_system(animate)
.add_systems(Startup, spawn)
.add_systems(Update, animate)
.run();
}

Expand Down
8 changes: 4 additions & 4 deletions examples/bevy_with_asset_loader.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use bevy::{
asset::{AssetLoader, BoxedFuture, Error, LoadContext, LoadedAsset},
prelude::*,
reflect::TypeUuid,
reflect::{TypePath, TypeUuid},
};

// Create the animation asset
#[derive(TypeUuid, Deref)]
#[derive(TypeUuid, TypePath, Deref)]
#[uuid = "ae6a74db-f6fa-43c4-ac16-01d13b50e4c6"]
struct Animation(benimator::Animation);

Expand Down Expand Up @@ -42,8 +42,8 @@ fn main() {
.add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest()))
.add_asset::<Animation>() // Register the asset
.init_asset_loader::<AnimationLoader>() // Register the asset loader
.add_startup_system(spawn)
.add_system(animate)
.add_systems(Startup, spawn)
.add_systems(Update, animate)
.run();
}

Expand Down
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ doc *args:
# Open the documentation page
doc-open: (doc "--open")

# Run the given example
run example:
cargo run --all-features --example {{example}}

# Make sure the MSRV is satisfiable
check-msrv:
cargo msrv verify
Expand Down

0 comments on commit 4844cfc

Please sign in to comment.