Skip to content

Commit

Permalink
fmt & clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackPhlox committed Sep 17, 2023
1 parent 11bf9b6 commit 469fe14
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/drivers/fpv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ pub struct CCFpv;
impl Plugin for CCFpv {
fn build(&self, app: &mut App) {
app.add_rig_component(CCFpv)
.add_startup_system(setup_fpv)
.add_systems(Startup, setup_fpv)
.add_state::<MovementType>()
.add_system(update_fpv_camera);
.add_systems(Update, update_fpv_camera);
}
}

Expand Down Expand Up @@ -63,7 +63,7 @@ pub fn update_fpv_camera(
) {
let time_delta_seconds: f32 = time.delta_seconds();
let boost_mult = 5.0f32;
let sensitivity = Vec2::splat(1.0);
let _sensitivity = Vec2::splat(1.0);

let mut move_vec = Vec3::ZERO;

Expand Down
6 changes: 3 additions & 3 deletions src/drivers/orbit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ impl Plugin for CCOrbit {
fn build(&self, app: &mut App) {
app.add_rig_component(CCOrbit)
.add_state::<Pan>()
.add_startup_system(setup_orbit.after(CCSetupLabel))
.add_system(handle_mouse_scroll)
.add_system(update_orbit_camera);
.add_systems(Startup, setup_orbit.after(CCSetupLabel))
.add_systems(Update, handle_mouse_scroll)
.add_systems(Update, update_orbit_camera);
}
}

Expand Down
13 changes: 8 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ pub mod drivers;

use bevy::{
prelude::{
default, App, Camera, Commands, Component,
OrthographicProjection, Plugin, Query, Res, Resource, SystemSet,
Transform, Vec3, With, Camera3dBundle, Camera2dBundle, Update, Startup, IntoSystemConfigs,
default, App, Camera, Camera2dBundle, Camera3dBundle, Commands, Component,
IntoSystemConfigs, OrthographicProjection, Plugin, Query, Res, Resource, Startup,
SystemSet, Transform, Update, Vec3, With,
},
render::camera::ScalingMode,
};
Expand All @@ -30,7 +30,10 @@ impl Plugin for ConfigCam {
player: Player::None,
..Default::default()
})
.add_systems(Startup, camera_setup.run_if(is_init_cameras).in_set(CCSetupLabel))
.add_systems(
Startup,
camera_setup.run_if(is_init_cameras).in_set(CCSetupLabel),
)
.add_plugins(CCFpv)
.add_plugins(CCOrbit)
.add_systems(Update, change_driver_system)
Expand Down Expand Up @@ -84,7 +87,7 @@ fn is_init_cameras(config: Res<CCConfig>) -> bool {
config.init_cameras
}

fn camera_setup(mut commands: Commands, config: Res<CCConfig>) {
fn camera_setup(mut commands: Commands, _config: Res<CCConfig>) {
commands.spawn((
MainCamera,
PerspectiveCamera,
Expand Down

0 comments on commit 469fe14

Please sign in to comment.