Add: show heart_full, heart_empty
This commit is contained in:
@@ -6,6 +6,8 @@ class Game {
|
||||
create() {
|
||||
this.game.stage.backgroundColor = '#4d4d4d';
|
||||
|
||||
this.initListeners();
|
||||
|
||||
// top
|
||||
let backButton = new BackButton( () => {
|
||||
location.href = '../../web/client/menu_app.html';
|
||||
@@ -13,11 +15,7 @@ class Game {
|
||||
|
||||
let scoreBoard = new ScoreBoard();
|
||||
let heartGauge = new HeartGauge(heartManager);
|
||||
heartManager.addOnChangeGameOverListener(
|
||||
() => {
|
||||
this.gameOver();
|
||||
}
|
||||
);
|
||||
heartGauge.start();
|
||||
|
||||
let fullscreenButton = new FullscreenButton(this.game);
|
||||
|
||||
@@ -51,6 +49,11 @@ class Game {
|
||||
screenBottom.printBottomRightText(sessionStorageManager.playerName);
|
||||
|
||||
|
||||
this.startGame();
|
||||
// this.countDown();
|
||||
}
|
||||
|
||||
initListeners() {
|
||||
scoreManager.addOnChangeScoreListener( score => {
|
||||
console.log("onChangeScore : " + score);
|
||||
scoreBoard.printScore(NumberUtil.numberWithCommas(score));
|
||||
@@ -60,8 +63,9 @@ class Game {
|
||||
screenBottom.printBottomLeftText("최고 기록 : " + NumberUtil.numberWithCommas(highScore));
|
||||
});
|
||||
|
||||
this.startGame();
|
||||
// this.countDown();
|
||||
heartManager.addOnChangeGameOverListener(
|
||||
() => { this.gameOver(); }
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -118,7 +122,6 @@ class Game {
|
||||
}
|
||||
|
||||
onAlienEscaped() {
|
||||
console.log("onAlienEscaped");
|
||||
heartManager.breakHearts(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,10 @@ class Loading {
|
||||
}
|
||||
|
||||
startLoading() {
|
||||
this.game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
||||
this.game.load.image('alien_normal', '../../../resources/image/character/alien_normal.png');
|
||||
this.game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
||||
this.game.load.image('alien_normal', '../../../resources/image/character/alien_normal.png');
|
||||
this.game.load.image('heart_full', '../../../resources/image/ui/heart_full.png');
|
||||
this.game.load.image('heart_empty', '../../../resources/image/ui/heart_empty.png');
|
||||
// this.game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
|
||||
// this.game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');
|
||||
// this.game.load.image('c', '../../../resources/image/icon/fullscreen_white.png');
|
||||
|
||||
Reference in New Issue
Block a user