大约有 582 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0069 秒)
Laya_社区(373) Laya2.0_文档(74) Laya_示例(51) Laya2.0_示例(39) Laya3.0_文档(35) Laya3.0_api(8) Laya2.0_api(2)
... constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-...
来源: Laya3.0_文档 发布时间: 20251105
...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load([buttonSkin, clipSkin, bgSkin], laya.utils.Handler.create(this, onSkinLoaded)); })(); function onSkinLoaded() { showBg(); createTimerAnimation(); showTotalSeconds(); createController(); } function showBg() { var b...
来源: Laya_示例 发布时间: 20260303
...ame('achieve'); // 这样可以解析 没有问题 但是 通过 xml =Laya.loader.getRes("res/Config/text.xml"); var doc = XMLParser.parseFromString(xml) var a = doc.getElementsByTagName('achieve'); 就会进入死循环 读取本地文件 这块 小游戏通过什么来读取? 2018-08-28 添加...
来源: Laya_社区 发布时间: 20180828
load 跨域请求 Laya.loader.load(resUrl+'bin/res/atlas/dice.json', Laya.Handler .create(this, this.init), null, Laya.Loader.ATLAS); 这个json提示跨域了,怎么解决好 2017-07-19 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的...
来源: Laya_社区 发布时间: 20170719
...销毁时如何回收其依赖的资源 //加载预制体 var win; Laya.loader.load("prefab/loginScene/LoginScene.lh").then(res=>{ win:LoginSceneRT = res.create(); mainRT.SceneLayer.addChild(win); }); //销毁预制提 win.destroy(); //如何回收此预制...
来源: Laya_社区 发布时间: 20251223
Laya.loader.create中的progress回调好像不准确? 如图,我加载二十多M的资源(大概二三十个文件),进度回调只有一次,是不是这个回调有问题? 附件 : --> 2018-03-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...
来源: Laya_社区 发布时间: 20180321
...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load([buttonSkin, clipSkin, bgSkin], Handler.create(this, this.onSkinLoaded)); } onSkinLoaded() { this.showBg(); this.createTimerAnimation(); this.showTotalSeconds(); this.createController(); } showBg() { const Image =...
来源: Laya2.0_示例 发布时间: 20260303
如何解析json文件并获取某对象值? private jsonParse() { Laya.loader.load("res/atlas/resTest0.json", Handler.create(this, this.onLoaded), null, Loader.JSON); } private onLoaded() { var json : JSON = Laya.Loader.getRes("res/atlas/resTest0.json"); var jsTx = JSON.stringify(json); } 已经...
来源: Laya_社区 发布时间: 20171016
...也就是预加载资源的地方),资源路径写错了。改成 Laya.loader.load("res/atlas/Resources.json",laya.utils.Handler.create(this,this.onReader),null,laya.net.Loader.ATLAS);就好了 Buzhihew • 2017-01-11 15:50 @Monica:.......我.....总之谢谢啊啊啊 Monica • 2017-0...
来源: Laya_社区 发布时间: 20170111
...Laya.Stage.ALIGN_MIDDLE; Laya.stage.alignV = Laya.Stage.ALIGN_CENTER; Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { Laya.loader.load("res/comp/dian.part", Handler.create(this, this.onPartLoaded)); } fun...
来源: Laya_社区 发布时间: 20170803