Fix: AlienTimer bug, change heart image
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 5.9 KiB |
@@ -4,10 +4,8 @@
|
|||||||
class AnnounceBox {
|
class AnnounceBox {
|
||||||
|
|
||||||
constructor(x, y) {
|
constructor(x, y) {
|
||||||
console.log("x : " + x + ", y : " + y);
|
|
||||||
this.posX = x;
|
this.posX = x;
|
||||||
this.posY = y;
|
this.posY = y;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
drawText(posX, posY, text) {
|
drawText(posX, posY, text) {
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ class HeartGauge {
|
|||||||
() => { this.onChangeMaxCountListener(); }
|
() => { this.onChangeMaxCountListener(); }
|
||||||
);
|
);
|
||||||
|
|
||||||
let startPosX = 950;
|
let startPosX = GAME_SCREEN_SIZE.x - HeartGauge.GAP * 4;
|
||||||
let posY = 30;
|
let posY = 30;
|
||||||
for(let i = 0; i < HeartManager.HEART_MAX_COUNT; i++) {
|
for(let i = 0; i < HeartManager.HEART_MAX_COUNT; i++) {
|
||||||
let heart = game.add.sprite(startPosX - i * 30, posY, "heart_full");
|
let heart = game.add.sprite(startPosX - i * HeartGauge.GAP, posY, "heart_full");
|
||||||
heart.anchor.set(0.5);
|
heart.anchor.set(0.5);
|
||||||
heart.scale.set(1);
|
heart.scale.set(HeartGauge.HEART_SCALE);
|
||||||
heart.alpha = 0;
|
heart.alpha = 0;
|
||||||
this.hearts.push(heart);
|
this.hearts.push(heart);
|
||||||
}
|
}
|
||||||
@@ -45,4 +45,7 @@ class HeartGauge {
|
|||||||
this.hearts[i].alpha = 1;
|
this.hearts[i].alpha = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HeartGauge.GAP = 35;
|
||||||
|
HeartGauge.HEART_SCALE = 0.6;
|
||||||
@@ -49,7 +49,6 @@ class Alien extends Phaser.Sprite {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if(this.isOnWaitingRoom) {
|
if(this.isOnWaitingRoom) {
|
||||||
this.isOnWaitingRoom = false;
|
|
||||||
this.goOnstage();
|
this.goOnstage();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@@ -96,6 +95,7 @@ class Alien extends Phaser.Sprite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goOnstage() {
|
goOnstage() {
|
||||||
|
this.isOnWaitingRoom = false;
|
||||||
this.goRandomPosition();
|
this.goRandomPosition();
|
||||||
|
|
||||||
if(typeof this.onGoOnstageFunction !== "undefined")
|
if(typeof this.onGoOnstageFunction !== "undefined")
|
||||||
|
|||||||
@@ -96,4 +96,4 @@ AlienTimer.DEFAULT_TEXT_FONT = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
AlienTimer.DEFAULT_TIME_GAP_SEC = 10;
|
AlienTimer.DEFAULT_TIME_GAP_SEC = 10;
|
||||||
AlienTimer.MOVE_UP_AMOUNT_PX = 60;
|
AlienTimer.MOVE_UP_AMOUNT_PX = 48;
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
class Game {
|
class Game {
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
this.game.stage.backgroundColor = '#4d4d4d';
|
this.game.stage.backgroundColor = "#000000"; // '#4d4d4d';
|
||||||
|
|
||||||
sessionStorageManager.isNewBestRecrd = false;
|
sessionStorageManager.isNewBestRecrd = false;
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ class Game {
|
|||||||
|
|
||||||
// waiting room
|
// waiting room
|
||||||
this.game.add.graphics()
|
this.game.add.graphics()
|
||||||
.beginFill(0xffffff, 0.1)
|
.beginFill(0xffffff, 0.3)
|
||||||
.drawRect(0, 100, game.world.width, 100);
|
.drawRect(0, 100, game.world.width, 100);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user