rm player.rs
This commit is contained in:
parent
77acbfbd9b
commit
60370ad583
|
@ -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) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue