|
|
|
@ -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; |
|
|
|
|