diff --git a/src/main.rs b/src/main.rs index f2efb27..cd9e4dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ use bevy::{prelude::*, window::PresentMode}; use crate::player::PlayerPlugin; +mod camera; mod player; fn main() { @@ -17,10 +18,10 @@ fn main() { })) .insert_resource(ClearColor(Color::srgb(0.0, 0.0, 0.0))) .add_systems(Startup, setup) - .add_plugins(PlayerPlugin) + .add_plugins(PlayerPlugin) // Player .run(); } -fn setup(mut command: Commands) { - command.spawn(Camera2d); +fn setup(mut commands: Commands) { + commands.spawn(Camera2d); } diff --git a/src/player.rs b/src/player.rs index 60e0eed..03c53ae 100644 --- a/src/player.rs +++ b/src/player.rs @@ -6,7 +6,7 @@ const HORIZONTAL_SPEED: f32 = 300.0; // Lateral movement speed // The player #[derive(Component)] -struct Player; +pub struct Player; // Speed of the player #[derive(Component)]