Fix: best record display, replay button
This commit is contained in:
@@ -64,7 +64,8 @@ class ScreenBottom {
|
|||||||
}
|
}
|
||||||
|
|
||||||
printBottomLeftTextWithBestRecord(bestRecord) {
|
printBottomLeftTextWithBestRecord(bestRecord) {
|
||||||
let highScoreWithCommas = NumberUtil.numberWithCommas(bestRecord);
|
let roundUpBestRecord = Math.round(bestRecord);
|
||||||
|
let highScoreWithCommas = NumberUtil.numberWithCommas(roundUpBestRecord);
|
||||||
this.printBottomLeftText("오늘의 최고 기록 : " + highScoreWithCommas);
|
this.printBottomLeftText("오늘의 최고 기록 : " + highScoreWithCommas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class Result {
|
|||||||
this.printRecord();
|
this.printRecord();
|
||||||
this.uploadRecord();
|
this.uploadRecord();
|
||||||
|
|
||||||
this.makeStartButton();
|
this.makeRestartButton();
|
||||||
|
|
||||||
let recordBoard = new RecordBoard();
|
let recordBoard = new RecordBoard();
|
||||||
|
|
||||||
@@ -92,15 +92,21 @@ class Result {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
makeStartButton() {
|
makeRestartButton() {
|
||||||
let setting = new RoundRectButtonSetting(game.world.centerX, game.world.height / 2 - 70, 200, 100);
|
let setting = new RoundRectButtonSetting(game.world.centerX, game.world.height / 2 - 70, 200, 100);
|
||||||
setting.fontStyle.fontWeight = "bold";
|
setting.fontStyle.fontWeight = "bold";
|
||||||
|
|
||||||
let startButton = new RoundRectButton(setting, RoundRectButton.NONE_ICON, "다시 시작", this.startStage);
|
let startButton = new RoundRectButton(setting, RoundRectButton.NONE_ICON, "다시 시작", this.restartStage);
|
||||||
}
|
}
|
||||||
|
|
||||||
startStage() {
|
restartStage() {
|
||||||
|
if(sessionStorageManager.playingAppName.indexOf("practice_") == 0) {
|
||||||
|
location.href = "../../web/client/typing_practice.html";
|
||||||
|
} else if(sessionStorageManager.playingAppName.indexOf("test_") == 0) {
|
||||||
|
location.href = "../../web/client/typing_test.html";
|
||||||
|
} else {
|
||||||
location.href = "../../web/client/" + sessionStorageManager.playingAppName + ".html";
|
location.href = "../../web/client/" + sessionStorageManager.playingAppName + ".html";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user