mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-15 12:15:01 +01:00
Add player entity
This commit is contained in:
parent
6ca737f36c
commit
5a6fe33e1e
7 changed files with 150 additions and 31 deletions
20
src/debug.rs
Normal file
20
src/debug.rs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue