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

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

1. 使用对象池重复使用skeleton报错,请问有解决方案吗?谢谢 [ 100%]

...测试地址:http://layaair.ldc.layabox.com ... xture  测试代码: (function() { var Skeleton = Laya.Skeleton; var Templet  = Laya.Templet; var Event    = Laya.Event; var Browser  = Laya.Browser; var Stat     = Laya.Stat; var WebGL    = Laya.WebGL; var Pool     = Laya.Pool;   var...

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

2. 怎么实现一个Timer的loop的delay时间越来越短? [ 97%]

...Timer的loop的delay时间越来越短? loop(delay:int, caller:*, method:Function, args:Array = null, coverBefore:Boolean = true):void delay:int在loop过程中可以修改吗? 定时重复执行。怎么实现一个Timer的loop的delay时间越来越短? 2017-06-26 添加评论 免费帖 --> 分...

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

3. Laya.timer.loop 的优先级 [ 95%]

...0, oy2419498011 • 2018-02-27 16:17 Laya.timer.loop(1000,this,delete_); function delete_(){ // Laya.timer.clear(this,delete_); delete_desktop(1); } function delete_desktop(cut_out){ if(cut_out==1){ delete_majian() }; }; function delete_majian(){ game.bottom.removeChild(game.bottom.getChildAt(0));...

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

4. 关于Timer中的loop方法 [ 94%]

...ke007 • 2017-08-27 16:20 var i=0; var t=new Laya.Timer(); t.loop(1,this, function () { i++; }) t.loop(1000,this, function () { console.log(i); i=0; }) 测试下 176*****233 • 2017-08-28 10:09 Timer是单例,不要实例它,直接使用Laya.timer.loop(); cike007 • 2017-08-28 13:32 @176*****233 ...

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

5. 背景音乐问题 [ 93%]

...我代码写错了吗?   var soundControl = true; // 背景乐开关 function onPlayBgMusic(url, loop, rate) {     Laya.SoundManager.playbackRate = rate;     if(soundControl){         Laya.SoundManager.playMusic(url, loop, Laya.Handler.create(this, onCompleteBgMusic, [loop, url]));    ...

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

6. 全局动画不能加载 [ 93%]

...framesMap会存一个hero_fly的动画。 但是play的实现 __proto.play=function(start,loop,name){ (start===void 0)&& (start=0); (loop===void 0)&& (loop=true); (name===void 0)&& (name=""); if (name)this._setFramesFromCache(this._url+"#"+name); this._isPlaying=true; this.in...

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

7. 关闭指定定时器timer [ 92%]

... 首先你创建的两个定时器都有回调。Laya.timer.clear(this,function),function就是你想要关闭的定时器的回调。谢谢您的反馈,有什么问题再联系... 2016-07-18 1 4 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 ...

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

8. 飞机大战地图滚动报错,麻烦看下? [ 91%]

...nit(650, 316, Laya.WebGL); var bg1 = null; var bg2 = null; var box = null; function bg_rolling() {     box = new laya.display.Sprite();     Laya.stage.addChild(box);     bg1 = new laya.display.Sprite();     bg1.loadImage("res/bg1.png");     box.addChild(bg1);     bg2 = new laya.display.S...

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

9. js继承模式 [ 91%]

js继承模式     new function() { var className = 'BackGround'; window[className] = (function() { Laya.class(Class, className, Laya.Sprite); function Class() { Class.super(this); // this定义.. this.init(); } Class.prototype.init = function() { console.log(this); }; return Class; })(); } var _...

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

10. 在加载3d人物的时候,Laya.timer.loop会卡顿,由于又需要每隔一段时间执行一个方法,暂时想到了用Laya.timer.loop,这个有什么好的解决方案替代吗? [ 91%]

...延迟执行,默认为 true 。          */         public function frameLoop(delay:int, caller:*, method:Function, args:Array = null, coverBefore:Boolean = true):void {             _create(true, true, delay, caller, method, args, coverBefore);         } 2018-04-09 0 2 ...

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