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

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

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. 场景管理 · 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

3. 3D物理编辑 · LayaAir3.0文档 · LAYABOX [ 41%]

...建的TSDemo脚本。示例代码如下: //引入自定义脚本TSDemo import TSDemo from "./TSDemo"; /** * TypeScript语言示例 */ export default class GameUI extends GameUIBase { /* ……省略若干代码 */ private addBox(): void { //创建盒型体 let box = new Laya.Sprite3D; let boxMesh ...

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

4. 实体组件系统 · LayaAir3.0文档 · LAYABOX [ 31%]

...面这两个TS代码: //MyScript.ts const { regClass, property } = Laya; import Animal from "./Animal"; @regClass() export class MyScript extends Laya.Script { @property({ type : Animal }) animal : Animal; } //Animal.ts const { regClass, property } = Laya; @regClass() export default class Animal {...

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

5. 动画状态机详解 · LayaAir3.0文档 · LAYABOX [ 23%]

...CubeAnimation动画节点添加动画脚本,添加的代码如下: ... import Vector3 = Laya.Vector3; ... export class AnimationScript extends Laya.AnimatorStateScript { ... private model: Laya.Sprite3D; /**@internal */ setPlayScriptInfo(animator: Laya.Animator | Laya.Animator2D, layerindex: num...

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