Minor edit

master
Mark 2024-01-27 08:07:33 -08:00
parent 570944cb77
commit f1e0a47f25
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
1 changed files with 6 additions and 1 deletions

View File

@ -16,7 +16,7 @@ pub struct InputStatus {
key_guns: bool, key_guns: bool,
key_leftclick: bool, key_leftclick: bool,
// One-shot keys (audomatically released at the end of each frame) // One-shot keys (automatically released at the end of each frame)
key_land: bool, key_land: bool,
v_scroll: f32, v_scroll: f32,
} }
@ -137,6 +137,11 @@ impl InputStatus {
self.key_guns self.key_guns
} }
/// Is the player pressing the left mouse button?
pub fn pressed_leftclick(&self) -> bool {
self.key_leftclick
}
/// Has the player pressed the "land" key? /// Has the player pressed the "land" key?
/// (One-shot, reset to false at the start of each frame) /// (One-shot, reset to false at the start of each frame)
pub fn pressed_land(&self) -> bool { pub fn pressed_land(&self) -> bool {