Player modifs

This commit is contained in:
2026-09-15 23:50:33 +02:00
parent 82b8bbb699
commit 4db771c8c6
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -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);
}
+1 -1
View File
@@ -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)]