都斌大苏打

2021年3月31日

内存性能优化,资源管理

摘要: 内存优化:1、资源优化 控制图集大小(长宽), 能压缩的压缩(内存), 能用九宫格的用九宫格, 用完的图集要回收, 动画资源可以不用很多帧,也要压缩注意长宽,能复用的尽量复用 音频,远程加载的资源要按需加载,即时清理 表格的简化跟压缩2.代码优化 避免字符串的频繁拆分 频繁使用的类可以建立对象池 各 阅读全文

posted @ 2021-03-31 15:30 都斌大苏打 阅读(63) 评论(0) 推荐(0) 编辑

2020年9月16日

egret简单的刮刮乐效果

摘要: private createGameScene1(): void { var bg = new egret.Shape(); bg.graphics.beginFill(0x0000FF); bg.graphics.drawRect(0, 0, 480, 800); bg.graphics.endF 阅读全文

posted @ 2020-09-16 13:38 都斌大苏打 阅读(379) 评论(0) 推荐(0) 编辑

2020年3月13日

egret简单的椭圆或圆周运动

摘要: public do(){ egret.Tween.get(t, { loop: true }).to({ fa: 180 }, 2000); } public get fa(): number { return -180; } public set fa(s) { let chang = 50; l 阅读全文

posted @ 2020-03-13 15:13 都斌大苏打 阅读(559) 评论(0) 推荐(0) 编辑

2019年5月25日

白鹭龙骨异步加载

摘要: private armatureDisplay: dragonBones.EgretArmatureDisplay; /** * 加载龙骨动画 * Create scene interface */ private loadGragon(): void { let t = this; t.remov 阅读全文

posted @ 2019-05-25 13:18 都斌大苏打 阅读(678) 评论(0) 推荐(0) 编辑

2018年10月27日

egret贝塞尔曲线运动

摘要: class MtwGame { public constructor() { } private static _instance: MtwGame; public static get Instance(): MtwGame { if (this._instance == null || this 阅读全文

posted @ 2018-10-27 10:38 都斌大苏打 阅读(492) 评论(0) 推荐(0) 编辑

2018年10月25日

白鹭wing的自动编译

摘要: 1.lunch.json文件中的"preLaunchTask":"build",注释掉。 2.安装node-v6.11.2-x64.msi 3.安装tsc 命令行:npm install -g typescript@2.6.2 4.在wing中的终端输入 tsc -w --sourceMap 注意: 阅读全文

posted @ 2018-10-25 15:12 都斌大苏打 阅读(1195) 评论(0) 推荐(0) 编辑

2018年8月31日

egret 简单的一笔画算法,在wing中可以直接跑(以后玩这类游戏就有个作弊器了)

摘要: /** * 在Main中创建游戏场景 * Create a game scene */ private createGameScene() { MtwGame.Instance.init(this.stage); } // 场景类 class MtwGame { public constructor 阅读全文

posted @ 2018-08-31 13:29 都斌大苏打 阅读(716) 评论(0) 推荐(0) 编辑

2018年8月22日

egret 简单的四方向的a星寻路,在wing中可以直接跑

摘要: /** * main类中加载场景 * 创建游戏场景 * Create a game scene */ private createGameScene() { MtwGame.Instance.init(this.stage); } /** * 场景类 */ class MtwGame { publi 阅读全文

posted @ 2018-08-22 19:08 都斌大苏打 阅读(1175) 评论(0) 推荐(0) 编辑

2018年8月9日

游戏中战力增减的效果显示

摘要: //两个预加载的资源 //调用 PowerShow.getInstance().showPower(新战力, 老战力); //战力展示 class PowerShow extends egret.Sprite{ private power: PowerMove; private group: eui 阅读全文

posted @ 2018-08-09 15:09 都斌大苏打 阅读(444) 评论(0) 推荐(0) 编辑

2018年7月28日

egret 添加帧动画

摘要: private showEffect(): void { //加载本地的帧动画资源 RES.getResByUrlNoCache("resource/assets/shenqi_eff.json", this.onNameLoadOk, this); RES.getResByUrlNoCache(" 阅读全文

posted @ 2018-07-28 16:08 都斌大苏打 阅读(2422) 评论(0) 推荐(0) 编辑

导航