Skip to content

Commit

Permalink
这里的 serviceWorker 有问题,暂先去掉 service worker
Browse files Browse the repository at this point in the history
hys committed Mar 13, 2018
1 parent b03febe commit 6880335
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -21,4 +21,4 @@ onStoreDone(function() {
)
})

registerServiceWorker()
// registerServiceWorker()
4 changes: 3 additions & 1 deletion src/single/flappy-bird/play.js
Original file line number Diff line number Diff line change
@@ -48,6 +48,8 @@ export default class PlayScene extends Phaser.Scene {

this.bird.setCollideWorldBounds(true).setGravityY(0)

this.physics.world.enable([this.ground, this.bird])

// this.physics.enable(this.bird, Phaser.Physics.ARCADE) //开启鸟的物理系统
// this.bird.body.gravity.y = 0 //鸟的重力,未开始游戏,先先让他不动
// this.physics.enable(this.ground, Phaser.Physics.ARCADE) //地面
@@ -99,7 +101,7 @@ export default class PlayScene extends Phaser.Scene {

if (this.bird.angle < 90) this.bird.angle += 2.5 //下降时头朝下

// this.physics.world.collide(this.bird, this.pipeGroup)
this.physics.world.collide(this.bird, this.ground)
}

// generatePipes(gap) {

0 comments on commit 6880335

Please sign in to comment.