From 0b19d626bda5e2b106b077aa5cea699d56d0a79d Mon Sep 17 00:00:00 2001 From: "Arend van Beelen jr." Date: Sat, 16 Sep 2023 17:10:28 +0200 Subject: [PATCH 1/2] Update with latest changes in Bevy main --- Cargo.toml | 5 ++++- benchmarks/Cargo.toml | 2 +- src/lib.rs | 2 +- src/tweenable.rs | 8 ++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0eec4b4..048ce58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ bevy_text = ["bevy/bevy_text", "bevy/bevy_render", "bevy/bevy_sprite"] [dependencies] interpolation = "0.2" -bevy = { version = "0.11", default-features = false } +bevy = { version = "0.12.0-dev", default-features = false } [dev-dependencies] bevy-inspector-egui = "0.19" @@ -65,3 +65,6 @@ required-features = [ "bevy_sprite", "bevy_text", "bevy/bevy_winit" ] [workspace] resolver = "2" members = [".", "benchmarks/"] + +[patch.crates-io] +bevy = { git = "https://github.com/bevyengine/bevy.git" } diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 8abc515..ccd3b40 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -18,7 +18,7 @@ criterion = { version = "0.4", features = ["html_reports"] } bevy_tweening = { path = "../" } [dependencies.bevy] -version = "0.11" +version = "0.12.0-dev" default-features = false features = ["bevy_render", "bevy_sprite", "bevy_text", "bevy_ui"] diff --git a/src/lib.rs b/src/lib.rs index 89f5d67..8d0b4d2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -507,7 +507,7 @@ mod tests { } #[cfg(feature = "bevy_asset")] - #[derive(Debug, Default, Reflect, TypeUuid)] + #[derive(Asset, Debug, Default, Reflect, TypeUuid)] #[uuid = "a33abc11-264e-4bbb-82e8-b87226bb4383"] struct DummyAsset { value: f32, diff --git a/src/tweenable.rs b/src/tweenable.rs index 7bfcdd3..45476e1 100644 --- a/src/tweenable.rs +++ b/src/tweenable.rs @@ -3,7 +3,7 @@ use std::{ops::DerefMut, time::Duration}; use bevy::prelude::*; #[cfg(feature = "bevy_asset")] -use bevy::asset::{Asset, HandleId}; +use bevy::asset::{Asset, AssetId}; use crate::{EaseMethod, Lens, RepeatCount, RepeatStrategy, TweeningDirection}; @@ -234,7 +234,7 @@ impl<'a, T: Asset> AssetTarget<'a, T> { pub fn new(assets: ResMut<'a, Assets>) -> Self { Self { assets, - handle: Handle::weak(HandleId::default::()), + handle: Handle::Weak(AssetId::default()), } } @@ -1465,7 +1465,7 @@ mod tests { assert_eq!(cb_mon.last_reported_count, times_completed); { let mut event_reader = event_reader_system_state.get_mut(&mut world); - let event = event_reader.iter().next(); + let event = event_reader.read().next(); if just_completed { assert!(event.is_some()); if let Some(event) = event { @@ -1877,7 +1877,7 @@ mod tests { { let mut event_reader = event_reader_system_state.get_mut(&mut world); - let event = event_reader.iter().next(); + let event = event_reader.read().next(); if i == 5 { assert!(event.is_some()); let event = event.unwrap(); From 5568f81469eb99e04dea20e436e7c604e95d3574 Mon Sep 17 00:00:00 2001 From: "Arend van Beelen jr." Date: Thu, 2 Nov 2023 10:13:00 +0100 Subject: [PATCH 2/2] Update tests --- src/plugin.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/plugin.rs b/src/plugin.rs index 7425578..a4bfd7f 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -157,10 +157,7 @@ mod tests { pub fn new(animator: T) -> Self { let mut world = World::new(); world.init_resource::>(); - - let mut time = Time::default(); - time.update(); - world.insert_resource(time); + world.init_resource::