From 806b21df08d4b721c1c7539df6384419648c466e Mon Sep 17 00:00:00 2001 From: Bui Date: Sun, 30 Dec 2018 14:35:15 +0000 Subject: [PATCH 1/2] add over1500 combo sound --- public/src/js/assets.js | 4 +++- public/src/js/game.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/src/js/assets.js b/public/src/js/assets.js index e43aad9..0571b24 100644 --- a/public/src/js/assets.js +++ b/public/src/js/assets.js @@ -63,6 +63,7 @@ var assets = { "combo-1200-meka.wav", "combo-1300-meka.wav", "combo-1400-meka.wav", + "combo-over1500-meka.wav", "fullcombo-meka.wav", "song-select.wav", @@ -94,7 +95,8 @@ var assets = { "combo-1200.wav", "combo-1300.wav", "combo-1400.wav", - + "combo-over1500.wav", + "fullcombo.wav", "gamefullcombo.wav", "gameclear.wav", diff --git a/public/src/js/game.js b/public/src/js/game.js index e7d788d..7588cc5 100644 --- a/public/src/js/game.js +++ b/public/src/js/game.js @@ -413,8 +413,8 @@ class Game{ if(this.combo > this.globalScore.maxCombo){ this.globalScore.maxCombo = this.combo } - if(this.combo === 50 || this.combo > 0 && this.combo % 100 === 0 && this.combo <= 1400){ - this.controller.playSoundMeka("combo-" + this.combo) + if(this.combo === 50 || this.combo > 0 && this.combo % 100 === 0){ + this.controller.playSoundMeka("combo-" + (this.combo <= 1400 ? this.combo : "over1500")) } this.view.updateCombo(this.combo) } From e8d33487e0e51d06734a21c1b1e05329150b24db Mon Sep 17 00:00:00 2001 From: Bui Date: Sun, 30 Dec 2018 16:50:58 +0000 Subject: [PATCH 2/2] over1500combo every 500 instead of 100 --- public/src/js/game.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/js/game.js b/public/src/js/game.js index 7588cc5..0f4543a 100644 --- a/public/src/js/game.js +++ b/public/src/js/game.js @@ -413,7 +413,7 @@ class Game{ if(this.combo > this.globalScore.maxCombo){ this.globalScore.maxCombo = this.combo } - if(this.combo === 50 || this.combo > 0 && this.combo % 100 === 0){ + if(this.combo === 50 || this.combo > 0 && this.combo % 100 === 0 && this.combo < 1500 || this.combo % 500 === 0){ this.controller.playSoundMeka("combo-" + (this.combo <= 1400 ? this.combo : "over1500")) } this.view.updateCombo(this.combo)