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

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

1. 2D物理-碰撞过滤器 [ 100%]

...age.on(Event.MOUSE_UP, this, this.destoryJoint); Laya.stage.on(Event.MOUSE_OUT, this, this.destoryJoint); // 方案二,自己实现,可以实现更大程度的控制 // Laya.stage.on(Event.MOUSE_MOVE, this, this.mouseMove); // Laya.stage.on(Event.MOUSE_UP, this, this.mouseUp); // Laya.stage.on(E...

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

2. 鼠标交互-滑动 [ 88%]

....stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } /**移到事件处理*/ onMouseMove(e) { this.button.x = Math.max(Math.min(Laya.stage.mouseX, endPosition), beginPosition); } /**抬起事件处理*/ onMouseUp(e) { const Event = Laya.Event, Twee...

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

3. 鼠标交互-鼠标交互 [ 84%]

...); 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, this, this.mouseHandler); } /** * 鼠标响应事件处理 */ mouseHandler(e) { const Event = Laya.Event; switch ...

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

4. 鼠标交互-双指旋转(多点触控) [ 75%]

....stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; let w = 200, h = 300; this.sp = new Sprite(); Laya.stage.addChild(this.sp); this.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this...

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

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

....stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; let w = 300, h = 300; this.sp = new Sprite(); Laya.stage.addChild(this.sp); this.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this...

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

6. Sprite-新手引导 [ 72%]

...ctionArea); // 设置叠加模式 interactionArea.blendMode = "destination-out"; // 设置点击区域 hitArea = new Laya.HitArea(); hitArea.hit.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000"); guideContainer.hitArea = hitArea; guideContainer.mouseEnabled = true; tipContainer = new Sprit...

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

7. UI-RefreshList [ 31%]

...vent.MOUSE_UP, this, this.stageOnMouseUp); this.refreshList.on(Event.MOUSE_OUT, this, this.stageOnMouseUp); //游戏逻辑关联引擎的停止滚动接口 this.refreshList.scrollBar.stopMoveLimit = this.scrollBarIsStopBind.bind(this); this.refreshLimit("dragTopLimit", 65); this.refreshLimit("dragBo...

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