大约有 122 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0085 秒)
...= 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
... } = 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
...} = 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
...} = 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
...建完毕,此方法只执行一次 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
...,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
...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
...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
...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
...coreLbl,具有代码提示效果。而script脚本获取只能通过this.owner.getChildByName("xxx") 等方式获取节点** - **建议:如果是页面级的逻辑,需要频繁访问页面内多个元素,使用runtime继承式写法,如果是独立小模块,功能单一,建议用script...
来源: Laya2.0_文档 发布时间: 20210715