diff --git a/public/src/js/game.js b/public/src/js/game.js index 3072cf4..9f77204 100644 --- a/public/src/js/game.js +++ b/public/src/js/game.js @@ -258,6 +258,7 @@ class Game{ } this.globalScore.drumroll ++ this.globalScore.points += score + this.view.setDarkBg(false) } checkDrumroll(circle, keysKa){ var ms = this.elapsedTime @@ -283,6 +284,7 @@ class Game{ this.view.drumroll.push(circleAnim) this.globalScore.drumroll++ this.globalScore.points += score * (dai ? 2 : 1) + this.view.setDarkBg(false) } whenLastCirclePlayed(){ var ms = this.elapsedTime diff --git a/public/src/js/view.js b/public/src/js/view.js index 7ff24fd..964631e 100644 --- a/public/src/js/view.js +++ b/public/src/js/view.js @@ -1478,10 +1478,12 @@ explosion.setAnimation(false) }) } - var miss = score === 0 + this.setDarkBg(score === 0) }else{ - var miss = true + this.setDarkBg(true) } + } + setDarkBg(miss){ if(!miss && this.darkDonBg){ this.darkDonBg = false this.donBg.classList.remove("donbg-dark")