Minor edit
parent
570944cb77
commit
f1e0a47f25
|
@ -16,7 +16,7 @@ pub struct InputStatus {
|
|||
key_guns: 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,
|
||||
v_scroll: f32,
|
||||
}
|
||||
|
@ -137,6 +137,11 @@ impl InputStatus {
|
|||
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?
|
||||
/// (One-shot, reset to false at the start of each frame)
|
||||
pub fn pressed_land(&self) -> bool {
|
||||
|
|
Loading…
Reference in New Issue