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

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

101. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 44%]

...= 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_文档 发布时间: 20250103

102. vivo小游戏 · LayaAir3.3 · 引擎文档 · LAYABOX [ 43%]

... } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake()...

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

103. 预制体模块 · LayaAir3文档 · LAYABOX [ 43%]

...} = Laya; @regClass() export class ScriptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let...

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

104. 预制体 · LayaAir3.3 · 引擎文档 · LAYABOX [ 43%]

...} = Laya; @regClass() export class ScriptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let...

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

105. 2D寻路 · LayaAir3.3 · 引擎文档 · LAYABOX [ 42%]

...建完毕,此方法只执行一次 onAwake(): void { let sprite = this.owner as Laya.Sprite; //sprite.cache = true; this._temp = new Laya.Sprite(); this.owner.scene.addChild(this._temp); this.findCompents(this._allAgent, sprite.scene, Nav2DAgent); } onMouseClick(evt: Laya.Event): void { let pos = ...

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

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

...,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更新时间: 2024-09-10 16:27:03 img{cursor:pointer}

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

107. 导航标签组组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 41%]

...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_文档 发布时间: 20240910

108. 使用3D精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 40%]

...vent.MOUSE_UP, this, this.mouseUp); this.camera = (<Laya.Camera>this.owner); } /** * 监听键盘事件 */ onUpdate(): void { var elapsedTime: number = Laya.timer.delta; if (!isNaN(this.lastMouseX) && !isNaN(this.lastMouseY) && this.isMouseDown) { Laya.InputManager.hasKeyDown(8...

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

109. 多选框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 40%]

...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_文档 发布时间: 20240910

110. runTime使用(TypeScript-IDE篇(TS)-组件化开发相关) [ 39%]

...coreLbl,具有代码提示效果。而script脚本获取只能通过this.owner.getChildByName("xxx") 等方式获取节点** - **建议:如果是页面级的逻辑,需要频繁访问页面内多个元素,使用runtime继承式写法,如果是独立小模块,功能单一,建议用script...

来源: Laya2.0_文档 发布时间: 20210715