mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-06-16 03:05:03 -04:00
wip
This commit is contained in:
parent
aa8d816d68
commit
0035a9abb5
7 changed files with 2124 additions and 2124 deletions
|
@ -28,10 +28,12 @@ export function addToTotalPlayTime(ms: number) {
|
|||
|
||||
export function gameOver(title: string, intro: string) {
|
||||
if (!gameState.running) return;
|
||||
|
||||
// Ignore duplicated calls, can happen when ticking is split in multiple updates because the ball goes fast
|
||||
if (gameState.isGameOver) return;
|
||||
|
||||
gameState.isGameOver = true;
|
||||
pause(true);
|
||||
pause(false);
|
||||
askForPersistentStorage();
|
||||
stopRecording();
|
||||
addToTotalPlayTime(gameState.runStatistics.runTime);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue