From 7d706ae67c0730f3bdb017c7fbd280dee28694f2 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: Mon, 23 Sep 2019 19:05:01 +0900 Subject: [PATCH] Fix: show score on timeover for typing exam --- src/game/result/result.js | 12 +++++++++--- src/game/typing/examination/game.js | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/game/result/result.js b/src/game/result/result.js index 305339d..13017c0 100644 --- a/src/game/result/result.js +++ b/src/game/result/result.js @@ -101,10 +101,16 @@ Result.prototype.printRecord = function() { scoreText.anchor.set(0.5); if(record < 0) { - scoreText.text = "제한 시간 초과!"; - scoreText.style.fill = MainColor.INDIAN_RED_STRING; + scoreText.style.fill = MainColor.THISTLE_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()); diff --git a/src/game/typing/examination/game.js b/src/game/typing/examination/game.js index 37131df..ac9d5e0 100644 --- a/src/game/typing/examination/game.js +++ b/src/game/typing/examination/game.js @@ -364,7 +364,7 @@ TypingExamination.prototype.startGame = function() { TypingExamination.prototype.timeOver = function() { var timeOverText = new TimeOverText(); - sessionStorageManager.setRecord(-1); + sessionStorageManager.setRecord(-1 * this.typingRecordTotal); this.stopAndGoResult(); }