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

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

521. 阻止点击穿透问题 [ 69%]

...骰子会触发事件。 代码如下:  骰子的点击事件代码: this.items.shaizi.on("click", this, function(e) { e.stopPropagation(); if(!Game.runing) { Game.runing = true; Game.stepNum = Math.floor(Math.random() * 6) + 1; console.log(Game.stepNum) Animate.role(Game.stepNum); } },[this.it...

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

522. 相对布局,重新适应问题 [ 69%]

...手动监听Laya.stage.on(Laya.Event.RESIZE,,)来二次适配吗 // this.imgBG.left = 0 ; // this.imgBG.right = 0 ; // this.imgBG.top = 0 ; // this.imgBG.bottom = 0 ;   还有一个就是 layoutEnabled 属性 在什么情况用!   2017-09-18 添加评论 免费帖 --> 分享 微博 QZONE ...

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

523. 在List渲染的时候,在滚动一个list的时候,如何实现另一个list也跟着滚动,并且两个list同时滚动一模一样。 [ 69%]

...决,谢谢! 注意点: 两个list的vScrollBarSkin都需要赋值; this.uiPanel.RankList.scrollBar.on( Laya.Event.CHANGE, this, this.OnScroll ); private OnScroll() { this.uiPanel.RankList1.scrollBar.value = this.uiPanel.RankList.scrollBar.value; } 2018-05-16 1 1 分享 微博 QZONE 微信 ...

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

524. 解析sk资源报错 [ 69%]

..._templet = new Templet();             _templet.on(Event.COMPLETE,this,parseComplete);             _templet.on(Event.ERROR,this,onError);             _templet.loadAni("res/role/1/left/left.sk");         }                  private function parseComplete():v...

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

525. 视频节点 · LayaAir3.3 · 引擎文档 · LAYABOX [ 69%]

...DOWN, () => { Laya.loader.load("resources/layaAir.mp4").then(() => { this.video.play(); //播放视频 }); }) } } 如果是在LayaAir IDE中运行,则VideoNode无需通过事件触发播放。但是在Chrome中,自动播放只允许静音自动播放。只有用户进行交互(单击、...

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

526. 请问在2.0版本的js中,如何获取mouse_move的鼠标坐标 [ 69%]

...js中,如何获取mouse_move的鼠标坐标 img.on(Laya.Event.MOUSE_MOVE,this,this.onmousemove); apesCtn.addChild(img); ........ onmousemove(e) { //console.log("e="+JSON.stringify(e)); for (var property in e) { console.log(property+"="+e[property]); } console.log("========================"); /**...

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

527. Native IOS下获取陀螺仪数据为0 [ 69%]

... //设置陀螺仪的处理 Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this.onOrientationChange);   private onOrientationChange(absolute:Boolean, info: Laya.RotationInfo):void         {             if (info.alpha === null)             {               ...

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

528. 循环监听按钮,如何进行传参和接受参数 [ 69%]

...这里监听循环按钮 for (let i: number = 1; i <= 2; i++) { let e = this.typeBox.getChildByName('btn' + i) as Laya.Image;               console.log(e); e.on(Laya.Event.CLICK, this, this.onBtnClick); }   按钮事件 private onBtnClick(event:Laya.Event): void {         le...

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

529. 微信加载文件失败没有回调 [ 69%]

...rror")} LoadOK(){console.log("LoadOK")}   Laya.loader.on(Laya.Event.ERROR,this,this.LoadError) Laya.loader.load("不存在的图片URL",Laya.Handler(this,this.LoadOK));     发布成微信小游戏版本在真机微信上运行,发现这2个回调都没执行。   2018-09-20 添加评论 免...

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

530. spine 推荐使用方式 [ 69%]

...     */     __proto.destroyTexture=function(){         if(this._mainTexture!=null){             this._mainTexture.disposeBitmap();         }         this._needRecoverTexture = true;     }     /**      * 恢复纹理      */     __proto....

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