Player modifs
This commit is contained in:
+4
-3
@@ -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
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user