diff --git a/games/game-flipbird/scenes/flipbird/flipbird.js b/games/game-flipbird/scenes/flipbird/flipbird.js index 418555e..f54441f 100644 --- a/games/game-flipbird/scenes/flipbird/flipbird.js +++ b/games/game-flipbird/scenes/flipbird/flipbird.js @@ -113,16 +113,19 @@ export default class PlayScene extends Phaser.Scene { baseLine: "middle", } ); - await wait1s(); - this.countDown.text = 2; - await wait1s(); - this.countDown.text = 1; - await wait1s(); - this.countDown.destroy(); - this.countDownWrapper.destroy(); - this.input.on("pointerdown", this.flap, this); - this.pipeGroup.setVelocityX(-this.gameOptions.birdSpeed); - this.bird.body.gravity.y = this.gameOptions.birdGravity; + this.time.delayedCall(1000, () => { + this.countDown.text = 2; + this.time.delayedCall(1000, () => { + this.countDown.text = 1; + this.time.delayedCall(1000, () => { + this.countDown.destroy(); + this.countDownWrapper.destroy(); + this.input.on("pointerdown", this.flap, this); + this.pipeGroup.setVelocityX(-this.gameOptions.birdSpeed); + this.bird.body.gravity.y = this.gameOptions.birdGravity; + }); + }); + }); } updateScore(inc) { this.score += inc;