Fix: show best record with DB

This commit is contained in:
2018-06-05 18:29:19 +09:00
parent cc59e9e739
commit 3f43f80c3d
6 changed files with 56 additions and 16 deletions
+6
View File
@@ -8,6 +8,8 @@ class ScreenBottom {
this.BOTTOM_BAR_NAME_WIDTH = 200;
this.BOTTOM_BAR_TEXT_OFFSET = 10;
this.dbConnectManager = new DBConnectManager();
this.bottomAreaPositionY = game.world.height - this.BOTTOM_BAR_HEIGHT;
let style = { font: "32px Arial", fill: "#fff", align: "left", boundsAlignH: "left", boundsAlignV: "bottom" };
@@ -61,4 +63,8 @@ class ScreenBottom {
this.rightText.text = text;
}
printBottomLeftTextWithBestRecord(bestRecord) {
this.printBottomLeftText("오늘의 최고 기록 : " + bestRecord);
}
}
+8
View File
@@ -75,4 +75,12 @@ class SessionStorageManager {
return sessionStorage.getItem("bestRecord");
}
// best record
set isNewBestRecord(value) {
sessionStorage.setItem("isNewBestRecord", value);
}
get isNewBestRecord() {
return sessionStorage.getItem("isNewBestRecord");
}
}