press space to reset on death screen

This commit is contained in:
Luna 2021-10-06 02:01:35 -04:00
parent 10ca740496
commit f39dfab057

View File

@ -64,7 +64,11 @@ impl Action<Scenes, ScreenError, GameContext> for DeathScreen {
let elapsed = Utc::now() - context.level_start_time; let elapsed = Utc::now() - context.level_start_time;
self.timer_value = format!("{:02}:{:02}", elapsed.num_minutes(), elapsed.num_seconds() % 60); 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 context
.flag_send .flag_send
.send(Some(ControlFlag::SoundTrigger("button-press".to_string()))) .send(Some(ControlFlag::SoundTrigger("button-press".to_string())))