Fix: screen top ui, screen bottom ui
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user