From f39dfab057b765a7ad0a09bf84c9b0ac569a140f Mon Sep 17 00:00:00 2001 From: Luna Date: Wed, 6 Oct 2021 02:01:35 -0400 Subject: [PATCH] press space to reset on death screen --- game/src/scenes/death_screen.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/game/src/scenes/death_screen.rs b/game/src/scenes/death_screen.rs index ee2d4d3..7286076 100644 --- a/game/src/scenes/death_screen.rs +++ b/game/src/scenes/death_screen.rs @@ -64,7 +64,11 @@ impl Action for DeathScreen { let elapsed = Utc::now() - context.level_start_time; self.timer_value = format!("{:02}:{:02}", elapsed.num_minutes(), elapsed.num_seconds() % 60); - if self.is_retry_pressed { + if self.is_retry_pressed || + context + .renderer + .borrow_mut() + .is_key_pressed(KeyboardKey::KEY_SPACE){ context .flag_send .send(Some(ControlFlag::SoundTrigger("button-press".to_string())))