Flappy Bird
在网上学习了下“65行 JavaScript 代码实现 Flappy Bird 游戏”( http://blog.jobbole.com/61842/ ),main.js 如下: // Initialize Phaser, and creates a 400x490px game var game = new Phaser.Game(400, 490, Phaser.AUTO, 'game_div'); // Creates a new 'main' state that wil contain the game var main_state = { preload:function() { this.game.stage.backgroundColor = '#71c5cf'; this.game.load.image('bird','assets/bird.png'); this.game.load.image('pipe','assets/pipe.png'); }, create:function() { this.bird = this.game.add.sprite(100,245,'bird'); this.bird.body.gravity.y = 1000; this.pipes = game.add.group(); this.pipes