大约有 9 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0023 秒)
...ya.stage.mouseX; mLastMouseY = Laya.stage.mouseY; Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); } mouseMove() { let moveX = mX - (Laya.stage.mouseX - mLastMouseX), moveY = mY - (Laya.stage.mouseY - mLastMouseY); // 移动地图视口 this.tiledMap.moveViewPort(moveX, moveY); } mouseUp(...
来源: Laya2.0_示例 发布时间: 20241117
...hes[1].stageY, touches[0].stageX - touches[1].stageX); Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); } } onMouseMove(e) { let touches = e.touches; if (touches && touches.length == 2) { let nowRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX...
来源: Laya2.0_示例 发布时间: 20241117
...ngth == 2) { lastDistance = this.getDistance(touches); Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); } } onMouseMove(e) { let distance = this.getDistance(e.touches); //判断当前距离与上次距离变化,确定是放大还是缩小 const factor = 0.01; this.sp.scaleX += (distance - ...
来源: Laya2.0_示例 发布时间: 20241117
...{ const Event = Laya.Event; //添加鼠标移到侦听 Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); buttonPosition = this.button.x; Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } /**移到事件处理*/ onMouseMove(e) { this.b...
来源: Laya2.0_示例 发布时间: 20241117
...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_示例 发布时间: 20241117
...,自己实现,可以实现更大程度的控制 // 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_示例 发布时间: 20241117
...ndler); rect.on(Event.RIGHT_CLICK, this, this.mouseHandler); rect.on(Event.MOUSE_MOVE, this, this.mouseHandler); rect.on(Event.MOUSE_OVER, this, this.mouseHandler); rect.on(Event.MOUSE_OUT, this, this.mouseHandler); rect.on(Event.DOUBLE_CLICK, this, this.mouseHandler); rect.on(Event.MOUSE_WHEEL, thi...
来源: Laya2.0_示例 发布时间: 20241117
...p.pivot(50, 50); // 设置mask bg2.mask = maskSp; Laya.stage.on(Laya.Event.MOUSE_MOVE, this, () => { bg2.x = -Laya.stage.mouseX * 2; bg2.y = -Laya.stage.mouseY * 2; maskSp.x = Laya.stage.mouseX; maskSp.y = Laya.stage.mouseY; }); } } new Sprite_MagnifyingGlass();module laya { import Sprite = Laya.Spr...
来源: Laya2.0_示例 发布时间: 20241117
...tage.mouseY)); //鼠标按下的时候进行移动侦听 e.target.on(Event.MOUSE_MOVE, this, this.onItemBoxMouseMove, [e.target, index]); } } if (e.type == Event.MOUSE_UP) { this.mouseDown = false; this.itemOnMouseUp(); } //点击标记文本 if (e.target.name == "flag" && e.type == Event.CLICK) thi...
来源: Laya2.0_示例 发布时间: 20241117