大约有 235 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0037 秒)
Laya_社区(149) Laya2.0_文档(47) Laya2.0_示例(16) Laya_示例(12) Laya3.0_文档(7) Laya3.0_api(2) Laya2.0_api(2)
...资源不会缓存,只能在加载完成的回调里使用,无法通过getRes读取加载缓存。 使用fetch()方法,示例如下: onEnable(): void { const jsonPath: string = "json/bagList.json"; //fetch取到的是原始数据,但没有缓存,无法用getRes获取 Laya.loader.fetch(js...
来源: Laya3.0_文档 发布时间: 20251010
...Loc[i][1]); b.graphics.drawTexture(Laya.loader.getRes(Res),tx-45,ty-45); b.size(92,96); b.name = "egg"+i; Laya.stage.addChild(b); b.on(Event.MOUSE_DOWN, this, m...
来源: Laya_社区 发布时间: 20170517
...猩 ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.pivot(texture.width / 2, texture.height / 2); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); ape.scale(0.8, 0.8); Laya.stage.addChild(ape); // 鼠标交互 ape.on(Event.MOUSE_DOWN, this, onApePress)...
来源: Laya_示例 发布时间: 20251130
...reate(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); Laya.stage.addChild(ape); ape.pos(200, 0); ...
来源: Laya_社区 发布时间: 20171201
...elete LoaderManager._resMap[url]; if (resInfo.originalUrl){ content=Loader.getRes(resInfo.originalUrl); } resInfo.event(/*laya.events.Event.COMPLETE*/"complete",content); resInfo.offAll(); this._infoPool.push(resInfo); this._statInfo.loaded++; this.event(/*laya.events.Event.PROGRESS*/"progress",this...
来源: Laya_社区 发布时间: 20200429
...03-08 0 2 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: (Laya.Loader.getRes(this.picUrl) as Laya.Resource).destroy(); picUrl 就是你的资源地址 2019-03-08 0 3 分享 微博 QZONE 微信 尔东 赞同来自: clearRes的时候是默认参数,也就是最终执行到destroy的时候,还...
来源: Laya_社区 发布时间: 20190307
...化加载并创建好的3D对象var sprite3D:Laya.Sprite3D = Laya.loader.getRes("res/room.lh");this.scene.addChild(sprite3D);} 2018-09-08 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 130*****543 相关问题 unity导出粒子文件问...
来源: Laya_社区 发布时间: 20180817
...ape = new Sprite(); this.ape.loadImage(apePath); let texture = Laya.loader.getRes(apePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.ape.scale(0.8, 0.8); Laya.stage.addChild(this.ape); // 鼠标交互 this.ape.on(Event.MOU...
来源: Laya2.0_示例 发布时间: 20251130
...GameUI.ts 41行下断点调试进入查看。 var actor = Laya.Loader.getRes("res/LayaScene_Actor/Conventional/XiaoHongMao.lh") as Laya.Sprite3D; var weapon = Laya.Loader.getRes("res/LayaScene_Item/Conventional/Wchangzhang01.lh") as Laya.Sprite3D; var animCtl = actor.getComponent(Laya.Animator);...
来源: Laya_社区 发布时间: 20191011
... let pngUrl = texture.realTexture.url; let res = Laya.loader.getRes(pngUrl); if (res && res._bitmap instanceof Laya.Texture2D) { res._bitmap.destroy(); } Laya.loader.clearRes(pngUrl) } } tmpDat.destroy...
来源: Laya_社区 发布时间: 20240429