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

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

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

...n",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"); PlayerCardManager.instance.initConfig(config); } } 加载到,...

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

422. 输入设备-指南针 [ 61%]

...tage.alignV = Stage.ALIGN_MIDDLE; Laya.loader.load(compassImgPath, Handler.create(this, init)); })(); function init() { // 创建罗盘 createCompass(); // 创建方位指示器 createDirectionIndicator(); // 画出其他UI drawUI(); // 创建显示角度的文本 createDegreesText(); Gyroscope.inst...

来源: Laya_示例 发布时间: 20260303

423. [LayaAir3]LayaAir3 预制体销毁时如何回收其依赖的资源 [ 61%]

...ne/LoginScene.lh").then(res=>{             win:LoginSceneRT = res.create();             mainRT.SceneLayer.addChild(win); }); //销毁预制提 win.destroy(); //如何回收此预制体依赖的资源项:目前通过引擎源码只看到预制依赖预制的关系,但如Image等其...

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

424. 仅在Android微信小游戏下图片错乱 [ 61%]

...tRes("file_list.json") Laya.loader.load("res/ui/share@atlas0.png", Handler.create(this, this.onLoaded), null, Loader.IMAGE, 1, true, null, true) } static onLoaded(res){ console.log("public assets inited !!!!") console.log(Laya.loader.getRes("res/ui/share@atlas0.png"))//此处会报循环引用错误...

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

425. 资源加载后的 回调 [ 61%]

...加载完成后回调loadselectanimation Laya.loader.load(picurl,Handler.create(this, this.loadselectanimation,arrr),null,Loader.ATLAS); 现在的问题是,同一个资源第二次加载的时候,就不执行回调函数了. 是不是第一次加载以后有缓存了,第二次就不加载了,所以...

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

426. Dialog.show 的 showEffect参数在微信真机上的问题 [ 61%]

...og 代码如下: Laya.loader.load(["res/atlas/comp.atlas"], Laya.Handler.create(this, function(){ console.log("load atals ok"); var dlg1:ui.TestDlgUI = new ui.TestDlgUI(); Laya.stage.addChild(dlg1); dlg1.show(); }));在微信小游戏的模拟器上是正常的,但是在手机上就看不到UI...

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

427. 输入设备-指南针 [ 61%]

...; Laya.stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.createDirectionIndicator(); // // 画出其他UI this.drawUI(); //...

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

428. 在 tiledmap 插入一个精灵在上面 [ 61%]

...00, Laya.WebGL);   Laya.loader.load("res/atlas/images.atlas",Laya.Handler.create(this,this.onLoaded),null,Laya.Loader.ATLAS); }   onLoaded(){   console.info("onLoaded");   this.tiledMap = new Laya.TiledMap();   this.tiledMap.createMap("desert.json", new Laya.Rectangle(0, 0, Laya.stage.width, La...

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

429. ColorPicker组件的皮肤制作标准是? [ 61%]

...。               Laya.loader.load("resource/ui/color.png", Handler.create(this,onLoadComplete));//加载资源。           }           private function onLoadComplete():void           {               trace("资源加载完成!");               var colorPicket:...

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

430. 图集动画(JavaScript-LayaAir基础篇(JS)-动画基础) [ 61%]

...行回调方法 this.roleAni.loadAtlas("res/atlas/role.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //添加到舞台 Laya.stage.addChild(this.roleAni); } ``` 运行代码,如图5所示。动画已加载到舞台上,默认是未播放状态的。 ![图5](img/5.png) (图5) ###...

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