• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 1,291 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0061 秒)

251. 关于功能模块资源回收预疑问 [ 79%]

...ts.push("res/apes/monkey2.png"); assets.push("res/apes/monkey3.png"); Laya.loader.load(assets, Handler.create(this, onAssetsLoaded)); private function onAssetsLoaded():void { for(var i:int = 0, len:int = assets.length; i < len; ++i) { var asset:Image = assets[i]; //查看log,清理前资源一...

来源: Laya_社区 发布时间: 20171019

252. ReferenceError: Loader is not defined 搞不懂引擎原生的也会报这个错? [ 79%]

ReferenceError: Loader is not defined 搞不懂引擎原生的也会报这个错? onEnable() { //戏控制脚本引用,避免每次获取组件带来不必要的性能开销 thi   s._loveControl = this.getComponent(LoveControl);  //点击提示文字,开始游戏 this.label_start.on(Laya.Ev...

来源: Laya_社区 发布时间: 20190704

253. 性能测试-虫子(慎入) [ 79%]

...ng, Laya.stage.width + padding * 2, Laya.stage.height + padding * 2); Laya.loader.load(texturePath, Handler.create(this, this.onTextureLoaded)); } onTextureLoaded() { maggotTexture = Laya.loader.getRes(texturePath); this.initMaggots(); Laya.timer.frameLoop(1, this, this.animate); } initMaggots() { l...

来源: Laya2.0_示例 发布时间: 20251130

254. texture 的销毁问题,,,, [ 79%]

...,,,, 加载一张图片,然后获取texture var texture = Laya.loader.getRes(url); 然后texture调用texture.destroy(true); 销毁图片, 那下次要使用该图片的时候,还需要重新加载吗,,  是不是我下次使用的时候,我可以直接去调用加载load( load...

来源: Laya_社区 发布时间: 20171226

255. 加载的时候动画会卡 [ 79%]

...      var imgArr = ;         imgArr.push({url:"cont/cpf1.jpg",type:Loader.IMAGE});         imgArr.push({url:"cont/cpr1.jpg",type:Loader.IMAGE});         imgArr.push({url:"cont/cps1.jpg",type:Loader.IMAGE});         imgArr.push({url:"cont/cpt1.jpg",type:Loader.IMAGE});        ...

来源: Laya_社区 发布时间: 20160815

256. layaAir如何实现for循环加载多张图片,并且通过事件按比例缩小 [ 79%]

...。layaair折腾半天,搞不明白image组件,sprite.loadImage,Laya.loader.load如果用for循环操作,响应事件中用什么方法指向事件的发起对象?原来用e.target和e.data。现在事件发起者和加载的数据怎么得到呢?(不用循环可以用直接用变量...

来源: Laya_社区 发布时间: 20161023

257. QQ小游戏demo跑不起来 MiniFileMgr.fs.readFile无回调 [ 79%]

...sole.log("加载文件测试1", i, fileUrl);         })); 2、Laya.loader.load() 循环多个文件加载测试,均只能加载第一个文件,后续无回调。 3、MiniFileMgr.fs.readFilesync 同步可以读到文件。 4、Main.ts中 交换几个配置文件,均是第一个配置能...

来源: Laya_社区 发布时间: 20200111

258. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 79%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#ffffff"; Laya.loader.load([this.texture1, this.texture2], Handler.create(this, this.onAssetsLoaded)); } private onAssetsLoaded(): void { this.ape = new Sprite(); Laya.stage.addChild(this.ape); this.ape.pivot(55, 72); this.ape.pos(100,50); ...

来源: Laya2.0_文档 发布时间: 20210715

259. Sprite-切换纹理 [ 78%]

...tage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.flag = true; Laya.loader.load([monkey1Str, monkey2Str], Laya.Handler.create(this, this.onAssetsLoaded)); } onAssetsLoaded() { monkey1Res = Laya.loader.getRes(monkey1Str), monkey2Res = Laya.loader.getRes(monkey2Str); this.ape = new Laya.Sprite(...

来源: Laya2.0_示例 发布时间: 20251130

260. 2d资源和3d资源没有统一的加载接口? [ 78%]

2d资源和3d资源没有统一的加载接口? 加载2d   Laya.loader.load 加载3d   Laya.loader.create 有没有统一的接口呢? 2018-11-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron ...

来源: Laya_社区 发布时间: 20181128