Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update with latest changes in Bevy main #100

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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" }
2 changes: 1 addition & 1 deletion benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,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,
Expand Down
8 changes: 2 additions & 6 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,7 @@ mod tests {
pub fn new<T: Component>(animator: T) -> Self {
let mut world = World::new();
world.init_resource::<Events<TweenCompleted>>();

let mut time = Time::default();
time.update();
world.insert_resource(time);
world.init_resource::<Time>();

let entity = world.spawn((Transform::default(), animator)).id();

Expand All @@ -178,8 +175,7 @@ mod tests {
// Simulate time passing by updating the simulation time resource
{
let mut time = self.world.resource_mut::<Time>();
let last_update = time.last_update().unwrap();
time.update_with_instant(last_update + duration);
time.advance_by(duration);
}

// Reset world-related change detection
Expand Down
8 changes: 4 additions & 4 deletions src/tweenable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -234,7 +234,7 @@ impl<'a, T: Asset> AssetTarget<'a, T> {
pub fn new(assets: ResMut<'a, Assets<T>>) -> Self {
Self {
assets,
handle: Handle::weak(HandleId::default::<T>()),
handle: Handle::Weak(AssetId::default()),
}
}

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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();
Expand Down
Loading