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
|
@ -1,5 +1,5 @@
|
|||
// The version of the cache.
|
||||
const VERSION = "29035764";
|
||||
const VERSION = "29035871";
|
||||
|
||||
// The name of the cache
|
||||
const CACHE_NAME = `breakout-71-${VERSION}`;
|
||||
|
|
|
@ -1 +1 @@
|
|||
"29035764"
|
||||
"29035871"
|
||||
|
|
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import { isOptionOn } from "./options";
|
|||
export function setMousePos(gameState: GameState, x: number) {
|
||||
// Sets the puck position, and updates the ball position if they are supposed to follow it
|
||||
gameState.puckPosition = x;
|
||||
gameState.needsRender=true
|
||||
gameState.needsRender = true;
|
||||
}
|
||||
|
||||
function getBallDefaultVx(gameState: GameState) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue