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

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

11. 2D物理-碰撞过滤器 [ 95%]

...,自己实现,可以实现更大程度的控制 // Laya.stage.on(Event.MOUSE_MOVE, this, this.mouseMove); // Laya.stage.on(Event.MOUSE_UP, this, this.mouseUp); // Laya.stage.on(Event.MOUSE_OUT, this, this.mouseUp); // let rigidbody = this.curTarget.getComponent(RigidBody); // rigidbody.type = "k...

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

12. 文本-滚动文本 [ 95%]

...crollText(e) { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText); } /* 停止滚动文本 */ function finishScrollText(e) { Laya.stage.off(Event.MOUSE_MOVE, this, scrollText); Laya.stage.off(Event.MOUSE_UP...

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

13. 文本-滚动文本 [ 95%]

...ent; prevX = this.txt.mouseX; prevY = this.txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, this.scrollText); Laya.stage.on(Event.MOUSE_UP, this, this.finishScrollText); } /* 停止滚动文本 */ finishScrollText(e) { const Event = Laya.Event; Laya.stage.off(Event.MOUSE_MOVE, this, this.scrollText...

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

14. tab 是否可以做到左右滑动切换view呢? [ 91%]

...现,不过你可以通过逻辑控制自己封装接口来完成,通过MOUSE_MOVE事件,左右滑动的同时更改tab的selectedIndex值以及view显示即可实现。 2016-08-23 0 0 分享 微博 QZONE 微信 asdf131 赞同来自: { this.on(laya.events.Event.MOUSE_DOWN ,this, this.onMouseDow...

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

15. Laya.stage.mouseX; Laya.stage.mouseY取到的坐标用来赋给画曲线方法的起点;在左顶点正常,越往右下角起点就越偏移了 [ 91%]

...onsole.log("鼠标点击的点" + this.a, this.b) Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.move2) } move2() { this.path.push(Laya.stage.mouseX, Laya.stage.mouseY); // console.log("移动的点集合" + this.path); this.ps.graphics.drawCurves(this.a, this.b, this.path, "#fff") // console.log("...

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

16. 点击拖动图片,当鼠标移出再移回舞台中时如何保持点击状态 [ 90%]

...MOUSE_UP,this,onUp); } private function onUp():void { Laya.stage.off(Event.MOUSE_MOVE,this,onMove); } private function onDown(e:Event):void { Laya.stage.on(Event.MOUSE_MOVE,this,onMove); } private function onMove():void { // 让sp跟随鼠标移动 sp.x=Laya.stage.mouseX; sp.y=Laya.stage.mouseY; //...

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

17. IOS真机下监听MOUSE_MOVE事件会报错 [ 90%]

IOS真机下监听MOUSE_MOVE事件会报错 var test = new Laya.Image('img/icon/face.png'); test.x = this.width / 2; test.y = this.height / 2; this.addChild(test); test.on(Laya.Event.MOUSE_MOVE, this, (e) => { console.log(e); }); 监听mouse_move事件后,手指在test上滑动,会报错: ...

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

18. laya可以支持滑动手势吗 [ 88%]

...,亦没有光标一说,如果你想做滑动手势,,,可以监听Mouse_MOVE事件,在移动的时候改变光标(移动端可以让显示对象跟随鼠标移动)显示! 2017-06-17 0 0 分享 微博 QZONE 微信 ohkei - as3、as2、h5 赞同来自: 手势识别主要会用到以下...

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

19. 自动旋转后残影 [ 88%]

...; if(_tip){ _tip.graphics.clear(); _downFlag = false; Laya.stage.off(Event.MOUSE_MOVE,this,_moveHandler); _tip.off(Event.MOUSE_DOWN,this,_downHandler); _tip.off(Event.MOUSE_UP,this,_upHandler); _tip.destroy(); } _tip = new Sprite(); _tip.graphics.drawRect(0,0,100,100,"#FFFFFF"); _tip.size(...

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

20. laya拖拽在部分机型(一部XR)StageX不对 [ 88%]

...n(Laya.Event.MOUSE_OUT, this, this.onMouseEvent); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.onMouseEvent); //鼠标yi'dong private onMouseEvent(e: Laya.Event): void {         switch (e.type) { case Laya.Event.MOUSE_MOVE:       this.drag.x = e.stageX;       this.drag.y = e.stageY;   ...

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