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

大约有 498 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0041 秒)

291. JS中利用New创建出来的对象和相应内存,如何主动去释放? [ 69%]

...mple){  (function(){    Laya.init(640,1027);    Laya.loader.load("res/atlas/comp.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS)})(); function onLoaded(){  var karaok = new Karaok(); // new出来的内存 如何主动销毁? } })(window.LayaSample || (window.LayaSample={}));...

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

292. 报无法找到资源,未升级ide之前不报错 [ 69%]

...mber = 0; i < len; i++) {         aniFrames.push("resources/UI/role/atlasAni2/139x/" + name + i + ".png");     }     Laya.Animation.createFrames(aniFrames, name); }     附件 : --> 2023-07-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与...

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

293. 图集怎么切割,如图所示,就是我只要第2和第3张图片组合,实现飞机动画效果? [ 69%]

...出,他们又会被放到一起去了 Laya.Animation.createFrames("res/atlas/war.atlas","hreo_fly") ; 我用这个createFrames实现飞机动画效果,旧版本,可以加多个单独的图片,, 但最新版的报错:supplied parameter do not match any signature of call target(提供的参...

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

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

...onConfigLoaded=function(){ Laya.init(600,400); Laya.loader.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 test...

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

295. Laya.loader Progress回调形同虚设 [ 68%]

...this, onLoaded),Handler.create(this, onProgress)); //Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded),Handler.create(this, onProgress)); } private function onProgress(v:Number):void { trace("onProgress",v); }    不管添加多少资源,onProgress都只会调用一次  ...

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

296. drawTexture时,Matrix对象,a=-1,无法实现水平翻转 [ 68%]

...链接 提交 1 个回复 ssqhu 赞同来自: qihei Laya.loader.load("res/atlas/test0.png", Handler.create(this, function():void    {     var t:Texture = Laya.loader.getRes("res/atlas/test0.png");     ape = new Sprite();     var matrix:Matrix = new Matrix();     matrix.a = -1;  ...

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

297. UI界面加载有哪些回调方法可用 [ 68%]

UI界面加载有哪些回调方法可用 Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); 类似于this.onLoaded函数,还有哪些生命周期相关的回调呢。 我想在UI完全加载完毕后,完成一些init操作,this.onLoad...

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

298. Panel滚动条滑块位于最下方 [ 68%]

...1240,800,WebGL); Laya.stage.bgColor="#EEFFCC"; Laya.loader.load([{url:"res/atlas/comp.json",type:Loader.ATLAS},{url:"bg2.png"}],Handler.create(this,onCom)); } private function onCom():void { var img:Image=new Image(); img.skin="bg2.png"; panel=new Panel(); panel.vScrollBarSkin="comp/vscroll.png"; pa...

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

299. 动画-图集动画 [ 68%]

...ader.load(AniConfPath, Handler.create(this, createAnimation), null, Loader.ATLAS); })(); function createAnimation() { var ani = new Animation(); ani.loadAtlas(AniConfPath); // 加载图集动画 ani.interval = 30; // 设置播放间隔(单位:毫秒) ani.index = 1; // 当前播放索引 ani.pl...

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

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

...AssetList = Loader.getRes("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