Fix: restructing session manager, ES6 -> ES5

This commit is contained in:
2018-09-14 22:22:22 +09:00
parent 72e7c1a28f
commit 3f340535ac
44 changed files with 3100 additions and 3262 deletions
+8 -8
View File
@@ -6,7 +6,7 @@ class Game {
create() {
this.game.stage.backgroundColor = "#000000"; // '#4d4d4d';
sessionStorageManager.isNewBestRecrd = false;
sessionStorageManager.setIsNewBestRecord(false);
// top ui
var screenTopUI = new ScreenTopUI();
@@ -18,14 +18,14 @@ class Game {
var scoreBoard = new ScoreBoard();
scoreManager.addOnChangeScoreListener( function(score) {
sessionStorageManager.record = score;
sessionStorageManager.setRecord(score);
scoreBoard.printScore(NumberUtil.numberWithCommas(score));
});
scoreManager.addOnChangeHighScoreListener( function(highScore) {
console.log(highScore);
sessionStorageManager.bestRecord = highScore;
sessionStorageManager.isNewBestRecrd = true;
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord);
sessionStorageManager.setBestRecord(highScore);
sessionStorageManager.setIsNewBestRecrd(true);
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.getBestRecord());
});
var heartGauge = new HeartGauge(heartManager);
@@ -72,9 +72,9 @@ class Game {
// bottom ui
var screenBottomUI = new ScreenBottomUI();
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord);
screenBottomUI.printCenterText(sessionStorageManager.playingAppKoreanName);
screenBottomUI.printRightText(sessionStorageManager.playerName);
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.getBestRecord());
screenBottomUI.printCenterText(sessionStorageManager.getPlayingAppKoreanName());
screenBottomUI.printRightText(sessionStorageManager.getPlayerName());
this.startGame();