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

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

121. 微信小游戏怎么加载本地的配置文件 [ 64%]

...nfig(){ this.configAsset=[ {url:"res/config/playerCard.json",type:laya.net.Loader.TEXT} ]; Laya.loader.load(this.configAsset,Handler.create(this,this.loadConfigCallBack)) } public loadConfigCallBack(str:boolean){ if(str){ var config; config=laya.net.Loader.getRes("res/config/playerCard.json"); Playe...

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

122. 微信小游戏开放域(ActionScript-小游戏适配文档-微信小游戏) [ 63%]

...。 ```typescript if(Browser.onMiniGame){ //加载一个json和图集 Laya.loader.load(["json/reward.json","res/atlas/test.atlas"],Handler.create(this,function(){ //加载完成 //使用接口将图集透传到子域 MiniAdpter.sendAtlasToOpenDataContext("res/atlas/test.atlas"); //使用接口将jso...

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

123. 微信小游戏开放域(JavaScript-小游戏适配文档-微信小游戏) [ 63%]

...``typescript if(Laya.Browser.onMiniGame){ //加载一个json和图集 Laya.loader.load(["json/reward.json","res/atlas/test.atlas"],Laya.Handler.create(null,function(){ //加载完成 //使用接口将图集透传到子域 Laya.MiniAdpter.sendAtlasToOpenDataContext("res/atlas/test.atlas"); //使用...

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

124. 如何能够clone一个node(包括node所有的子节点, 以及所有节点上的compnent,属性) [ 63%]

...信 nevercai 赞同来自: 138*****161 这就是prefab的功能了。Laya.loader.load([{url:"prefab/ButtonA.json", type:Laya.Loader.PREFAB}], Laya.Handler.create(this, ()=>{ let prefab = Laya.loader.getRes("prefab/ButtonA.json") as Laya.Prefab; let o:Laya.Button = prefab.create(); o.zOrder = 1000...

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

125. Skeleton骨骼动画内存泄漏 [ 63%]

...ure2d destory"); } this.bitmap=null; } if (this.url && this===Laya.loader.getRes(this.url)) Laya.loader.clearRes(this.url); } }增加的代码是 if (this.bitmap.referenceCount===0){ this.bitmap.destroy(); // console.log("texture2d destory"); } 2019-06-13 0 0 分享 微博 QZONE 微信 打...

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

126. 2.0版本,Particle2D is not a constructor [ 63%]

...rt default class RunMain extends Laya.Sprite{ constructor(){ super(); Laya.loader.load([{url:"res/213.part",type:Laya.Loader.JSON}],Laya.Handler.create(this,this.onAssetsLoaded)); } onAssetsLoaded(){ let pg = Laya.loader.getRes("res/213.part"); let pd = new Laya.Particle2D(pg); } }213.part是设计...

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

127. 如何使用javascript版本的加载模式 [ 63%]

....json 那我先引用了LayaUI.max.all.js后,再加载ui.json!   Laya.loader.load([ { url: config.layerUIJson, type: Laya.Loader.JSON } ], Handler.create(this, function () { this.gameScenes = new ui.layer.gameScenesUI(); this.addChildren(this.gameScenes); })); 但页面上却没有任何内容...

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

128. Laya.URL.basePath加载不到网络资源 [ 63%]

...网络资源 var resArray = [ { url: "res/atlas/images.atlas", type : Laya.Loader.ATLAS}, // { url: "res/swf/flash.json", type: Laya.Loader.JSON}, // { url: "images/background.png", type : Laya.Loader.IMAGE}, ];   Laya.loader.load(resArray, Laya.Handler.create(this, this.onLoaded2));   Laya.URL.ba...

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

129. 加载资源时同时加载两遍 [ 62%]

...这个文件放到atlas下,把url改成 hero.graphics.drawTexture(Laya.loader.getRes("res/atlas/role/hero_03.png"));   2017-11-20 0 0 分享 微博 QZONE 微信 wudi199553 赞同来自: 刚刚你这一行报错,我就把你这一行代码改了,我不清楚,这是不是你想要的效果 20...

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

130. [LayaAirIDE3]咋么实现鼠标点击角色移动 [ 62%]

... = 1; i <= 8; i++) urls.push(`${this.ANIMATION_PATH}move${i}.mc`); Laya.loader.load(urls, Laya.Handler.create(this, () => { for (let i = 1; i <= 8; i++) { const clipPath = `${this.ANIMATION_PATH}move${i}.mc`; // 检查资源是否存在 if (Laya.loader.getRes(clipPath)) { this.loadedClips.p...

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