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

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

11. laya.display.Sprite_API3.0 [ 47%]

...prite();//创建一个 Sprite 类的实例对象 sprite 。 shape.graphics.drawRect(0, 0, 100, 100, "#ccff00", "#ff0000", 2);//绘制一个有边框的填充矩形。 shape.x = 400;//设置 shape 对象相对于父容器的水平方向坐标值。 shape.y = 200;//设置 shape 对象相对于父容...

来源: Laya3.0_api 发布时间: 20231115

12. laya.ui.List_API3.0 [ 43%]

... laya.ui.Label; class Item extends Box { public function Item() { graphics.drawRect(0, 0, 100, 20,null, "#ff0000"); var label:Label = new Label(); label.text = "100000"; label.name = "label";//设置 label 的name属性值。 label.size(100, 20); addChild(label); } } example (function (_super){ func...

来源: Laya3.0_api 发布时间: 20231115

13. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 40%]

...点击区域 let hitArea: Laya.HitArea = new Laya.HitArea(); hitArea.hit.drawRect(0, 0, 100, 100, "#00ff00"); sp.hitArea = hitArea; 我们来看看运行结果: (动图3-6) 可以看到,点击区域是有点击效果的,其他区域是没有效果的,而如果不设置hitArea,只要是...

来源: Laya3.0_文档 发布时间: 20251010