Add zoom function
All checks were successful
CI / Formatting (push) Successful in 1m3s

man it took me so long to find out that Rust has a `ref` keyword lol
This commit is contained in:
Michael Bradley 2025-05-19 18:03:39 -04:00
parent 214e0ceedc
commit 245dfde91e
Signed by: MichaelBradley
SSH key fingerprint: SHA256:BKO2eI2LPsCbQS3n3i5SdwZTAIV3F1lHezR07qP+Ob0
2 changed files with 25 additions and 3 deletions

View file

@ -5,7 +5,7 @@ use clap::Parser;
mod game;
use game::{
runtime::{move_camera, move_player, quit},
runtime::{move_camera, move_player, quit, zoom_camera},
seed::Seed,
setup::{setup_balls, setup_player, setup_pseudo_random, setup_ui, setup_walls},
};
@ -44,7 +44,11 @@ impl Plugin for AppSettings {
)
.add_systems(
Update,
(move_player, quit.run_if(input_pressed(KeyCode::KeyQ))),
(
move_player,
quit.run_if(input_pressed(KeyCode::KeyQ)),
zoom_camera,
),
)
.add_systems(PostUpdate, move_camera);
}