From 9a57a3dc5957743bcec9d9b1decddc90f9d5f973 Mon Sep 17 00:00:00 2001 From: BeastLe9enD Date: Thu, 23 Nov 2023 20:59:18 +0100 Subject: [PATCH] Update to bevy 0.12 --- Cargo.toml | 14 ++++++-------- examples/fpv.rs | 2 +- examples/orbit.rs | 4 ++-- examples/split.rs | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8d72fbc..58d0ff3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_dolly" -version = "0.0.1" +version = "0.0.2" authors = ["Black Phlox "] license = "MIT OR Apache-2.0" edition = "2021" @@ -15,8 +15,6 @@ exclude = [ ".github/*", ] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [profile.dev] opt-level = 3 @@ -30,22 +28,22 @@ helpers = ["dep:leafwing-input-manager"] [dependencies] dolly = { path = "dolly", default-features = false } -leafwing-input-manager = { version = "0.10", optional = true } +leafwing-input-manager = { version = "0.11.1", optional = true } [dependencies.bevy] -version = "0.11.0" +version = "0.12.0" features = ["bevy_render", "bevy_asset", "bevy_pbr"] default-features = false [dev-dependencies] -leafwing-input-manager = "0.10" +leafwing-input-manager = "0.11.1" [dev-dependencies.bevy] -version = "0.11.0" +version = "0.12.0" features = ["bevy_core_pipeline", "bevy_asset", "bevy_scene", "bevy_pbr", "bevy_winit", "bevy_gltf", "bevy_sprite", "png", "ktx2", "zstd", "tonemapping_luts"] default-features = false [target.'cfg(target_os = "linux")'.dev-dependencies.bevy] -version = "0.11.0" +version = "0.12.0" features = ["x11", "wayland"] default-features = false diff --git a/examples/fpv.rs b/examples/fpv.rs index d25a452..0d3bcb8 100644 --- a/examples/fpv.rs +++ b/examples/fpv.rs @@ -140,7 +140,7 @@ fn update_camera( }; let mut delta = Vec2::ZERO; - for event in mouse_motion_events.iter() { + for event in mouse_motion_events.read() { delta += event.delta; } delta.x *= sensitivity.x; diff --git a/examples/orbit.rs b/examples/orbit.rs index 251df38..4ee78b1 100644 --- a/examples/orbit.rs +++ b/examples/orbit.rs @@ -197,7 +197,7 @@ fn handle_mouse_scroll( zoom: Res>, mut rig_q: Query<&mut Rig>, ) { - for mouse_wheel_event in mouse_wheel_events.iter() { + for mouse_wheel_event in mouse_wheel_events.read() { for mut projection in &mut q_main.iter_mut() { match &mut projection.as_mut() { Projection::Perspective(pers) => { @@ -235,7 +235,7 @@ fn update_camera( let sensitivity = Vec2::splat(2.0); let mut delta = Vec2::ZERO; - for event in mouse_motion_events.iter() { + for event in mouse_motion_events.read() { delta += event.delta; } diff --git a/examples/split.rs b/examples/split.rs index d2702c5..e773bb8 100644 --- a/examples/split.rs +++ b/examples/split.rs @@ -124,7 +124,7 @@ fn set_camera_viewports( mut left_camera: Query<&mut Camera, (With, Without)>, mut right_camera: Query<&mut Camera, With>, ) { - for resize_event in resize_events.iter() { + for resize_event in resize_events.read() { if let Ok((entity, window)) = windows.get_single() { if resize_event.window == entity { let mut left_camera = left_camera.single_mut();