大约有 53 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0058 秒)
...要在场景继承类上runtime通过this.xxx访问,那把name后面的 Declare Var给勾选上即可导出该属性到场景的基类里。 3.0不再把场景类统一生成到一个文件里,而是生成到Runtime类的同级目录,当为runtime指定一个场景类后,该场景类的同...
来源: Laya3.0_文档 发布时间: 20251010
...roperty } = Laya; @regClass() export class NewScript extends Laya.Script { declare owner: Laya.Image; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { //需要先加载图集再使用,注意,图集要放到resources目录下或者在构建发布配置项里手动...
来源: Laya3.0_文档 发布时间: 20251128
...perty } = 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
...渲染器的示例代码 */ export class NewScript extends Laya.Script { declare owner: Laya.Sprite; private _trail2D: Laya.Trail2DRender; //从场景文件中获取到的宽度曲线数据 private _widthCurve: any[]; //从场景文件中获取到的颜色渐变数据 private _gradient: any; //组...
来源: Laya3.0_文档 发布时间: 20251010
...roperty } = 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)=>{ //创建预...
来源: Laya3.0_文档 发布时间: 20241014
...roperty } = 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)=>{ //创建预...
来源: Laya3.0_文档 发布时间: 20251105
...加到2D场景中查看效果 */ export class Script extends Laya.Script { declare owner : Laya.Scene; area2D: Laya.Area2D; camera2D: Laya.Camera2D; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.createCamera2D(); } create...
来源: Laya3.0_文档 发布时间: 20251010
...property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ o...
来源: Laya3.0_文档 发布时间: 20251010
...property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ o...
来源: Laya3.0_文档 发布时间: 20251010
..."src/tools/JsonTool"; import { ResourceManager } from "./ResourceManager"; declare function testmusic_cn_ios(accountId: string): void; enum SoundType { BGM, Effect, Dialogue, } export class SoundManager { private static instance: SoundManager; private curBGMUrl: string;...
来源: Laya_社区 发布时间: 20250930