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

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

101. 请问laya里如何解析json,似乎和AS3的不太一样。 [ 72%]

....init(550,400); Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("res/atlas/comp.json"); }JSON的解析和AS3的是一样的   2016-10-27 2 0 分享 微博 QZONE 微信 bobofuns - 我是阿...

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

102. IDE 怎么获取Json数据 [ 72%]

...取json的数据,如下 Laya.loader.load("aaa.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var js:JSON=Laya.loader.getRes("aaa.json"); trace(js); }2、你如果是想使用file读取文件的方式,这个目前layaAir下不支持,需要你借助...

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

103. unity 导出文件导入LAYA加载报错 [ 72%]

...44) at StandardMaterial.__proto.onAsynLoaded (laya.d3.js:23826) at ResInfo.onLoaded (laya.core.js:11401) at EventHandler.__proto.runWith (laya.core.js:672) at ResInfo.__proto.event (laya.core.js:449) at LoaderManager.__proto._endLoad (laya.core.js:11511) at Loader.onLoaded (laya.core.js:11490) at Ev...

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

104. 多线程worker(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 72%]

... { var xmlreq = new XMLHttpRequest(); xmlreq.responseType = "text"; xmlreq.onload = function (e) { var data = e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` 这个例子是在worker中进行加载文件,加载完毕传给...

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

105. 技术文档中的示例js运行报错 [ 72%]

...fff" Laya.loader.load('./../bin/res/atlas/res.atlas', Handler.create(this, onLoaded)) })() function onLoaded() { var cMask = new maskDemoUI() Laya.stage.addChild(cMask) } })()   附件 : --> 2018-08-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

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

106. 百度小游戏 内存不断增大的情况 [ 72%]

...r.load([{url:"res/atlas/comp.json",type:"atlas"}],Handler.create(this,this.onLoadUi)); } __proto.onLoadUi=function(){ Laya.timer.loop(100,this,this.onLoaded); } __proto.onLoaded=function(){ if(this.isOpen){ return; } this.isOpen=true; var testView=new TestView(); Laya.stage.addChild(testView); Laya....

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

107. 多线程worker(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 72%]

... { var xmlreq = new XMLHttpRequest(); xmlreq.responseType = "text"; xmlreq.onload = function (e) { var data = e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` 这个例子是在worker中进行加载文件,加载完毕传给...

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

108. 分享:LayaAir下如何加载和使用.JSON文件! [ 72%]

...) { Laya.init(500,400); Laya.loader.load("unpack.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("unpack.json"); var str:String=JSON.stringify(json); trace(str); } } } 2017-08-07 添加评论 免费帖 --> 分享 微博 QZO...

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

109. unity制作的粒子特效加载失败 [ 72%]

... at AnimationClip.__proto.onAsynLoaded (laya.d3.js:22407)     at ResInfo.onLoaded (laya.core.js:12995)     at EventHandler.__proto.runWith (laya.core.js:711)     at ResInfo.__proto.event (laya.core.js:483)     at LoaderManager.__proto._endLoad (laya.core.js:13152)     at Loader.onLoaded (l...

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

110. 分享:TiledMap设置viewport后黑屏问题! [ 72%]

... Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this,onLoaded)); } //切记:设置tiledMap的宽高,需要在地图创建完成之后 private function onLoaded():void { var sp:Sprite=tiledMap.mapSprite() as Sprite;//为tiledMap整个地图的显示容器设置宽高 sp.size...

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