Skip to content

Commit

Permalink
adjust level message timing
Browse files Browse the repository at this point in the history
  • Loading branch information
44100hertz committed Jan 24, 2024
1 parent 94ff828 commit baba6aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions games/redbricks/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ function load() {
const gameSize = new Point(240, 240);
const playfield = new Playfield("playfield", gameSize);
let deathCount = 0;
let level = Number(queryURL.get("level")) || 1;
let overrideLevel = Number(queryURL.get("level"));
let level = overrideLevel || 1;

let startTime;
function introduceLevel() {
startTime = new Date();
playfield.showMessage(`LEVEL ${level}`);
setTimeout(start, 1000);
setTimeout(start, overrideLevel ? 500 : 2000);
}

function start() {
Expand Down

0 comments on commit baba6aa

Please sign in to comment.