Add player entity

This commit is contained in:
crumblingstatue 2023-04-03 15:37:14 +02:00
parent 6ca737f36c
commit 5a6fe33e1e
7 changed files with 150 additions and 31 deletions

20
src/debug.rs Normal file
View file

@ -0,0 +1,20 @@
use sfml::window::Key;
use crate::input::KbInput;
#[derive(Default)]
pub struct DebugState {
pub panel: bool,
pub freecam: bool,
}
impl DebugState {
pub fn update(&mut self, input: &KbInput) {
if input.pressed(Key::F12) {
self.panel ^= true;
}
if input.pressed(Key::F10) {
self.freecam ^= true;
}
}
}