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

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

1. UI运行时 · LayaAir3.0文档 · LAYABOX [ 100%]

...脚本,而后添加的代码如下所示: const { regClass } = Laya; import { RuntimeScriptBase } from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { // Button添加鼠标事件,让Image不显示 this.Button.on( Laya.Event.MOUS...

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

2. 使用3DUI · LayaAir3.0文档 · LAYABOX [ 82%]

...添加Runtime类,添加逻辑代码如下: const { regClass } = Laya; import { BloodBarBase } from "./BloodBar.generated"; import { Main } from "./Main"; @regClass() export class BloodBar extends BloodBarBase { onAwake(): void { this.bar.value = 1; this.value.visible = false; Laya.stage.on( Laya...

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

3. 插件开发说明 · LayaAir3.0文档 · LAYABOX [ 72%]

...p,glob,pinyin, @svgdotjs/svg.js等。引用node内置模块可以使用import xx from "xx"的方式,所有IDE内置cjs模块都可以通过IEditor.require或者IEditorEnv.require去引用。 //可以通过import导入node内置模块 import fs from "fs"; import path from "path"; //也可以通...

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

4. 弹窗视图组件 · LayaAir3.0文档 · LAYABOX [ 67%]

...,在RuntimeScript.ts中添加如下代码: const { regClass } = Laya; import { RuntimeScriptBase } from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { this.closeBtn.on(Laya.Event.CLICK, this, () => { this.close(); }); } } 1.3....

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

5. 场景管理 · LayaAir3.0文档 · LAYABOX [ 49%]

...本 "点击成功!",代码如下所示: const { regClass } = Laya; import { MsgRTBase } from "./MsgRT.generated"; @regClass() export class MsgRT extends MsgRTBase { onOpened(param: any): void { console.log(param.text); } } 这样,点击Scene场景中的Button,就会打印日志“点击成...

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

6. 预制体模块 · LayaAir3.0文档 · LAYABOX [ 47%]

...码中,可以看到,通过预加载一组预制体的实现代码: import { LoadingRTBase } from "./LoadingRT.generated"; const { regClass, property } = Laya; @regClass() export default class LoadingRT extends LoadingRTBase { onAwake(): void { Laya.loader.load( //先加载本场景要用的 ["...

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