diff --git a/src/main.rs b/src/main.rs index 9c2a5bb..5a82522 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ -use bevy::{prelude::*, window::{PrimaryMonitor, PrimaryWindow}}; +use bevy::{prelude::*, window::PrimaryWindow}; use rand::{rngs::ThreadRng, thread_rng, Rng}; + fn main() { App::new() .add_plugins( @@ -104,7 +105,7 @@ fn update_obstacles( } fn spawn_obstacles( - mut commands: &mut Commands, + commands: &mut Commands, rand: &mut ThreadRng, window_width: f32, pipe_image: &Handle @@ -155,9 +156,23 @@ fn update_bird( time: Res