大约有 4 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0020 秒)
...ouseY = 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() { mX -= Laya.stage.mo...
来源: 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 = "kinematic"; } mouseMove(e...
来源: Laya2.0_示例 发布时间: 20241117
...imate); Laya.stage.on('mousedown', this, this.onMouseDown); Laya.stage.on('mousemove', this, this.onMouseMove); Laya.stage.on('mouseup', this, this.onMouseUp); } createCanvases() { const Sprite = Laya.Sprite; let graphicsCanvas = new Sprite(); Laya.stage.addChild(graphicsCanvas); let liveGraphicsCan...
来源: Laya2.0_示例 发布时间: 20241117
...Sp.pivot(50, 50); //设置mask this.bg2.mask = this.maskSp; Laya.stage.on("mousemove", this, this.onMouseMove); } private onMouseMove():void { this.bg2.x = -Laya.stage.mouseX * 2; this.bg2.y = -Laya.stage.mouseY * 2; this.maskSp.x = Laya.stage.mouseX; this.maskSp.y = Laya.stage.mouseY; } } } new lay...
来源: Laya2.0_示例 发布时间: 20241117