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

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

781. 切换后台时,引擎如何判断是否停止定时器? [ 90%]

...eUI {      constructor() {         super();          this.stage.on(Laya.Event.FOCUS, this, this.onFocus);         this.stage.on(Laya.Event.BLUR, this, this.onBlur);         Laya.timer.frameLoop(1,this,this.onFrameLoop);     }      private onFrameLoop():...

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

782. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 90%]

...组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.sprite2.on(Laya.Event.MOUSE_DOWN, this, this.test2);//设置监听,sprite1或sprite2均可 console.log(this.sprite1.mouseEnabled);//打印父节点sprite1的MouseEnabled的值:true console.log(this.sprite2.mouseEnabled...

来源: Laya3.0_文档 发布时间: 20251010

783. 组件Clip(play方法的bug) [ 90%]

...,to){ (from===void 0)&& (from=0); (to===void 0)&& (to=-1); this._isPlaying=true; this.index=from; this._toIndex=to; this._index++;//源码这里没必要吧 2018-11-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 ...

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

784. dialog设置了自定义的closeEffect之后,弹出框关闭之后黑色遮罩没有关闭 [ 90%]

...定义的closeEffect之后,弹出框关闭之后黑色遮罩没有关闭 this.closeEffect = new Laya.Handler(this, function () { Laya.Tween.to(this, { x: Game.UIWidth }, 200, Laya.Ease.backIn, new Laya.Handler(this, function () { })); }); 2018-10-27 添加评论 免费帖 --> 分享 微博 QZONE ...

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

785. ui组件 TextInput event的事件为什么都触发不了 [ 90%]

ui组件 TextInput event的事件为什么都触发不了 this.changeInput.on(Laya.Event.FOCUS,this.changeInput,this.onChangeInput); private onChangeInput(params:any){ alert(this.changeInput.text); } 2017-03-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请...

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

786. 在UI编辑器里可以看到位图字体,但是进入游戏后没有显示,怎么解决 [ 90%]

...要这么做 2.ziti类中预加载字体,加载完成回调你写的是this.onLoaded。导致下边onLoaded函数根本就没有走,也更走不到init函数中 3.init函数中你给test的text赋值为this.labelFont.text,根据你这一步的做法可以猜到你是想用UI界面中的那个...

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

787. 组件属性的代码使用 · LayaAir3.3 · 引擎文档 · LAYABOX [ 90%]

...property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图1-2所示: (图1-2) 1.2 3D节点的基础使用 首先,如动图1-3所示,将场景中已经...

来源: Laya3.0_文档 发布时间: 20251010

788. 关于2.3.0动作克隆问题,AB两个怪物用同一个模型,A的动作会影响B。 [ 90%]

.../attack state.clipStart = clipStart; state.clipEnd = clipEnd; state.clip = this._animator.getDefaultState().clip; this._animator.addState(state);每个状态的clip都是 this._animator.getDefaultState().clip 这个对象。 播放动作时,是根据动作类型设置是否循环。 this._animato...

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

789. [临时解决]bug?加载sk问题 [ 90%]

...,预加载时报错,就是这里: laya.core.js的7430行    if (this._pos_+2 > this._length)throw "getUint16 error - Out of bounds"; 但是,不使用预加载,就不报错,只是不知道什么时候真的加载完成,那个_template不再为null,我就可以调用play了。 ...

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

790. 被遮罩的对象的子显示对象再添加遮罩,子显示对象的遮罩显示不正确 [ 90%]

...= new Laya.Sprite(); bigMask.graphics.drawRect(0, 0, 300, 200, "#ffffff"); this.mask = bigMask; // let imgMask:Laya.Sprite = new Laya.Sprite(); imgMask.graphics.drawRect(0, 0, 100, 300, "#ffffff"); this.img.mask = imgMask; Laya.Tween.to(this.img, {x:100}, 10000).update = Laya.Handler.create(this, th...

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