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

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

41. 水平滑动条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 73%]

...s.tick = 1; hs.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(hs); } private onChange(value: number): void { console.log("滑块的位置:" + value); } } 运行效果: (动图2-1) Copyright ©Layabox 2026 all right reserved,powered by LayaAir Engine更新时间...

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

42. 复选框组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 72%]

...ng): Laya.CheckBox { let cb: Laya.CheckBox = new Laya.CheckBox(skin); this.owner.addChild(cb); cb.labelColors = "white"; cb.labelSize = 20; cb.labelFont = "Microsoft YaHei"; cb.labelPadding = "3,0,0,5"; return cb; } private updateLabel(checkBox: Laya.CheckBox): void { checkBox.label = checkBox.selec...

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

43. 导航标签组组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 72%]

...tedIndex); tab.selectHandler = new Laya.Handler(this, this.onSelect); this.owner.addChild(tab); return tab; } private onSelect(index: number): void { console.log("当前选择的标签页索引为 " + index); } } 运行效果如下动图所示: (动图2-1) Copyright ©Layabox 2026 all right re...

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

44. Spine动画烘焙插件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 71%]

...画 spine2dRender.animationName = "walk"; // 添加预制体到场景 this.owner.addChild(spineboy); }); } } Copyright ©Layabox 2026 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:57 img{cursor:pointer}

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

45. HTTP通信 · LayaAir3.4 · 引擎文档 · LAYABOX [ 71%]

... this.text.align = "center"; this.text.y = 20; this.text.centerX = 0; this.owner.addChild(this.text); } /** * 发起HTTP连接请求 */ private connect(): void { //创建HttpRequest对象 this.hr = new HttpRequest(); //请求响应的进度改变时触发 this.hr.on(Event.PROGRESS, this, this.onHttp...

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

46. 视频节点 · LayaAir3.4 · 引擎文档 · LAYABOX [ 71%]

...= Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { let video = new Laya.VideoNode; //添加到舞...

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

47. 2D相机 · LayaAir3.4 · 引擎文档 · LAYABOX [ 70%]

...场景中查看效果 */ export class Script extends Laya.Script { declare owner : Laya.Scene; area2D: Laya.Area2D; camera2D: Laya.Camera2D; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.createCamera2D(); } createCamera2D...

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

48. 下拉选项框组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 70%]

...,item3,item4,item5"); ComboBox.labelSize = 30; ComboBox.itemSize = 25 this.owner.addChild(ComboBox); ComboBox.autoSize = true; ComboBox.pos(200, 200); }); } } Copyright ©Layabox 2026 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:59 img{cursor:pointer}

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

49. 2D灯光与网格 · LayaAir3.4 · 引擎文档 · LAYABOX [ 69%]

...} = Laya; @regClass() export class lightTest extends Laya.Script { declare owner: Laya.Sprite; @property({ type: Laya.Sprite }) light1: Laya.Sprite; @property({ type: Laya.Sprite }) mesh1: Laya.Sprite; @property({ type: Laya.Sprite }) mesh2: Laya.Sprite; private light1Render: Laya.FreeformLight2D; p...

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

50. 按钮组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 66%]

... string): Laya.Button { var btn: Laya.Button = new Laya.Button(skin); this.owner.addChild(btn); return btn; } } 上述代码运行效果如动图2-1所示: (动图2-1) Copyright ©Layabox 2026 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:59 img{cursor:pointer}

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