Fix: bestRecord bug
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user