From ef0771d67ca4b50a10c140ec8fb6bd24f05958d6 Mon Sep 17 00:00:00 2001 From: Silas Bartha Date: Wed, 31 Jul 2024 11:44:07 -0400 Subject: Add "just pressed" input tracking --- src/input/systems.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/input/systems.rs') diff --git a/src/input/systems.rs b/src/input/systems.rs index 9560e1e..9be9f25 100644 --- a/src/input/systems.rs +++ b/src/input/systems.rs @@ -29,7 +29,8 @@ pub fn input_handling( mut input: ResMut, mut event_writer: EventWriter, ) { - input.clear_released(); + input.clear_just_released(); + input.clear_just_pressed(); let mut event_queue = event_queue.0.lock().unwrap(); let mut key_events = Vec::::new(); while let Some(event) = event_queue.pop() { @@ -51,4 +52,4 @@ pub fn input_handling( _ => (), } } -} \ No newline at end of file +} -- cgit v1.2.3