This commit is contained in:
Renan LE CARO 2025-04-08 10:36:30 +02:00
parent e1c20627bc
commit 6ef13f2d19
15 changed files with 289 additions and 65 deletions

View file

@ -74,6 +74,7 @@ import { getHistory } from "./gameOver";
import { generateSaveFileContent } from "./generateSaveFileContent";
import { runHistoryViewerMenuEntry } from "./runHistoryViewer";
import { getNearestUnlockHTML, openScorePanel } from "./openScorePanel";
import {monitorLevelsUnlocks} from "./monitorLevelsUnlocks";
export async function play() {
if (await applyFullScreenChoice()) return;
@ -422,6 +423,10 @@ setInterval(() => {
FPSCounter = 0;
}, 1000);
setInterval(() => {
monitorLevelsUnlocks(gameState)
}, 500);
window.addEventListener("visibilitychange", () => {
if (document.hidden) {
pause(true);