From 4db771c8c65b3bce85ea54105f838b19171af7d8 Mon Sep 17 00:00:00 2001 From: zefad Date: Tue, 15 Sep 2026 23:50:33 +0200 Subject: [PATCH] Player modifs --- src/main.rs | 7 ++++--- src/player.rs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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)]