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

大约有 35 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0023 秒)

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

...e(); Laya.stage.addChild(this.sp); this.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.sp.size(w, h); this.sp.pivot(w / 2, h / 2); this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机...

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

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

...p = new Sprite(); var w = 300, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; i...

来源: Laya_示例 发布时间: 20251130

13. 计时器-延迟执行 [ 81%]

... h = 60; var button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } function onDecreaseAlpha1(e) { //移除鼠标单击事件 button1.off(Event.CLICK, this, onDecrease...

来源: Laya_示例 发布时间: 20251130

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

...e(); Laya.stage.addChild(this.sp); this.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.sp.size(w, h); this.sp.pivot(w / 2, h / 2); this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机...

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

15. 鼠标交互-修正交互区域 [ 81%]

...ralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.size(Laya.stage.width, Laya.stage.height / 2); Laya.stage.addChild(coralRect); coralRect.on(Event.MOUSE_DOWN, this, onDown); } function createDeepSkyblueR...

来源: Laya_示例 发布时间: 20251130

16. 计时器-延迟执行 [ 80%]

...ite(); Laya.stage.addChild(button); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } onDecreaseAlpha1(e) { const Event = Laya.Event; //移除鼠标单击事件 this.button1.off(Event.C...

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

17. 鼠标交互-修正交互区域 [ 80%]

...ralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.size(Laya.stage.width, Laya.stage.height / 2); Laya.stage.addChild(coralRect); coralRect.on(Event.MOUSE_DOWN, this, this.onDown); } createDeepSkyblueRect(...

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

18. 加载TiledMap 不显示 [ 78%]

.../ Math.PI * 30) * radiusX;         var color: string = "#FF7F50";          this.sprite = new Sprite();         this.sprite.graphics.drawLine(0, 0, -radiusX, radiusY, color);         this.sprite.graphics.drawLine(0, 0, radiusX, radiusY, color);  ...

来源: Laya_社区 发布时间: 20201230

19. 鼠标交互-滑动 [ 78%]

...onst h = 30; button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - TrackLength) / 2; button.y = Laya.stage.height / 2; b...

来源: Laya_示例 发布时间: 20251130

20. 鼠标交互-滑动 [ 77%]

...0; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) this.button.size(w, h); this.button.x = (Laya.stage.width - TrackLength) / 2; this.button.y = Laya...

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