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

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

41. 在UI类里调用启动类的静态函数失败了 [ 68%]

...nds ui.GameInfoUI { constructor() { super(); this.kaishi_btn.on(Laya.Event.MOUSE_DOWN, this, this.onStart); // Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.birdFly);//可以绑定两个函数 Laya.stage.on(Laya.Event.KEY_DOWN, this, this.birdFly); this.init(); } public init(): void { Laya.Tween.t...

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

42. 鼠标交互-双指缩放(多点触控) [ 68%]

...ge.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length == 2) { lastDistance = getDistance(touches); Laya.stage.on(Event.MOUSE_MOVE, this, onMouseMove); } } function ...

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

43. 鼠标交互-双指缩放(多点触控) [ 67%]

...this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches = e.touches; if (touches && touches.length == 2) { lastDistance = this.getDistance(touches); Laya...

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

44. 图片像素精准点击问题! [ 67%]

...区域,这里不能用 on(Laya.Event.CLICK,只能通过 on(Laya.Event.MOUSE_DOWN 来检测。   下面是我的代码处理: class demo { private down:Laya.Image; constructor() { // 鼠标事件 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE,...

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

45. 两个问题都关于LayaAir的ios真机 [ 67%]

..., /** * 对象的 <code>Event.MOUSE_OVER、Event.MOUSE_OUT、Event.MOUSE_DOWN、Event.MOUSE_UP、Event.CLICK</code> 事件侦听处理函数。 * @param e Event 对象。 */ protected function onMouse(e:Event):void { if (toggle === false && _selected) return; if(e.type==Event.M...

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

46. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 65%]

...内容相关的链接 提交 2 个回复 Laya_Aaron 赞同来自: on(Event.MOUSE_DOWN,this,onClick); 试一下吧  onclick 函数里再打印log 2017-12-13 0 10 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 这个进度条 var 为pro 另外一张图的类继承了之前页面发布生成的...

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

47. 鼠标交互-滑动 [ 64%]

...idth - TrackLength) / 2; button.y = Laya.stage.height / 2; button.on(Event.MOUSE_DOWN, this, onMouseDown); Laya.stage.addChild(button); //左侧临界点设为圆形初始位置 beginPosition = button.x; //右侧临界点设置 endPosition = beginPosition + TrackLength; } function drawTrack() { var ...

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

48. CameraMoveScript.as在哪儿下载群里的有错 [ 64%]

...alize(owner:Sprite3D):void { super._initialize(owner); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); Laya.stage.on(Event.MOUSE_OUT, this, mouseOut); var camera:BaseCamera = owner.scene.currentCamera; 没有了 -- currentCamera 2017-02-18 添加评论...

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

49. 发现bug,update大问题!!!!!!!!! 2.13版本 [ 64%]

...jump.onClick(this, this.onJump)         this.view.m_left.on(Laya.Event.MOUSE_DOWN,this, this.onleft)         this.view.m_left.on(Laya.Event.MOUSE_UP,this, this.notleft)         this.view.m_right.on(Laya.Event.MOUSE_DOWN,this, this.onright)         this.view.m_right.on(Laya.Event.MOUS...

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

50. [0]Laya3.0.3 的VideoNode不支持在微信浏览器中播放 [ 64%]

...ne.getChildByName('VideoNode') as Laya.VideoNode; Laya.stage.on(Laya.Event.MOUSE_DOWN,this, ()=>{ console.error('Laya.Event.MOUSE_DOWN'); video.play(); }); 很简单的结构,只有在微信上播放不了 1677851971用户 • 2024-03-16 19:56 测试可以播放了,就是手机微信上视频...

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