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

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

1. 区块地图-等角地图 [ 100%]

... 14.37 var color = "#FF7F50"; this.sprite = new Laya.Sprite(); this.sprite.graphics.drawLine(0, 0, -radiusX, radiusY, color); this.sprite.graphics.drawLine(0, 0, radiusX, radiusY, color); this.sprite.graphics.drawLine(-radiusX, radiusY, 0, radiusY * 2, color); this.sprite.graphics.drawLine(radiusX, ...

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

2. 输入设备-指南针 [ 99%]

...ld(directionIndicator); directionIndicator.alpha = 0.8; directionIndicator.graphics.drawCircle(0, 0, 70, "#343434"); directionIndicator.graphics.drawLine(-40, 0, 40, 0, "#FFFFFF", 3); directionIndicator.graphics.drawLine(0, -40, 0, 40, "#FFFFFF", 3); directionIndicator.x = compassImg.x; directionInd...

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

3. Sprite-绘制各种形状 [ 96%]

...thing() { let sp = new Laya.Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5); //画曲线 sp.graphics.drawCurves(352, 58, [0, 0, 19, -100, 39, 0, 58...

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

4. 缓动-简单的Tween [ 79%]

...aracters/2.png"); characterB.pivot(34, 50); characterB.y = 250; Laya.stage.graphics.drawLine(terminalX, 0, terminalX, Laya.stage.height, "#FFFFFF"); // characterA使用Tween.to缓动 Tween.to(characterA, { x : terminalX }, 1000); // characterB使用Tween.from缓动 characterB.x = terminalX; Tween.fr...

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

5. 鼠标交互-滑动 [ 72%]

...Event; const w = 50; const h = 30; 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 - TrackL...

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