Merge pull request #78 from Ewpratten/space-to-reset

press space to reset on death screen
This commit is contained in:
Evan Pratten 2021-10-06 08:59:31 -07:00 committed by GitHub
commit 0546453fa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,11 @@ impl Action<Scenes, ScreenError, GameContext> 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())))