Fix: show score on timeover for typing exam

This commit is contained in:
2019-09-23 19:05:01 +09:00
parent 5e4fea5352
commit 7d706ae67c
2 changed files with 10 additions and 4 deletions
+9 -3
View File
@@ -101,10 +101,16 @@ Result.prototype.printRecord = function() {
scoreText.anchor.set(0.5); scoreText.anchor.set(0.5);
if(record < 0) { if(record < 0) {
scoreText.text = "제한 시간 초과!"; scoreText.style.fill = MainColor.THISTLE_STRING;
scoreText.style.fill = MainColor.INDIAN_RED_STRING;
return; var timeoverText = this.makeDefaultText(game.world.width / 2, 225);
timeoverText.text = "== 제한 시간 초과 (기록 저장 안됨) ==";
timeoverText.fontSize = 50;
timeoverText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
timeoverText.anchor.set(0.5);
timeoverText.style.fill = MainColor.INDIAN_RED_STRING;
record = -1 * record;
} }
scoreText.text = RecordUtil.getRecordValueWithUnit(record, sessionStorageManager.getPlayingAppID()); scoreText.text = RecordUtil.getRecordValueWithUnit(record, sessionStorageManager.getPlayingAppID());
+1 -1
View File
@@ -364,7 +364,7 @@ TypingExamination.prototype.startGame = function() {
TypingExamination.prototype.timeOver = function() { TypingExamination.prototype.timeOver = function() {
var timeOverText = new TimeOverText(); var timeOverText = new TimeOverText();
sessionStorageManager.setRecord(-1); sessionStorageManager.setRecord(-1 * this.typingRecordTotal);
this.stopAndGoResult(); this.stopAndGoResult();
} }