Phaser ES6样板项目

相位器 ES6 样板的底子是 Phaser + Webpack,用 ES6 语法写的,结构清晰、注释到位。对那些想用 Phaser 做多人游戏的朋友来说,简直省心又顺手。

Phaser 的模块被大刀阔斧地精简了,不用的全砍了,干净利落;音频也不走 Phaser 那套,直接上howler.js,声音控制也更灵活。

你只要git clone下来,npm i装个依赖,npm run dev一跑,localhost:7777就起来了,热更新FPS 调试器全给你整上,开发起来挺舒服。

适合想快速开工的你——复制这个样板,改着改着你自己的游戏就出来了。对了,构建方式也考虑得比较细,开发版生产版区分开,打包也方便。

如果你之前用过 Webpack 或者喜欢用 ES6 class 组织逻辑,那你会觉得这个样板挺顺手的;就算你是刚上手 Phaser,跟着它的注释改一改,也能快入门。

想拓展点用法?可以顺手看看这些:

如果你正在用 Phaser,又正好想用 ES6 撸多人游戏,那真的可以直接拿这个开工了,少走不少弯路。

zip
phaser-boilerplate-master.zip 预估大小:32个文件
folder
phaser-boilerplate-master 文件夹
file
.eslintrc.json 2KB
file
postcss.config.js 164B
file
server.js 470B
folder
src 文件夹
folder
states 文件夹
file
Main.js 1KB
file
Preload.js 981B
file
Boot.js 752B
file
index.template.html 478B
file
AssetManifest.js 220B
folder
objects 文件夹
file
Player.js 275B
folder
assets 文件夹
folder
images 文件夹
file
bg@2x.png 5KB
file
bg.png 3KB
file
bg@3x.png 5KB
folder
sprites 文件夹
file
textures.png 13KB
file
textures@3x.png 41KB
file
textures@2x.png 28KB
file
textures.s3tc.pvr 16KB
file
textures@2x.json 753B
file
textures.s3tc.json 766B
file
textures@3x.json 752B
file
textures.pvrtc.json 752B
file
textures@2x.pvrtc.pvr 16KB
file
textures.pvrtc.pvr 4KB
file
textures.json 739B
file
textures@2x.pvrtc.json 767B
folder
css 文件夹
file
general.css 72B
file
index.css 22B
folder
server 文件夹
folder
index.js 文件夹
file
index.js 2KB
folder
build 文件夹
file
webpack.config.js 3KB
file
README.md 1KB
file
.gitignore 29B
file
package.json 2KB
zip 文件大小:121.54KB