only restart on fresh press of spacebar

This commit is contained in:
Timothy Stiles committed 2020-09-26 23:01:42 +10:00
1 parent 5b7273e9d9
commit e908434a20
1 file changed
+3 -1
+3 -1
View File
@@ -530,7 +530,9 @@ class Player extends PrimaryView {
}
else {
// Restart
this.restart_level();
if (!this.current_keys.has(ev.key)) {
this.restart_level();
}
}
return;
}