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

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

41. 2.x引擎项目升级说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 39%]

...要在场景继承类上runtime通过this.xxx访问,那把name后面的 Declare Var给勾选上即可导出该属性到场景的基类里。 3.0不再把场景类统一生成到一个文件里,而是生成到Runtime类的同级目录,当为runtime指定一个场景类后,该场景类的同...

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

42. 自动图集配置 · LayaAir3.3 · 引擎文档 · LAYABOX [ 39%]

...roperty } = Laya; @regClass() export class NewScript extends Laya.Script { declare owner: Laya.Image; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { //需要先加载图集再使用,注意,图集要放到resources目录下或者在构建发布配置项里手动...

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

43. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 37%]

...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

44. 2D拖尾渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 36%]

...渲染器的示例代码 */ export class NewScript extends Laya.Script { declare owner: Laya.Sprite; private _trail2D: Laya.Trail2DRender; //从场景文件中获取到的宽度曲线数据 private _widthCurve: any[]; //从场景文件中获取到的颜色渐变数据 private _gradient: any; //组...

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

45. 预制体模块 · LayaAir3文档 · LAYABOX [ 35%]

...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

46. 预制体 · LayaAir3.3 · 引擎文档 · LAYABOX [ 35%]

...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

47. 2D相机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 33%]

...加到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

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

...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

49. 微信小游戏 · LayaAir3.3 · 引擎文档 · LAYABOX [ 29%]

...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

50. [LayaAirIDE3]xcode切入切出声音不播放 [ 23%]

..."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