From b40749b4a44d315d94d90e352f5ea4e6a8421590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Thu, 5 Dec 2019 06:37:10 +0900 Subject: [PATCH] Fix: score table --- src/game/mouse/just_on_time/just_on_time.js | 6 ++-- src/game/mouse/just_on_time/timer_stage.js | 31 +++++++++++++-------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/game/mouse/just_on_time/just_on_time.js b/src/game/mouse/just_on_time/just_on_time.js index 2b7cb55..387392d 100644 --- a/src/game/mouse/just_on_time/just_on_time.js +++ b/src/game/mouse/just_on_time/just_on_time.js @@ -84,21 +84,21 @@ JustOnTime.prototype.create = function() { this.makeGuideButton( 418, JustOnTime.GUIDE_BUTTON_POS_Y, "1초 ~ 0.5초", - "점수 : 시작 초의 " + TimerStage.REWARD_SOSO + "배", + "점수 : 기다린 시간의 " + TimerStage.REWARD_SOSO + "배", 0xDAA520 ); this.makeGuideButton( 612, JustOnTime.GUIDE_BUTTON_POS_Y, "0.5초 ~ 0.2초", - "점수 : 시작 초의 " + TimerStage.REWARD_GOOD + "배", + "점수 : 기다린 시간의 " + TimerStage.REWARD_GOOD + "배", 0xD2691E ); this.makeGuideButton( 805, JustOnTime.GUIDE_BUTTON_POS_Y, "0.2초 ~ 0초", - "점수 : 시작 초의 " + TimerStage.REWARD_GREAT + "배", + "점수 : 기다린 시간의 " + TimerStage.REWARD_GREAT + "배", 0xA52A2A ); diff --git a/src/game/mouse/just_on_time/timer_stage.js b/src/game/mouse/just_on_time/timer_stage.js index c6e0d7c..73f3057 100644 --- a/src/game/mouse/just_on_time/timer_stage.js +++ b/src/game/mouse/just_on_time/timer_stage.js @@ -134,14 +134,23 @@ TimerStage.prototype.decideGrade = function(timeLeft) { this.updateTimeScoreRecordArray(); } +TimerStage.prototype.getScoreTime = function(startTime, timeLeft, rewardRatio) { + var floorStartTime = Math.floor(startTime / 10); + var floorTimeLeft = Math.floor(timeLeft / 10); + var score = (floorStartTime - floorTimeLeft) * rewardRatio; + + // console.log(score); + return score; +} + TimerStage.prototype.gradeGreat = function(timeLeft) { // console.log("Great") var startTime = Math.floor(this.timeLimitMS / 1000); - var score = startTime * TimerStage.REWARD_GREAT; + var score = this.getScoreTime(this.timeLimitMS, timeLeft, TimerStage.REWARD_GREAT); this.onPlusScoreEventHandler(score, timeLeft); var animationNote = new AnimationNote( this.posX, this.posY, - startTime + "초 X " + TimerStage.REWARD_GREAT + "배 = " + score, + score + " X " + TimerStage.REWARD_GREAT + "배 = " + NumberUtil.numberWithCommas(Math.floor(score)), "Brown" ); @@ -157,11 +166,11 @@ TimerStage.prototype.gradeGreat = function(timeLeft) { TimerStage.prototype.gradeGood = function(timeLeft) { // console.log("Good") var startTime = Math.floor(this.timeLimitMS / 1000); - var score = startTime * TimerStage.REWARD_GOOD; + var score = this.getScoreTime(this.timeLimitMS, timeLeft, TimerStage.REWARD_GOOD); this.onPlusScoreEventHandler(score, timeLeft); var animationNote = new AnimationNote( this.posX, this.posY, - startTime + "초 X " + TimerStage.REWARD_GOOD + "배 = " + score, + score + " X " + TimerStage.REWARD_GOOD + "배 = " + NumberUtil.numberWithCommas(Math.floor(score)), "Chocolate" ); @@ -177,11 +186,11 @@ TimerStage.prototype.gradeGood = function(timeLeft) { TimerStage.prototype.gradeSoSo = function(timeLeft) { // console.log("SoSo") var startTime = Math.floor(this.timeLimitMS / 1000); - var score = startTime * TimerStage.REWARD_SOSO; + var score = this.getScoreTime(this.timeLimitMS, timeLeft, TimerStage.REWARD_SOSO); this.onPlusScoreEventHandler(score, timeLeft); var animationNote = new AnimationNote( this.posX, this.posY, - startTime + "초 X " + TimerStage.REWARD_SOSO + "배 = " + score, + score + " X " + TimerStage.REWARD_SOSO + "배 = " + NumberUtil.numberWithCommas(Math.floor(score)), "GoldenRod" ); @@ -197,7 +206,7 @@ TimerStage.prototype.gradeSoSo = function(timeLeft) { TimerStage.prototype.gradeBad = function(timeLeft) { // console.log("Bad") var startTime = Math.floor(this.timeLimitMS / 1000); - var score = startTime * TimerStage.REWARD_BAD; + var score = this.getScoreTime(this.timeLimitMS, timeLeft, TimerStage.REWARD_BAD); this.onPlusScoreEventHandler(score, timeLeft); var animationNote = new AnimationNote( this.posX, this.posY, @@ -259,12 +268,12 @@ TimerStage.GRADE_GREAT_MS = 200; TimerStage.GRADE_GOOD_MS = 500; TimerStage.GRADE_SOSO_MS = 1000; -TimerStage.REWARD_GREAT = 10; -TimerStage.REWARD_GOOD = 3; -TimerStage.REWARD_SOSO = 2; +TimerStage.REWARD_GREAT = 4; +TimerStage.REWARD_GOOD = 2; +TimerStage.REWARD_SOSO = 1; TimerStage.REWARD_BAD = 0; -TimerStage.TIME_EXTENSION_GREAT_MS = 3000; +TimerStage.TIME_EXTENSION_GREAT_MS = 2000; TimerStage.TIME_EXTENSION_GOOD_MS = 1000; TimerStage.TIME_EXTENSION_SOSO_MS = 500; TimerStage.TIME_EXTENSION_BAD_MS = 0; \ No newline at end of file