Skip to content

Commit

Permalink
Update to bevy 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastLe9enD committed Nov 23, 2023
1 parent ff6e18f commit 9a57a3d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
14 changes: 6 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_dolly"
version = "0.0.1"
version = "0.0.2"
authors = ["Black Phlox <[email protected]>"]
license = "MIT OR Apache-2.0"
edition = "2021"
Expand All @@ -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

Expand All @@ -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
2 changes: 1 addition & 1 deletion examples/fpv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions examples/orbit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ fn handle_mouse_scroll(
zoom: Res<State<ZoomType>>,
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) => {
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ fn set_camera_viewports(
mut left_camera: Query<&mut Camera, (With<LeftCamera>, Without<RightCamera>)>,
mut right_camera: Query<&mut Camera, With<RightCamera>>,
) {
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();
Expand Down

0 comments on commit 9a57a3d

Please sign in to comment.