大约有 99 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0038 秒)
Laya_社区(56) Laya2.0_示例(9) Laya2.0_文档(9) Laya_示例(7) Laya2.0_api(6) laya_api(6) Laya3.0_文档(5) Laya3.0_api(1)
MOUSE_DOWN、MOUSE_UP,CLICK 三个鼠标事件,实现按下,松开,对象缩小和放大,点击事件打开对应界面。 问题:鼠标按下后,移开之后再松开。MOUSE_UP和CLICK都没有触发。导致对象缩小了却没有回归到正常状态。如何解决这问题呢? 2...
来源: Laya_社区 发布时间: 20180414
... - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, this, mouseHandler); r...
来源: Laya_示例 发布时间: 20240929
... - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, this.mouseHandler); rect.on(Event.MOUSE_UP, this, this.mouseHandler); rect.on(Event.CLICK, this, this.mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, this.mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, th...
来源: Laya2.0_示例 发布时间: 20240929
...x(posx, posy, width, height, ratio) { var box = new Sprite(); box.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.addChild(box); box.pos(posx, posy).size(width * ratio, height * ratio); var rigidbody: RigidBody = box.addComponent(RigidBody); rigidbody.category = Physics_Physics_CollisionFilte...
来源: Laya2.0_示例 发布时间: 20240929
...多游戏里面都需要的,, 阿呆 • 2020-09-22 21:34 mouse_move和mouse_down 也可以用这方法吗?
来源: Laya_社区 发布时间: 20180111
....8, 0.8); Laya.stage.addChild(this.ape); // 鼠标交互 this.ape.on(Event.MOUSE_DOWN, this, this.onApePress); } onApePress(e) { const Event = Laya.Event; // 鼠标按下后,HOLD_TRIGGER_TIME毫秒后hold Laya.timer.once(HOLD_TRIGGER_TIME, this, this.onHold); Laya.stage.on(Event.MOUSE_UP, this, th...
来源: Laya2.0_示例 发布时间: 20240929
...pe.scale(0.8, 0.8); Laya.stage.addChild(ape); // 鼠标交互 ape.on(Event.MOUSE_DOWN, this, onApePress); } function onApePress(e) { // 鼠标按下后,HOLD_TRIGGER_TIME毫秒后hold Laya.timer.once(HOLD_TRIGGER_TIME, this, onHold); Laya.stage.on(Event.MOUSE_UP, this, onApeRelease); } function onH...
来源: Laya_示例 发布时间: 20240929
...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_示例 发布时间: 20240929
...ckLength) / 2; this.button.y = Laya.stage.height / 2; this.button.on(Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.addChild(this.button); //左侧临界点设为圆形初始位置 beginPosition = this.button.x; //右侧临界点设置 endPosition = beginPosition + TrackLength; } drawTrack() ...
来源: Laya2.0_示例 发布时间: 20240929
...ntSize = 20; txt.color = "#ffffff"; Laya.stage.addChild(txt); txt.on(Event.MOUSE_DOWN, this, startScrollText); } /* 开始滚动文本 */ function startScrollText(e) { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finis...
来源: Laya_示例 发布时间: 20240929