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

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

41. 复选框组件 · LayaAir3.3 · 引擎文档 · 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

42. 导航标签组组件 · LayaAir3.3 · 引擎文档 · 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 2025 all right re...

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

43. HTTP通信 · LayaAir3.3 · 引擎文档 · 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

44. 视频节点 · LayaAir3.3 · 引擎文档 · 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

45. 2D相机 · LayaAir3.3 · 引擎文档 · 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

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

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

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

47. 2D灯光与网格 · LayaAir3.3 · 引擎文档 · 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

48. 按钮组件 · LayaAir3.3 · 引擎文档 · 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 2025 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:59 img{cursor:pointer}

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

49. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 66%]

...处理 list.renderHandler = new Laya.Handler(this, this.updateItem); this.owner.addChild(list); // 设置数据源为对应图片的路径 var data: any[] = []; for (var i: number = 0; i < 10; ++i) { data.push("resources/res/ui/listskins/1.jpg"); data.push("resources/res/ui/listskins/2.jpg"); dat...

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

50. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 66%]

...= Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件被激活后执行,此时所有节点...

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