Browse Source

增加小鸟飞提示文案

master
jiannibang 6 years ago
parent
commit
d5b2a603df
  1. BIN
      phaser/game-flipbird/assets/flipbird/favicon.ico
  2. BIN
      phaser/game-flipbird/assets/flipbird/gameover.png
  3. BIN
      phaser/game-flipbird/assets/flipbird/gameoverbg.png
  4. BIN
      phaser/game-flipbird/assets/flipbird/getready.png
  5. BIN
      phaser/game-flipbird/assets/flipbird/ground.png
  6. BIN
      phaser/game-flipbird/assets/flipbird/hit.png
  7. BIN
      phaser/game-flipbird/assets/flipbird/logo.png
  8. BIN
      phaser/game-flipbird/assets/flipbird/new.png
  9. BIN
      phaser/game-flipbird/assets/flipbird/pipe.png
  10. BIN
      phaser/game-flipbird/assets/flipbird/share.png
  11. BIN
      phaser/game-flipbird/assets/flipbird/start.png
  12. BIN
      phaser/game-flipbird/assets/flipbird/tip.png
  13. BIN
      phaser/game-flipbird/assets/flipbird/touch-icon-iphone-retina.png
  14. BIN
      phaser/game-flipbird/assets/flipbird/touch-icon-iphone.png
  15. BIN
      phaser/game-flipbird/assets/flipbird/tweet.png
  16. 14
      phaser/game-flipbird/scenes/flipbird/flipbird.js

BIN
phaser/game-flipbird/assets/flipbird/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

BIN
phaser/game-flipbird/assets/flipbird/gameover.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
phaser/game-flipbird/assets/flipbird/gameoverbg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

BIN
phaser/game-flipbird/assets/flipbird/getready.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

BIN
phaser/game-flipbird/assets/flipbird/ground.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
phaser/game-flipbird/assets/flipbird/hit.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

BIN
phaser/game-flipbird/assets/flipbird/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
phaser/game-flipbird/assets/flipbird/new.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
phaser/game-flipbird/assets/flipbird/pipe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

BIN
phaser/game-flipbird/assets/flipbird/share.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

BIN
phaser/game-flipbird/assets/flipbird/start.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

BIN
phaser/game-flipbird/assets/flipbird/tip.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 KiB

BIN
phaser/game-flipbird/assets/flipbird/touch-icon-iphone-retina.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
phaser/game-flipbird/assets/flipbird/touch-icon-iphone.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

BIN
phaser/game-flipbird/assets/flipbird/tweet.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

14
phaser/game-flipbird/scenes/flipbird/flipbird.js

@ -1,10 +1,10 @@
import Phaser from "phaser";
import pipeImg from "../../assets/flipbird/pipe.png";
import pipe1 from "../../assets/flipbird/pipe1.png";
import pipe2 from "../../assets/flipbird/pipe2.png";
import pipe3 from "../../assets/flipbird/pipe3.png";
import birdImg from "../../assets/flipbird/clumsy.png";
import bg from "../../assets/flipbird/bg.png";
import tip from "../../assets/flipbird/tip.png";
/**
* 素材再找 https://github.com/ellisonleao/clumsy-bird/blob/master/data/img/new.png
* https://www.emanueleferonato.com/2019/05/02/flappy-bird-html5-prototype-updated-to-phaser-3-16-2/
@ -41,7 +41,7 @@ export default class PlayScene extends Phaser.Scene {
preload() {
//this.load.image("bird", "bird.png");
this.load.image("bg", bg);
this.load.image("pipe", pipeImg);
this.load.image("tip", tip);
this.load.image("pipe1", pipe1);
this.load.image("pipe2", pipe2);
this.load.image("pipe3", pipe3);
@ -103,6 +103,15 @@ export default class PlayScene extends Phaser.Scene {
0x000000,
0.6
);
const tip = this.add.image(
this.game.config.width / 2,
this.game.config.height / 2,
"tip"
);
tip.displayWidth = 1422 / 2;
tip.displayHeight = 1009 / 2;
this.input.once("pointerdown", () => {
tip.destroy();
this.countDown = this.add.text(
this.game.config.width / 2,
this.game.config.height / 2,
@ -126,6 +135,7 @@ export default class PlayScene extends Phaser.Scene {
});
});
});
});
}
updateScore(inc) {
this.score += inc;

Loading…
Cancel
Save