diff --git a/crates/playeragent/src/inputstatus.rs b/crates/playeragent/src/inputstatus.rs index a85187f..4159b7d 100644 --- a/crates/playeragent/src/inputstatus.rs +++ b/crates/playeragent/src/inputstatus.rs @@ -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 {