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

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

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

...teHouse(); for (let i = 1; i mouseJoint).onMouseDown); Laya.stage.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.st...

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

2. 鼠标交互-Hold [ 94%]

...Laya.timer.once(HOLD_TRIGGER_TIME, this, this.onHold); Laya.stage.on(Event.MOUSE_UP, this, this.onApeRelease); } onHold() { const Tween = Laya.Tween, Ease = Laya.Ease; Tween.to(this.ape, { "scaleX": 1, "scaleY": 1 }, 500, Ease.bounceOut); isApeHold = true; } /** 鼠标放开后停止hold */ onApeRel...

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

3. 鼠标交互-滑动 [ 92%]

...is, 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.button.x = Math.max(Math.min(Laya.stage.mouseX, endPosition), beginPosition); } /**抬起...

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

4. 文本-滚动文本 [ 91%]

...aya.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); Laya.stage.off(Event.MOUSE_UP, this, this.finishScrol...

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

5. 鼠标交互-鼠标交互 [ 90%]

...事件 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, this, this.mouseHandler); rect.on(Event.RIGHT_CLICK, thi...

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

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

...show(); this.setup(); } setup() { this.createSprite(); Laya.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....

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

7. 区块地图-滚动地图 [ 83%]

...Laya.stage.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.mouseUp); Stat.show(); } // 创建地图 createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle, Handler = Laya.Handler, Browser = Laya.Browser; mX = mY = 0; // 创建地图对象 this.t...

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

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

...tup() { const Event = Laya.Event; this.createSprite(); Laya.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....

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

9. 加载-销毁Texture使用的图片资源 [ 79%]

...(20, 160); Laya.stage.addChild(this.btn); //添加侦听 this.btn.on(Event.MOUSE_UP, this, this.onMouseUp); } /** * 鼠标事件响应函数 * @param evt */ onMouseUp(evt) { if (this.isDestroyed) { //通过设置 visible=true ,来触发渲染,然后引擎会自动恢复资源 this.spBg.visible =...

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

10. UI-RefreshList [ 65%]

....refreshList.array = data; // 添加事件监听 this.refreshList.on(Event.MOUSE_UP, this, this.stageOnMouseUp); this.refreshList.on(Event.MOUSE_OUT, this, this.stageOnMouseUp); //游戏逻辑关联引擎的停止滚动接口 this.refreshList.scrollBar.stopMoveLimit = this.scrollBarIsStopBind.bind(t...

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