Fix: bestRecord bug
This commit is contained in:
@@ -8,12 +8,14 @@ class ScoreManager {
|
||||
}
|
||||
|
||||
resetScore() {
|
||||
sessionStorageManager.record = 0;
|
||||
this.score = Number(sessionStorageManager.record);
|
||||
// this.score = Number(sessionStorageManager.record);
|
||||
this.score = 0;
|
||||
sessionStorageManager.record = this.score;
|
||||
|
||||
if(sessionStorageManager.bestRecord === null)
|
||||
sessionStorageManager.bestRecord = 0;
|
||||
this.highScore = Number(sessionStorageManager.bestRecord);
|
||||
this.highScore = 0;
|
||||
else
|
||||
this.highScore = Number(sessionStorageManager.bestRecord);
|
||||
}
|
||||
|
||||
callListener(functionArray) {
|
||||
|
||||
@@ -64,7 +64,8 @@ class ScreenBottom {
|
||||
}
|
||||
|
||||
printBottomLeftTextWithBestRecord(bestRecord) {
|
||||
this.printBottomLeftText("오늘의 최고 기록 : " + bestRecord);
|
||||
let highScoreWithCommas = NumberUtil.numberWithCommas(bestRecord);
|
||||
this.printBottomLeftText("오늘의 최고 기록 : " + highScoreWithCommas);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -83,4 +83,13 @@ class SessionStorageManager {
|
||||
return sessionStorage.getItem("isNewBestRecord");
|
||||
}
|
||||
|
||||
resetPlayingAppData() {
|
||||
sessionStorage.playingAppID = null;
|
||||
sessionStorage.playingAppName = null;
|
||||
sessionStorage.playingAppKoreanName = null;
|
||||
sessionStorage.record = null;
|
||||
sessionStorage.bestRecord = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user