# game_template **Repository Path**: wumingqyl_admin/game_template ## Basic Information - **Project Name**: game_template - **Description**: pixijs游戏样板 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-02-22 - **Last Updated**: 2024-02-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # game_template #### 介绍 pixijs游戏样板 #### 软件架构 每个小游戏必须继承 PIXI.utils.EventEmitter ``` class CrashGame extends utils.EventEmitter { constructor({ app, added }) { super(); this.app = app; this.container = new Container; if(added)app.stage.addChild(this.container); this.width = app.screen.width; this.height = app.screen.width*0.618; } async init(){ //加载资源 await Assets.load('./lan.fnt'); } reset(){ //重置游戏,恢复到初始状态 } start(){ //开始游戏 } } ``` #### 安装教程 npm i npm run dev #### debug ``` function setup_debug({ game, container }) { } ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)