This commit is contained in:
Renan LE CARO 2025-04-24 12:54:19 +02:00
parent aa8d816d68
commit 0035a9abb5
7 changed files with 2124 additions and 2124 deletions

View file

@ -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);