Add crashing

This commit is contained in:
asraelite 2018-03-07 14:51:18 +00:00
parent bd97945e66
commit 60f77c36a9
9 changed files with 67 additions and 10 deletions

View file

@ -26,7 +26,7 @@ export function tick() {
if (state.editing) {
tickEditing();
} else if (state.playing) {
} else if (state.playing && !state.gameOver) {
tickPlaying();
}
@ -36,6 +36,10 @@ export function tick() {
}
}
if (state.gameOver) {
audio.stop('engine');
}
if (pressed[mapping.toggleMusic]) {
audio.toggle('music');
}