Fix: score table
This commit is contained in:
@@ -84,21 +84,21 @@ JustOnTime.prototype.create = function() {
|
|||||||
this.makeGuideButton(
|
this.makeGuideButton(
|
||||||
418, JustOnTime.GUIDE_BUTTON_POS_Y,
|
418, JustOnTime.GUIDE_BUTTON_POS_Y,
|
||||||
"1초 ~ 0.5초",
|
"1초 ~ 0.5초",
|
||||||
"점수 : 시작 초의 " + TimerStage.REWARD_SOSO + "배",
|
"점수 : 기다린 시간의 " + TimerStage.REWARD_SOSO + "배",
|
||||||
0xDAA520
|
0xDAA520
|
||||||
);
|
);
|
||||||
|
|
||||||
this.makeGuideButton(
|
this.makeGuideButton(
|
||||||
612, JustOnTime.GUIDE_BUTTON_POS_Y,
|
612, JustOnTime.GUIDE_BUTTON_POS_Y,
|
||||||
"0.5초 ~ 0.2초",
|
"0.5초 ~ 0.2초",
|
||||||
"점수 : 시작 초의 " + TimerStage.REWARD_GOOD + "배",
|
"점수 : 기다린 시간의 " + TimerStage.REWARD_GOOD + "배",
|
||||||
0xD2691E
|
0xD2691E
|
||||||
);
|
);
|
||||||
|
|
||||||
this.makeGuideButton(
|
this.makeGuideButton(
|
||||||
805, JustOnTime.GUIDE_BUTTON_POS_Y,
|
805, JustOnTime.GUIDE_BUTTON_POS_Y,
|
||||||
"0.2초 ~ 0초",
|
"0.2초 ~ 0초",
|
||||||
"점수 : 시작 초의 " + TimerStage.REWARD_GREAT + "배",
|
"점수 : 기다린 시간의 " + TimerStage.REWARD_GREAT + "배",
|
||||||
0xA52A2A
|
0xA52A2A
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -134,14 +134,23 @@ TimerStage.prototype.decideGrade = function(timeLeft) {
|
|||||||
this.updateTimeScoreRecordArray();
|
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) {
|
TimerStage.prototype.gradeGreat = function(timeLeft) {
|
||||||
// console.log("Great")
|
// console.log("Great")
|
||||||
var startTime = Math.floor(this.timeLimitMS / 1000);
|
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);
|
this.onPlusScoreEventHandler(score, timeLeft);
|
||||||
var animationNote = new AnimationNote(
|
var animationNote = new AnimationNote(
|
||||||
this.posX, this.posY,
|
this.posX, this.posY,
|
||||||
startTime + "초 X " + TimerStage.REWARD_GREAT + "배 = " + score,
|
score + " X " + TimerStage.REWARD_GREAT + "배 = " + NumberUtil.numberWithCommas(Math.floor(score)),
|
||||||
"Brown"
|
"Brown"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -157,11 +166,11 @@ TimerStage.prototype.gradeGreat = function(timeLeft) {
|
|||||||
TimerStage.prototype.gradeGood = function(timeLeft) {
|
TimerStage.prototype.gradeGood = function(timeLeft) {
|
||||||
// console.log("Good")
|
// console.log("Good")
|
||||||
var startTime = Math.floor(this.timeLimitMS / 1000);
|
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);
|
this.onPlusScoreEventHandler(score, timeLeft);
|
||||||
var animationNote = new AnimationNote(
|
var animationNote = new AnimationNote(
|
||||||
this.posX, this.posY,
|
this.posX, this.posY,
|
||||||
startTime + "초 X " + TimerStage.REWARD_GOOD + "배 = " + score,
|
score + " X " + TimerStage.REWARD_GOOD + "배 = " + NumberUtil.numberWithCommas(Math.floor(score)),
|
||||||
"Chocolate"
|
"Chocolate"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -177,11 +186,11 @@ TimerStage.prototype.gradeGood = function(timeLeft) {
|
|||||||
TimerStage.prototype.gradeSoSo = function(timeLeft) {
|
TimerStage.prototype.gradeSoSo = function(timeLeft) {
|
||||||
// console.log("SoSo")
|
// console.log("SoSo")
|
||||||
var startTime = Math.floor(this.timeLimitMS / 1000);
|
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);
|
this.onPlusScoreEventHandler(score, timeLeft);
|
||||||
var animationNote = new AnimationNote(
|
var animationNote = new AnimationNote(
|
||||||
this.posX, this.posY,
|
this.posX, this.posY,
|
||||||
startTime + "초 X " + TimerStage.REWARD_SOSO + "배 = " + score,
|
score + " X " + TimerStage.REWARD_SOSO + "배 = " + NumberUtil.numberWithCommas(Math.floor(score)),
|
||||||
"GoldenRod"
|
"GoldenRod"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -197,7 +206,7 @@ TimerStage.prototype.gradeSoSo = function(timeLeft) {
|
|||||||
TimerStage.prototype.gradeBad = function(timeLeft) {
|
TimerStage.prototype.gradeBad = function(timeLeft) {
|
||||||
// console.log("Bad")
|
// console.log("Bad")
|
||||||
var startTime = Math.floor(this.timeLimitMS / 1000);
|
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);
|
this.onPlusScoreEventHandler(score, timeLeft);
|
||||||
var animationNote = new AnimationNote(
|
var animationNote = new AnimationNote(
|
||||||
this.posX, this.posY,
|
this.posX, this.posY,
|
||||||
@@ -259,12 +268,12 @@ TimerStage.GRADE_GREAT_MS = 200;
|
|||||||
TimerStage.GRADE_GOOD_MS = 500;
|
TimerStage.GRADE_GOOD_MS = 500;
|
||||||
TimerStage.GRADE_SOSO_MS = 1000;
|
TimerStage.GRADE_SOSO_MS = 1000;
|
||||||
|
|
||||||
TimerStage.REWARD_GREAT = 10;
|
TimerStage.REWARD_GREAT = 4;
|
||||||
TimerStage.REWARD_GOOD = 3;
|
TimerStage.REWARD_GOOD = 2;
|
||||||
TimerStage.REWARD_SOSO = 2;
|
TimerStage.REWARD_SOSO = 1;
|
||||||
TimerStage.REWARD_BAD = 0;
|
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_GOOD_MS = 1000;
|
||||||
TimerStage.TIME_EXTENSION_SOSO_MS = 500;
|
TimerStage.TIME_EXTENSION_SOSO_MS = 500;
|
||||||
TimerStage.TIME_EXTENSION_BAD_MS = 0;
|
TimerStage.TIME_EXTENSION_BAD_MS = 0;
|
||||||
Reference in New Issue
Block a user