diff --git a/crates/border-wars/src/camera.rs b/crates/border-wars/src/camera.rs index b61a30c..ec94a64 100644 --- a/crates/border-wars/src/camera.rs +++ b/crates/border-wars/src/camera.rs @@ -56,7 +56,13 @@ fn init_camera(mut commands: Commands) { commands.spawn(Camera2dBundle::default()); } -/// Initializes the key movement settings for the camera. +/// Initializes the resources related to the camera. +/// +/// - [KeysMovementSettings]: The key settings for camera movement. +/// - [CameraSpeedMouvement]: The speed of camera movement. +/// - [CameraSpeedScale]: The speed of camera scaling. +/// - [MinScale]: The minimum scale of the camera. +/// - [MaxScale]: The maximum scale of the camera. fn init_resources(mut commands: Commands) { commands.insert_resource(KeysMovementSettings { up: KeyCode::Z, @@ -94,15 +100,15 @@ fn movement_system( } } -/// Scales the camera with mouse input. +/// Scales the view with mouse input. fn scale_system( - mut scroll_ev: EventReader, + mut scroll_event: EventReader, mut query: Query<&mut OrthographicProjection, With>, min_scale: Res, max_scale: Res, scale_speed: Res, ) { - for ev in scroll_ev.read() { + for ev in scroll_event.read() { for mut projection in query.iter_mut() { if ev.unit != MouseScrollUnit::Line { return;