game-wip-dontplay/src/debug.rs
2023-04-03 18:12:36 +02:00

20 lines
372 B
Rust

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