大约有 112 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0052 秒)
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Sprite3D }) public cube: Laya.Sprite3D; // 平移距离 private translate: Laya.Vector3 = new Laya.Vector3(1, 1, 1); constructor() { super(); } /** * 组件被激活后执行,此...
来源: Laya3.0_文档 发布时间: 20251010
...age1Runtime.jsimport LoadPage from './loadPage' export default class page1 extends Laya.Scene { constructor() { super() } onEnable() { // 预加载loadPage let loadPage = new LoadPage() loadPage.preload() this.getChildByName('text').on(Laya.Event.CLICK, this, function () { // 切换打开场景方...
来源: Laya_社区 发布时间: 20181124
...ex | Frames No Frames IBox Packagelaya.uiInterfacepublic interface IBox extends IComponentImplementors Box容器接口,实现了编辑器容器类型。Public Properties Hide Inherited Public Properties Show Inherited Public Properties PropertyDefined By comXml : Object XML 数据。 ICompone...
来源: laya_api 发布时间: 20170929
...s | Methods Packagelaya.filtersInterfacepublic interface IFilterActionGL extends IFilterActionImplementors ColorFilterActionGL, FilterActionGLPublic Properties PropertyDefined By typeMix : int[read-only] IFilterActionGLPublic Methods Hide Inherited Public Methods Show Inherited Public Methods...
来源: laya_api 发布时间: 20170929
...。 const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { @property({ type: Laya.List }) list: Laya.List constructor() { super(); } // 组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { // 给List对象赋值 var data: Array<any>...
来源: Laya3.0_文档 发布时间: 20251010
...处理到……var classPattern = /\b(?:interface|class)\b\s+(\w+)(?:\s*(?:extends|implements)\s*((?:(?:(?:\w+\.)*(?:\w+)),?\b)+))?/; var modeuleHelp = /\b(?:namespace|module)\b\s+((?:\w\.?)+)/; var importHelp = /\bimport\b.*?=\s*((?:\w+\.?)+)/ //.exec(str)[1] var interfaceHelp = /\bimplements\b\s+(...
来源: Laya_社区 发布时间: 20171107
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.ProgressBar }) public progressBar: Laya.ProgressBar; @property({ type: Laya.Text }) public loadText: Laya.Text; //组件被激活后执行,此时所有节点和组件均已创建...
来源: Laya3.0_文档 发布时间: 20251010
... 下面是一个推荐做法: //Script.ts @Laya.regClass() class Script extends Laya.Script { wantToUseNode() { EditorEnv.scene.runScript("TestSceneScript.visitNode"); } } //TestSceneScript.ts import fs from "fs"; //注意是IEditorEnv.regClass,不是Laya.regClass!! @IEditorEnv.regClass() class ...
来源: Laya3.0_文档 发布时间: 20251010
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图1-2所...
来源: Laya3.0_文档 发布时间: 20251010
...st { regClass, property } = Laya; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建...
来源: Laya3.0_文档 发布时间: 20251010