Player modifs

This commit is contained in:
2026-09-16 00:15:05 +02:00
parent 4db771c8c6
commit 1955087319
+2 -2
View File
@@ -10,7 +10,7 @@ pub struct Player;
// Speed of the player // Speed of the player
#[derive(Component)] #[derive(Component)]
struct Velocity(Vec2); pub struct Velocity(Vec2);
// Spawn entity player // Spawn entity player
fn spawn_player(mut commands: Commands) { fn spawn_player(mut commands: Commands) {
@@ -23,7 +23,7 @@ fn spawn_player(mut commands: Commands) {
} }
// Input + movement system for the player // Input + movement system for the player
fn move_player( pub(crate) fn move_player(
input: Res<ButtonInput<KeyCode>>, input: Res<ButtonInput<KeyCode>>,
time: Res<Time>, time: Res<Time>,
mut player: Query<(&mut Velocity, &mut Transform), With<Player>>, mut player: Query<(&mut Velocity, &mut Transform), With<Player>>,