Fix: update best record for every hour

This commit is contained in:
2018-06-06 00:06:40 +09:00
parent 3f43f80c3d
commit b4f0531db0
5 changed files with 17 additions and 6 deletions
+11
View File
@@ -16,6 +16,11 @@ class Start {
// top
let backButton = new BackButton( () => {
sessionStorageManager.playingAppName = null;
sessionStorageManager.playingAppKoreanName = null;
sessionStorageManager.record = null;
sessionStorageManager.bestRecord = null;
location.href = '../../web/client/menu_app.html';
});
@@ -26,6 +31,7 @@ class Start {
// this.printHowToPlay(appInfoManager.getHowToPlayText(sessionStorageManager.playingAppName));
this.loadHowToPlay(sessionStorageManager.playingAppID);
this.makeStartButton();
let today = new Date();
let date = DateUtil.getYYYYMMDD(today);
this.dbConnectManager.requestPlayerHistory(
@@ -71,6 +77,11 @@ class Start {
sessionStorageManager.BestRecord = Number(replyJSON["BestRecord"]);
let highScoreWithCommas = NumberUtil.numberWithCommas(sessionStorageManager.BestRecord);
screenBottom.printBottomLeftText("오늘의 최고 기록 : " + highScoreWithCommas);
},
replyJSON => { // no data
sessionStorageManager.BestRecord = 0;
let highScoreWithCommas = NumberUtil.numberWithCommas(sessionStorageManager.BestRecord);
screenBottom.printBottomLeftText("오늘의 최고 기록 : " + highScoreWithCommas);
}
);
}