Skip to content

Commit

Permalink
Reset background color when done.
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbo committed May 29, 2024
1 parent deff73b commit 451b153
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 7 additions & 1 deletion adam/adam.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
background-color: #46467c;
background-color: #31316c;
user-select: none;
overflow: hidden;
}
Expand Down Expand Up @@ -90,4 +90,10 @@ a:active {
.isa {
background-color: #fa5ca3;
}
.level2 {
background-color: #455796;
}
.level3 {
background-color: #54549f;
}

7 changes: 5 additions & 2 deletions adam/adam.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ function stopSong() {
}

function endGame() {
$body = $("body");
$body.removeClass("level2");
$body.removeClass("level3");
// Finished with the song, so no more "dots" need to be consumed.
clearInterval(timer);
// Wait to clear the 'floater' timer, however, until all the exploded letters fall.
Expand Down Expand Up @@ -245,11 +248,11 @@ function clickAdam(event, lineIndex, pieceIndex, displayTime, wasHover) {
scoreMultiplier = 1000;
score *= 1000;
soundIndex = 3; // "boip!"
$("body").css("background", "#6675b2");
$("body").addClass("level2");
}
if (prevScore < 22 && score >= 22) {
soundIndex = 3; // "boip!"
$("body").css("background", "#6262a9");
$("body").addClass("level3");
}

if (soundIndex === 0) {
Expand Down

0 comments on commit 451b153

Please sign in to comment.