From 26d42f9bff746ae78738d63f47171c72d31d7a18 Mon Sep 17 00:00:00 2001 From: MovingtoMars Date: Sun, 8 Jan 2023 20:17:48 +0900 Subject: [PATCH 01/10] Update to bevy 0.9.0 --- Cargo.toml | 4 ++-- src/lib.rs | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c313588..13e2cb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/ickshonpe/bevy_stat_bars" description = "plugin for drawing floating stat bars" [dependencies.bevy] -version = "0.8" +version = "0.9" default-features = false features = ["render"] @@ -17,7 +17,7 @@ features = ["render"] version = "0.1.5" [dev-dependencies.bevy] -version = "0.8" +version = "0.9" default-features = true [dev-dependencies.bevy-inspector-egui] diff --git a/src/lib.rs b/src/lib.rs index b41b5a9..69ddf30 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,7 @@ use bevy::prelude::*; use std::marker::PhantomData; /// Insert as a resource to set z depth of Statbars +#[derive(Resource)] pub struct StatbarDepth(pub f32); /// Implement `StatbarObservable` for a component you want to visualise with a stat bar. @@ -330,8 +331,10 @@ fn update_statbar_values_from_other( }); } -fn update_statbar_from_resource(resource: Res, mut statbar_query: Query<&mut Statbar>) -where +fn update_statbar_from_resource( + resource: Res, + mut statbar_query: Query<&mut Statbar>, +) where T: StatbarObservable + 'static + Send + Sync, { if resource.is_changed() { @@ -350,7 +353,7 @@ pub enum StatbarSystem { pub trait RegisterStatbarSubject { fn add_statbar_component_observer(&mut self) -> &mut Self; - fn add_statbar_resource_observer( + fn add_statbar_resource_observer( &mut self, ) -> &mut Self; fn add_standalone_statbar(&mut self) -> &mut Self; @@ -396,7 +399,7 @@ impl RegisterStatbarSubject for App { ) } - fn add_statbar_resource_observer( + fn add_statbar_resource_observer( &mut self, ) -> &mut Self { if let Ok(render_app) = self.get_sub_app_mut(bevy::render::RenderApp) { From e3e17e78a744dba0ba1c145a56e223b9c19696f0 Mon Sep 17 00:00:00 2001 From: MovingtoMars Date: Sun, 20 Aug 2023 00:12:58 +0900 Subject: [PATCH 02/10] support bevy 0.11 --- Cargo.toml | 10 +-- examples/basic_interactive.rs | 6 +- examples/demo.rs | 55 ++++++++------- examples/minimal_standalone.rs | 4 +- examples/observe_resource.rs | 7 +- examples/stress.rs | 33 ++++----- src/extraction.rs | 26 +++---- src/lib.rs | 124 ++++++++++++++++----------------- 8 files changed, 132 insertions(+), 133 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 13e2cb0..9dd22d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,19 +9,19 @@ repository = "https://github.com/ickshonpe/bevy_stat_bars" description = "plugin for drawing floating stat bars" [dependencies.bevy] -version = "0.9" +version = "0.11" default-features = false -features = ["render"] +features = ["bevy_render"] [dependencies.copyless] version = "0.1.5" [dev-dependencies.bevy] -version = "0.9" +version = "0.11" default-features = true [dev-dependencies.bevy-inspector-egui] -version = "0.13.0" +version = "0.19.0" [dev-dependencies.seq-macro] -version = "0.3.1" \ No newline at end of file +version = "0.3.1" diff --git a/examples/basic_interactive.rs b/examples/basic_interactive.rs index db1f0e2..ef1584f 100644 --- a/examples/basic_interactive.rs +++ b/examples/basic_interactive.rs @@ -16,12 +16,12 @@ impl StatbarObservable for ObservedValue { } fn spawn_camera(mut commands: Commands) { - commands.spawn_bundle(Camera2dBundle::default()); + commands.spawn(Camera2dBundle::default()); } fn spawn_statbar(mut commands: Commands) { commands - .spawn_bundle(( + .spawn(( Statbar:: { color: Color::RED, empty_color: Color::NAVY, @@ -32,7 +32,7 @@ fn spawn_statbar(mut commands: Commands) { StatbarBorder::::all(Color::WHITE, 4.0), ObservedValue(0.35), )) - .insert_bundle(SpatialBundle::default()); + .insert(SpatialBundle::default()); } fn adjust_value( diff --git a/examples/demo.rs b/examples/demo.rs index 04ea3ad..8e0c7e1 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -1,5 +1,5 @@ -use bevy::prelude::*; -use bevy_inspector_egui::WorldInspectorPlugin; +use bevy::{prelude::*, window::WindowResolution}; +use bevy_inspector_egui::quick::WorldInspectorPlugin; use bevy_stat_bars::*; use std::marker::PhantomData; @@ -85,12 +85,12 @@ type Health = Stat; type Magic = Stat; fn spawn_camera(mut commands: Commands) { - commands.spawn_bundle(Camera2dBundle::default()); + commands.spawn(Camera2dBundle::default()); } fn spawn_demo(mut commands: Commands, asset_server: Res) { let wizard_id = commands - .spawn_bundle(SpriteBundle { + .spawn(SpriteBundle { sprite: Sprite { custom_size: Some(128. * Vec2::ONE), ..Default::default() @@ -98,7 +98,7 @@ fn spawn_demo(mut commands: Commands, asset_server: Res) { texture: asset_server.load("wizard.png"), ..Default::default() }) - .insert_bundle(( + .insert(( WizardCharacter, Health::new_full(20.0), Magic::new_full(17.0), @@ -124,7 +124,7 @@ fn spawn_demo(mut commands: Commands, asset_server: Res) { .id(); commands - .spawn_bundle(( + .spawn(( Statbar:: { color: Color::WHITE, empty_color: Color::BLACK, @@ -134,7 +134,7 @@ fn spawn_demo(mut commands: Commands, asset_server: Res) { }, StatbarObserveEntity(wizard_id), )) - .insert_bundle(SpatialBundle { + .insert(SpatialBundle { transform: Transform::from_translation(-200. * Vec3::Y), ..Default::default() }); @@ -200,17 +200,18 @@ fn spawn_instructions(mut commands: Commands, asset_server: Res) { color: Color::ANTIQUE_WHITE, }; - commands.spawn_bundle( + commands.spawn( NodeBundle { style: Style { - size: Size::new(Val::Percent(100.0), Val::Percent(100.0)), + width: Val::Percent(100.0), + height: Val::Percent(100.0), justify_content: JustifyContent::Center, ..Default::default() }, - color: UiColor(Color::NONE), + background_color: BackgroundColor(Color::NONE), ..Default::default() }).with_children(|builder| { - builder.spawn_bundle( + builder.spawn( TextBundle { text: Text { sections: vec![ @@ -224,7 +225,8 @@ fn spawn_instructions(mut commands: Commands, asset_server: Res) { style: text_style } ], - alignment: TextAlignment { vertical: VerticalAlign::Bottom, horizontal: HorizontalAlign::Center }, + alignment: TextAlignment::Center, + linebreak_behavior: bevy::text::BreakLineOn::WordBoundary, }, style: Style { align_self: AlignSelf::FlexEnd, @@ -238,24 +240,25 @@ fn spawn_instructions(mut commands: Commands, asset_server: Res) { fn main() { App::new() .insert_resource(ClearColor(Color::rgb(0.1, 0.1, 0.1))) - .insert_resource(bevy::render::texture::ImageSettings::default_nearest()) - .insert_resource(WindowDescriptor { - width: 1000., - height: 1000., - resizable: true, - ..Default::default() - }) - .add_plugins(DefaultPlugins) - .add_plugin(WorldInspectorPlugin::new()) + .add_plugins( + DefaultPlugins + .set(ImagePlugin::default_nearest()) + .set(WindowPlugin { + primary_window: Some(Window { + resolution: WindowResolution::new(1000., 1000.), + resizable: true, + ..Default::default() + }), + ..default() + }), + ) + .add_plugins(WorldInspectorPlugin::new()) .register_type::() .register_type::() .register_type::() .add_statbar_component_observer::() .add_statbar_component_observer::() - .add_startup_system(spawn_camera) - .add_startup_system(spawn_demo) - .add_startup_system(spawn_instructions) - .add_system(move_character) - .add_system(adjust_stats) + .add_systems(Startup, (spawn_camera, spawn_demo, spawn_instructions)) + .add_systems(Update, (move_character, adjust_stats)) .run(); } diff --git a/examples/minimal_standalone.rs b/examples/minimal_standalone.rs index 9eeb072..c71fbe5 100644 --- a/examples/minimal_standalone.rs +++ b/examples/minimal_standalone.rs @@ -9,9 +9,9 @@ fn main() { .add_standalone_statbar::<()>() .add_startup_system(|mut commands: Commands| { commands - .spawn_bundle(Camera2dBundle::default()) + .spawn(Camera2dBundle::default()) .commands() - .spawn_bundle(SpatialBundle::default()) + .spawn(SpatialBundle::default()) .insert(Statbar::<()>::default()); }) .run(); diff --git a/examples/observe_resource.rs b/examples/observe_resource.rs index e5ef9fc..e813af2 100644 --- a/examples/observe_resource.rs +++ b/examples/observe_resource.rs @@ -4,6 +4,7 @@ use bevy_stat_bars::*; // Spawns a red and navy statbar with a white border in the middle of the window. // The left and right cursor keys decrease and increase the value of the bar. +#[derive(Resource, Reflect)] struct ObservedResource(f32); impl StatbarObservable for ObservedResource { @@ -13,12 +14,12 @@ impl StatbarObservable for ObservedResource { } fn spawn_camera(mut commands: Commands) { - commands.spawn_bundle(Camera2dBundle::default()); + commands.spawn(Camera2dBundle::default()); } fn spawn_statbar(mut commands: Commands) { commands - .spawn_bundle(( + .spawn(( Statbar:: { color: Color::RED, empty_color: Color::NAVY, @@ -29,7 +30,7 @@ fn spawn_statbar(mut commands: Commands) { }, StatbarBorder::::all(Color::WHITE, 10.0), )) - .insert_bundle(SpatialBundle::default()); + .insert(SpatialBundle::default()); } fn adjust_value( diff --git a/examples/stress.rs b/examples/stress.rs index 5849665..b5cd132 100644 --- a/examples/stress.rs +++ b/examples/stress.rs @@ -74,7 +74,7 @@ fn spawn_camera(mut commands: Commands) { let mut c = Camera2dBundle::default(); c.transform.scale.x = 2.5; c.transform.scale.y = 2.5; - commands.spawn_bundle(c); + commands.spawn(c); } fn spawn_wizards(mut commands: Commands, asset_server: Res) { @@ -86,7 +86,7 @@ fn spawn_wizards(mut commands: Commands, asset_server: Res) { for _ in 0..GRID_SIZE { for _ in 0..GRID_SIZE { commands - .spawn_bundle(SpriteBundle { + .spawn(SpriteBundle { sprite: Sprite { custom_size: Some(s * Vec2::ONE), ..Default::default() @@ -95,7 +95,7 @@ fn spawn_wizards(mut commands: Commands, asset_server: Res) { transform, ..Default::default() }) - .insert_bundle(( + .insert(( WizardCharacter, Health::new_full(20.0), Magic::new_full(17.0), @@ -131,32 +131,33 @@ fn adjust_stats( mut mp_query: Query<&mut Magic>, ) { hp_query.for_each_mut(|mut hp| { - hp.value = hp.max * time.time_since_startup().as_secs_f32().sin().abs(); + hp.value = hp.max * time.elapsed().as_secs_f32().sin().abs(); }); mp_query.for_each_mut(|mut mp| { - mp.value = mp.max * time.time_since_startup().as_secs_f32().cos().abs(); + mp.value = mp.max * time.elapsed().as_secs_f32().cos().abs(); }); } fn main() { App::new() .insert_resource(ClearColor(Color::rgb(0.1, 0.1, 0.1))) - .insert_resource(bevy::render::texture::ImageSettings::default_nearest()) - .insert_resource(WindowDescriptor { - present_mode: PresentMode::Immediate, - mode: WindowMode::Fullscreen, - ..Default::default() - }) + // .insert_resource(bevy::render::texture::ImageSettings::default_nearest()) + // .insert_resource(WindowDescriptor { + // present_mode: PresentMode::Immediate, + // mode: WindowMode::Fullscreen, + // ..Default::default() + // }) .add_plugins(DefaultPlugins) - .add_plugin(bevy::diagnostic::LogDiagnosticsPlugin::default()) - .add_plugin(bevy::diagnostic::FrameTimeDiagnosticsPlugin::default()) + .add_plugins(( + bevy::diagnostic::LogDiagnosticsPlugin::default(), + bevy::diagnostic::FrameTimeDiagnosticsPlugin::default(), + )) .register_type::() .register_type::() .register_type::() .add_statbar_component_observer::() .add_statbar_component_observer::() - .add_startup_system(spawn_camera) - .add_startup_system(spawn_wizards) - .add_system(adjust_stats) + .add_systems(Startup, (spawn_camera, spawn_wizards)) + .add_systems(Update, adjust_stats) .run(); } diff --git a/src/extraction.rs b/src/extraction.rs index 3c66f2e..b6ebc95 100644 --- a/src/extraction.rs +++ b/src/extraction.rs @@ -11,7 +11,7 @@ use copyless::VecHelper; /// The z depth the stat bar sprites are drawn with. const DEFAULT_Z_DEPTH: f32 = 990.0; -pub(crate) fn extract_stat_bars( +pub(crate) fn extract_stat_bars( extraction: Extract<( Option>, Query<( @@ -24,7 +24,7 @@ pub(crate) fn extract_stat_bars( )>, mut extracted_sprites: ResMut, ) { - let mut transform = GlobalTransform::default(); + let mut new_translation = Vec3::default(); let (depth, query) = &*extraction; for (id, bar, border, global_transform, computed_visibility) in query.iter() { if bar.hide || !computed_visibility.is_visible() { @@ -39,14 +39,14 @@ pub(crate) fn extract_stat_bars( let value = bar.value; let length = bar.length; let thickness = bar.thickness; - *transform.translation_mut() = global_transform.translation_vec3a(); + new_translation = global_transform.translation(); let z = depth .as_ref() .map(|depth| depth.0) .unwrap_or(DEFAULT_Z_DEPTH); - transform.translation_mut().z = z; - transform.translation_mut().x += bar.displacement.x; - transform.translation_mut().y += bar.displacement.y; + new_translation.z = z; + new_translation.x += bar.displacement.x; + new_translation.y += bar.displacement.y; let size = length * major_axis + thickness * minor_axis; if let Some(border) = border { let border_size = vec2( @@ -55,7 +55,7 @@ pub(crate) fn extract_stat_bars( ); extracted_sprites.sprites.alloc().init(ExtractedSprite { entity: id, - transform, + transform: GlobalTransform::from_translation(new_translation), color: border.color, rect: None, custom_size: Some(border_size), @@ -68,10 +68,10 @@ pub(crate) fn extract_stat_bars( // draw bar back if value < 1.0 { - transform.translation_mut().z = z + 1.0; + new_translation.z = z + 1.0; extracted_sprites.sprites.alloc().init(ExtractedSprite { entity: id, - transform, + transform: GlobalTransform::from_translation(new_translation), color: bar.empty_color, rect: None, custom_size: Some(size), @@ -87,12 +87,12 @@ pub(crate) fn extract_stat_bars( let value = value.clamp(0., 1.); let bar_size = value * length * major_axis + thickness * minor_axis; let direction = if bar.reverse { -1. } else { 1. }; - *transform.translation_mut() += - Vec3A::from(direction * 0.5 * length * (value - 1.) * major_axis.extend(0.)); - transform.translation_mut().z = z + 2.0; + new_translation += + Vec3::from(direction * 0.5 * length * (value - 1.) * major_axis.extend(0.)); + new_translation.z = z + 2.0; extracted_sprites.sprites.alloc().init(ExtractedSprite { entity: id, - transform, + transform: GlobalTransform::from_translation(new_translation), color: bar.color, rect: None, custom_size: Some(bar_size), diff --git a/src/lib.rs b/src/lib.rs index 69ddf30..2088a3d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ mod extraction; -use bevy::prelude::*; +use bevy::{prelude::*, reflect::TypePath}; use std::marker::PhantomData; /// Insert as a resource to set z depth of Statbars @@ -59,7 +59,7 @@ where #[reflect(Component)] pub struct Statbar where - T: 'static, + T: TypePath + 'static, { /// color of the full part of the bar pub color: Color, @@ -94,7 +94,7 @@ where pub _phantom: PhantomData T>, } -impl Default for Statbar { +impl Default for Statbar { fn default() -> Self { Self { color: Color::YELLOW, @@ -253,7 +253,7 @@ where } } -fn switch_stat_bar_colors( +fn switch_stat_bar_colors( mut color_switch_query: Query< (&mut Statbar, &mut StatbarColorSwitch), Changed>, @@ -270,7 +270,7 @@ fn switch_stat_bar_colors( }); } -fn lerp_stat_bar_colors( +fn lerp_stat_bar_colors( mut color_lerp_query: Query<(&mut Statbar, &mut StatbarColorLerp), Changed>>, ) where T: 'static, @@ -282,7 +282,7 @@ fn lerp_stat_bar_colors( }); } -fn update_statbar_values( +fn update_statbar_values( mut statbar_query: Query< (&mut Statbar, &T), ( @@ -299,7 +299,7 @@ fn update_statbar_values( }); } -fn update_statbar_values_from_parents( +fn update_statbar_values_from_parents( mut statbar_query: Query< (&mut Statbar, &Parent), (With, Without), @@ -315,7 +315,7 @@ fn update_statbar_values_from_parents( }); } -fn update_statbar_values_from_other( +fn update_statbar_values_from_other( mut statbar_query: Query< (&mut Statbar, &StatbarObserveEntity), Without, @@ -331,7 +331,7 @@ fn update_statbar_values_from_other( }); } -fn update_statbar_from_resource( +fn update_statbar_from_resource( resource: Res, mut statbar_query: Query<&mut Statbar>, ) where @@ -344,7 +344,7 @@ fn update_statbar_from_resource( } } -#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemLabel)] +#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)] pub enum StatbarSystem { UpdateValues, UpdateColors, @@ -352,18 +352,24 @@ pub enum StatbarSystem { } pub trait RegisterStatbarSubject { - fn add_statbar_component_observer(&mut self) -> &mut Self; - fn add_statbar_resource_observer( + fn add_statbar_component_observer( + &mut self, + ) -> &mut Self; + fn add_statbar_resource_observer< + T: TypePath + Resource + StatbarObservable + 'static + Send + Sync, + >( &mut self, ) -> &mut Self; - fn add_standalone_statbar(&mut self) -> &mut Self; + fn add_standalone_statbar(&mut self) -> &mut Self; } impl RegisterStatbarSubject for App { - fn add_statbar_component_observer(&mut self) -> &mut Self { + fn add_statbar_component_observer( + &mut self, + ) -> &mut Self { if let Ok(render_app) = self.get_sub_app_mut(bevy::render::RenderApp) { - render_app.add_system_to_stage( - bevy::render::RenderStage::Extract, + render_app.add_systems( + ExtractSchedule, extraction::extract_stat_bars:: .after(bevy::sprite::SpriteSystem::ExtractSprites), ); @@ -373,38 +379,33 @@ impl RegisterStatbarSubject for App { .register_type::>() .register_type::>() .register_type::>() - .add_system_to_stage( - CoreStage::PostUpdate, - update_statbar_values::.label(StatbarSystem::UpdateValues), + .configure_sets( + PostUpdate, + (StatbarSystem::UpdateValues, StatbarSystem::UpdateColors).chain(), ) - .add_system_to_stage( - CoreStage::PostUpdate, - update_statbar_values_from_other::.label(StatbarSystem::UpdateValues), - ) - .add_system_to_stage( - CoreStage::PostUpdate, - update_statbar_values_from_parents::.label(StatbarSystem::UpdateValues), - ) - .add_system_to_stage( - CoreStage::PostUpdate, - switch_stat_bar_colors:: - .after(StatbarSystem::UpdateValues) - .label(StatbarSystem::UpdateColors), - ) - .add_system_to_stage( - CoreStage::PostUpdate, - lerp_stat_bar_colors:: - .after(StatbarSystem::UpdateValues) - .label(StatbarSystem::UpdateColors), + .add_systems( + PostUpdate, + ( + ( + update_statbar_values::, + update_statbar_values_from_other::, + update_statbar_values_from_parents::, + ) + .in_set(StatbarSystem::UpdateValues), + (switch_stat_bar_colors::, lerp_stat_bar_colors::) + .in_set(StatbarSystem::UpdateColors), + ), ) } - fn add_statbar_resource_observer( + fn add_statbar_resource_observer< + T: TypePath + Resource + StatbarObservable + 'static + Send + Sync, + >( &mut self, ) -> &mut Self { if let Ok(render_app) = self.get_sub_app_mut(bevy::render::RenderApp) { - render_app.add_system_to_stage( - bevy::render::RenderStage::Extract, + render_app.add_systems( + ExtractSchedule, extraction::extract_stat_bars:: .after(bevy::sprite::SpriteSystem::ExtractSprites), ); @@ -414,28 +415,24 @@ impl RegisterStatbarSubject for App { .register_type::>() .register_type::>() .register_type::>() - .add_system_to_stage( - CoreStage::PostUpdate, - update_statbar_from_resource::.label(StatbarSystem::UpdateValues), + .configure_sets( + PostUpdate, + (StatbarSystem::UpdateValues, StatbarSystem::UpdateColors).chain(), ) - .add_system_to_stage( - CoreStage::PostUpdate, - switch_stat_bar_colors:: - .after(StatbarSystem::UpdateValues) - .label(StatbarSystem::UpdateColors), - ) - .add_system_to_stage( - CoreStage::PostUpdate, - lerp_stat_bar_colors:: - .after(StatbarSystem::UpdateValues) - .label(StatbarSystem::UpdateColors), + .add_systems( + PostUpdate, + ( + (update_statbar_from_resource::,).in_set(StatbarSystem::UpdateValues), + (switch_stat_bar_colors::, lerp_stat_bar_colors::) + .in_set(StatbarSystem::UpdateColors), + ), ) } - fn add_standalone_statbar(&mut self) -> &mut Self { + fn add_standalone_statbar(&mut self) -> &mut Self { if let Ok(render_app) = self.get_sub_app_mut(bevy::render::RenderApp) { - render_app.add_system_to_stage( - bevy::render::RenderStage::Extract, + render_app.add_systems( + ExtractSchedule, extraction::extract_stat_bars:: .after(bevy::sprite::SpriteSystem::ExtractSprites), ); @@ -445,13 +442,10 @@ impl RegisterStatbarSubject for App { .register_type::>() .register_type::>() .register_type::>() - .add_system_to_stage( - CoreStage::PostUpdate, - switch_stat_bar_colors::.label(StatbarSystem::UpdateColors), - ) - .add_system_to_stage( - CoreStage::PostUpdate, - lerp_stat_bar_colors::.label(StatbarSystem::UpdateColors), + .add_systems( + PostUpdate, + ((switch_stat_bar_colors::, lerp_stat_bar_colors::) + .in_set(StatbarSystem::UpdateColors),), ) } } From 51a1045206811af316131cad4d1216e1fc5bf7ca Mon Sep 17 00:00:00 2001 From: MovingtoMars Date: Wed, 20 Mar 2024 02:34:33 +0900 Subject: [PATCH 03/10] update for bevy 0.13 --- Cargo.toml | 8 ++-- examples/basic_interactive.rs | 13 +++--- examples/demo.rs | 28 +++++------ examples/minimal_standalone.rs | 2 +- examples/observe_resource.rs | 11 ++--- examples/stress2.rs | 22 +++++---- src/extraction.rs | 85 ++++++++++++++++++---------------- src/lib.rs | 45 ++++++++++-------- 8 files changed, 114 insertions(+), 100 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9dd22d9..40202e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/ickshonpe/bevy_stat_bars" description = "plugin for drawing floating stat bars" [dependencies.bevy] -version = "0.11" +version = "0.13" default-features = false features = ["bevy_render"] @@ -17,11 +17,11 @@ features = ["bevy_render"] version = "0.1.5" [dev-dependencies.bevy] -version = "0.11" +version = "0.13" default-features = true [dev-dependencies.bevy-inspector-egui] -version = "0.19.0" +version = "0.23.0" [dev-dependencies.seq-macro] -version = "0.3.1" +version = "0.3.5" diff --git a/examples/basic_interactive.rs b/examples/basic_interactive.rs index ef1584f..02729b8 100644 --- a/examples/basic_interactive.rs +++ b/examples/basic_interactive.rs @@ -37,15 +37,15 @@ fn spawn_statbar(mut commands: Commands) { fn adjust_value( time: Res