Fix: screen top ui, screen bottom ui

This commit is contained in:
2018-09-03 09:15:50 +09:00
parent ac46b61539
commit 8cf7f67ac6
24 changed files with 197 additions and 153 deletions
+16 -17
View File
@@ -8,20 +8,13 @@ class Game {
sessionStorageManager.isNewBestRecrd = false;
// top
let backButton = new BackButton( () => {
// top ui
let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => {
sessionStorageManager.resetPlayingAppData();
location.href = '../../web/client/menu_app.html';
});
let heartGauge = new HeartGauge(heartManager);
heartManager.addOnChangeGameOverListener(
() => { this.gameOver(); }
);
heartGauge.start();
let fullscreenButton = new FullscreenButton(this.game);
screenTopUI.makeFullScreenButton();
let scoreBoard = new ScoreBoard();
scoreManager.addOnChangeScoreListener( score => {
@@ -32,9 +25,15 @@ class Game {
console.log(highScore);
sessionStorageManager.bestRecord = highScore;
sessionStorageManager.isNewBestRecrd = true;
screenBottom.printBottomLeftTextWithBestRecord(sessionStorageManager.bestRecord);
screenBottomUI.printBottomLeftTextWithBestRecord(sessionStorageManager.bestRecord);
});
let heartGauge = new HeartGauge(heartManager);
heartManager.addOnChangeGameOverListener(
() => { this.gameOver(); }
);
heartGauge.start();
// waiting room
this.game.add.graphics()
@@ -61,11 +60,11 @@ class Game {
this.alienTimer = new AlienTimer(this.aliens);
// bottom
let screenBottom = new ScreenBottom();
screenBottom.printBottomLeftTextWithBestRecord(sessionStorageManager.bestRecord);
screenBottom.printBottomCenterText(sessionStorageManager.playingAppKoreanName);
screenBottom.printBottomRightText(sessionStorageManager.playerName);
// bottom ui
let screenBottomUI = new ScreenBottomUI();
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord);
screenBottomUI.printCenterText(sessionStorageManager.playingAppKoreanName);
screenBottomUI.printRightText(sessionStorageManager.playerName);
this.startGame();