diff --git a/prototypes/src/bin/life.rs b/prototypes/src/bin/life.rs index 3e893d8..a0c062f 100644 --- a/prototypes/src/bin/life.rs +++ b/prototypes/src/bin/life.rs @@ -161,11 +161,25 @@ fn setup(mut commands: Commands) { fn play_sim(_trigger: On>, mut next: ResMut>) { next.set(SimulationState::Run); } - fn zoom_out(trigger: On>) { - todo!() + fn zoom_out(trigger: On>, mut projection: Query<&mut Projection>) { + projection.iter_mut().for_each(|mut p| { + match *p { + Projection::Orthographic(ref mut o) => { + o.scale /= 0.5; + } + _ => todo!() + } + }); } - fn zoom_in(trigger: On>) { - todo!() + fn zoom_in(trigger: On>, mut projection: Query<&mut Projection>) { + projection.iter_mut().for_each(|mut p| { + match *p { + Projection::Orthographic(ref mut o) => { + o.scale *= 0.5; + } + _ => todo!() + } + }); } // Spawn Coordiantes @@ -458,3 +472,7 @@ fn cooldown_secs(input: f32) -> impl FnMut(Local, Res