From 41cc584295f0458869e2fed261b2c8f3a490c5b5 Mon Sep 17 00:00:00 2001 From: LoveEevee Date: Sat, 15 Sep 2018 20:27:53 +0300 Subject: [PATCH] Add drumroll count to the scoreboard --- public/src/js/game.js | 3 +++ public/src/js/scoresheet.js | 1 + public/src/views/scoresheet.html | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/public/src/js/game.js b/public/src/js/game.js index ed3078a..7d660dd 100644 --- a/public/src/js/game.js +++ b/public/src/js/game.js @@ -12,6 +12,7 @@ class Game{ good: 0, fail: 0, maxCombo: 0, + drumroll: 0, hp: 0, song: selectedSong.title } @@ -196,6 +197,7 @@ class Game{ var score = 300 circle.hit() } + this.globalScore.drumroll ++ this.globalScore.points += score } checkDrumroll(circle){ @@ -211,6 +213,7 @@ class Game{ circleAnim.played(score) circleAnim.animate() this.controller.view.drumroll.push(circleAnim) + this.globalScore.drumroll ++ this.globalScore.points += score } whenLastCirclePlayed(){ diff --git a/public/src/js/scoresheet.js b/public/src/js/scoresheet.js index add2800..766f2a9 100644 --- a/public/src/js/scoresheet.js +++ b/public/src/js/scoresheet.js @@ -34,6 +34,7 @@ class Scoresheet{ this.altText(this.elem("nb-good", scoreCont), score.good) this.altText(this.elem("nb-fail", scoreCont), score.fail) this.altText(this.elem("max-combo", scoreCont), score.maxCombo) + this.altText(this.elem("nb-drumroll", scoreCont), score.drumroll) addEventListener("resize", () => { this.positionning(scoreCont) diff --git a/public/src/views/scoresheet.html b/public/src/views/scoresheet.html index aac079a..88e93f7 100644 --- a/public/src/views/scoresheet.html +++ b/public/src/views/scoresheet.html @@ -21,7 +21,7 @@ 可 - + 連打数 不可