rm player.rs

This commit is contained in:
yuni 2024-03-19 03:57:45 +01:00
parent 77acbfbd9b
commit 60370ad583

View file

@ -1,21 +0,0 @@
use bevy::prelude::*;
use bevy::window::PrimaryWindow;
pub fn handle_input(
keyboard_input: Res<ButtonInput<KeyCode>>,
mut windows: Query<&mut Window, With<PrimaryWindow>>,
) {
let window_result = windows.get_single_mut();
let mut focused = true;
if window_result.is_ok() {
let window = window_result.unwrap();
if !window.focused {
focused = false;
}
}
if focused {
if keyboard_input.pressed(KeyCode::KeyW) {
}
}
}