Add: waiting room
This commit is contained in:
@@ -4,11 +4,7 @@
|
||||
class Game {
|
||||
|
||||
create() {
|
||||
// this.historyRecordManager = new HistoryRecordManager();
|
||||
|
||||
this.game.stage.backgroundColor = '#4d4d4d';
|
||||
// this.chartGraphics = game.add.graphics(100, game.world.height - 120);
|
||||
|
||||
|
||||
// top
|
||||
let backButton = new BackButton( () => {
|
||||
@@ -18,13 +14,18 @@ class Game {
|
||||
let fullscreenButton = new FullscreenButton(this.game);
|
||||
|
||||
|
||||
// waiting room
|
||||
this.game.add.graphics()
|
||||
.beginFill(0xffffff, 0.1)
|
||||
.drawRect(0, 100, game.world.width, 100);
|
||||
|
||||
|
||||
// contents
|
||||
let alien = new Alien(
|
||||
this.game.world.width / 2, this.game.world.height / 2,
|
||||
this.onAlienFired, this.onAlienEscaped
|
||||
);
|
||||
let alien = new Alien(100, 150, this.onAlienFired, this.onAlienEscaped);
|
||||
alien.goWaitingRoom();
|
||||
|
||||
// activate first alien
|
||||
alien.setActive(true);
|
||||
alien.goOnstage();
|
||||
|
||||
|
||||
// bottom
|
||||
@@ -81,7 +82,6 @@ class Game {
|
||||
|
||||
onAlienEscaped(sprite) {
|
||||
console.log("onAlienEscaped");
|
||||
// sprite.goOnstage();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user