1976年10月,Gremlin发行了一款名为Blockade的2人迷宫游戏。后来变成了家喻户晓的贪吃蛇
我们将做一个简单的单人贪吃蛇的复刻
像这样更改 webpack.config.js
文件:
entry: './src/games/snake/game.ts'
- Phaser.Game
- Phaser.Config
- Phaser.Scenes.ScenePlugin
- Create two classes (player and apple) in two separate files
- Phaser.GameObjects.Graphics
- Basic collision detection
- Setup player input (Keyboard)
- Phaser.GameObjects.BitmapText
- Phaser.Math.RandomDataGenerator