Minor edit
parent
570944cb77
commit
f1e0a47f25
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue