mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-15 04:05:02 +01:00
20 lines
372 B
Rust
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;
|
|
}
|
|
}
|
|
}
|