diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 407e8bc..936dee8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,8 +71,6 @@ jobs: - "unstable-load-from-file, yaml" - "unstable-load-from-file, ron" - "bevy-07" - - "bevy-app-07" - - "bevy-sprite-07" steps: - uses: actions/checkout@v3 diff --git a/Cargo.toml b/Cargo.toml index 927a556..24fdd35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,6 +24,10 @@ yaml = { package = "serde_yaml", version = "0.8.25", default-features = false, o ron = { version = "0.7.1", default-features = false, optional = true } # Public dependencies (Present in the public API) +serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } +anyhow = { version = "1.0", default-features = false, optional = true } + +## Bevy 0.7 bevy_core = { version = "0.7.0", default-features = false } bevy_ecs = { version = "0.7.0", default-features = false } bevy_reflect = { version = "0.7.0", default-features = false } @@ -31,8 +35,6 @@ bevy_asset = { version = "0.7.0", default-features = false } bevy-app-07 = { package = "bevy_app",version = "0.7.0", default-features = false, optional = true } bevy-sprite-07 = { package = "bevy_sprite", version = "0.7.0", default-features = false, optional = true } bevy_utils = { version = "0.7.0", default-features = false, optional = true } -serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } -anyhow = { version = "1.0", default-features = false, optional = true } [dev-dependencies] bevy = { version = "0.7.0", default-features = false, features = ["render", "x11", "png"] } diff --git a/README.md b/README.md index 12d842b..d9b146c 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,6 @@ cargo add benimator * `yaml` deserialization from yaml asset files (also requires `unstable-load-from-file`) * `ron` deserialization from ron asset files (also requires `unstable-load-from-file`) * `bevy-07` all integrations with bevy 0.7 -* `bevy-app-07` integration with `bevy_app` 0.7 -* `bevy-sprite-07` integration with `bevy_sprite` 0.7 ### Unstable features diff --git a/src/integration/bevy_07.rs b/src/integration/bevy_07.rs index a031b3d..97ace15 100644 --- a/src/integration/bevy_07.rs +++ b/src/integration/bevy_07.rs @@ -3,29 +3,23 @@ use std::ops::DerefMut; use crate::{ state::SpriteState, Play, PlaySpeedMultiplier, SpriteSheetAnimation, SpriteSheetAnimationState, }; -#[cfg(feature = "bevy-app-07")] use bevy_app_07::prelude::*; use bevy_asset::prelude::*; use bevy_core::prelude::*; use bevy_ecs::prelude::*; -#[cfg(feature = "bevy-sprite-07")] use bevy_sprite_07::prelude::*; -#[cfg(feature = "bevy-app-07")] impl Plugin for crate::AnimationPlugin { fn build(&self, app: &mut App) { app.add_asset::() - .add_system_set_to_stage(CoreStage::PreUpdate, auto_insert_state()); - - #[cfg(feature = "bevy-sprite-07")] - app.add_system_set_to_stage(CoreStage::Update, animation_systems::()); + .add_system_set_to_stage(CoreStage::PreUpdate, auto_insert_state()) + .add_system_set_to_stage(CoreStage::Update, animation_systems::()); #[cfg(feature = "unstable-load-from-file")] app.init_asset_loader::(); } } -#[cfg(feature = "bevy-sprite-07")] impl SpriteState for TextureAtlasSprite { fn set_current_index(&mut self, index: usize) { self.index = index; @@ -33,7 +27,7 @@ impl SpriteState for TextureAtlasSprite { } /// Systems to automatically insert (and remove) the state component -pub fn auto_insert_state() -> SystemSet { +fn auto_insert_state() -> SystemSet { SystemSet::new() .with_system(insert_state) .with_system(remove_state) @@ -47,7 +41,7 @@ pub fn auto_insert_state() -> SystemSet { /// /// * `bevy_asset::assets::Assets` /// * `bevy_core::time::Time` -pub fn animation_systems() -> SystemSet { +fn animation_systems() -> SystemSet { SystemSet::new().with_system(animate::) } diff --git a/src/integration/mod.rs b/src/integration/mod.rs index c080df4..dd99685 100644 --- a/src/integration/mod.rs +++ b/src/integration/mod.rs @@ -1,5 +1,5 @@ //! Integration with third party crates /// Integration with bevy 0.7 -#[cfg(any(feature = "bevy-app-07", feature = "bevy-sprite-07"))] +#[cfg(feature = "bevy-07")] pub mod bevy_07;