mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-22 04:56:15 -04:00
Build 29035871
This commit is contained in:
parent
bdfe5408b9
commit
d74d3be97e
9 changed files with 14 additions and 3699 deletions
10
src/game.ts
10
src/game.ts
|
@ -84,7 +84,7 @@ export function pause(playerAskedForPause: boolean) {
|
|||
gameState.pauseTimeout = null;
|
||||
document.body.className = gameState.running ? " running " : " paused ";
|
||||
scoreDisplay.className = "";
|
||||
gameState.needsRender=true
|
||||
gameState.needsRender = true;
|
||||
},
|
||||
Math.min(Math.max(0, gameState.pauseUsesDuringRun - 5) * 50, 500),
|
||||
);
|
||||
|
@ -456,11 +456,11 @@ export function tick() {
|
|||
gameState.runStatistics.runTime += timeDeltaMs;
|
||||
gameStateTick(gameState, frames);
|
||||
}
|
||||
if(gameState.running || gameState.needsRender){
|
||||
gameState.needsRender=false
|
||||
if (gameState.running || gameState.needsRender) {
|
||||
gameState.needsRender = false;
|
||||
render(gameState);
|
||||
}
|
||||
if(gameState.running){
|
||||
if (gameState.running) {
|
||||
recordOneFrame(gameState);
|
||||
}
|
||||
requestAnimationFrame(tick);
|
||||
|
@ -690,7 +690,7 @@ async function openSettingsPanel() {
|
|||
});
|
||||
if (cb) {
|
||||
cb();
|
||||
gameState.needsRender=true
|
||||
gameState.needsRender = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue