Fix: score table

This commit is contained in:
2019-12-05 06:37:10 +09:00
parent 68dba8232e
commit b40749b4a4
2 changed files with 23 additions and 14 deletions
+3 -3
View File
@@ -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
);
+20 -11
View File
@@ -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;