Fix: bestRecord bug

This commit is contained in:
2018-06-06 07:34:45 +09:00
parent b4f0531db0
commit 26b47536dc
7 changed files with 29 additions and 12 deletions
+2
View File
@@ -10,6 +10,7 @@ class Game {
// top
let backButton = new BackButton( () => {
sessionStorageManager.resetPlayingAppData();
location.href = '../../web/client/menu_app.html';
});
@@ -28,6 +29,7 @@ class Game {
scoreBoard.printScore(NumberUtil.numberWithCommas(score));
});
scoreManager.addOnChangeHighScoreListener( highScore => {
console.log(highScore);
sessionStorageManager.bestRecord = highScore;
sessionStorageManager.isNewBestRecrd = true;
screenBottom.printBottomLeftTextWithBestRecord(sessionStorageManager.bestRecord);