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

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

1. 角色控制器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

... = Laya; @regClass() export default class DirectMove extends Laya.Script { declare owner: Laya.Sprite3D; private characterController: Laya.CharacterController; onAwake(): void { // 获取 角色控制器 组件并赋值给 characterController this.characterController = this.owner.getComponent(Laya.C...

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

2. 音频节点 · LayaAir3.3 · 引擎文档 · LAYABOX [ 99%]

...perty } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.SoundNode }) public sound: Laya.SoundNode; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行...

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

3. 脚本组件继承于 Laya.Script。 其中的_update方法,多长时间会调用一次? 可以设置调用时间吗? [ 92%]

...间会调用一次? 可以设置调用时间吗? --------------------- declare module laya.d3.component { /** * <code>Component3D</code> 类用于创建组件的父类。 */ class Component3D extends laya.events.EventDispatcher implements laya.d3.core.render.IUpdate { protected stati...

来源: Laya_社区 发布时间: 20171109

4. 动画节点 · LayaAir3.3 · 引擎文档 · LAYABOX [ 85%]

...perty } = Laya; @regClass() export class Animation extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { super(); } //组件被激活后执行,此时所有节点和组件均已创建完毕,此...

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

5. 2D光遮挡器与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 84%]

...3; indices[index++] = 1; indices[index++] = 2; indices[index++] = 3; const declaration = Laya.VertexMesh2D.getVertexDeclaration(["POSITION,UV"], false)[0]; const mesh2D = Laya.Mesh2D.createMesh2DByPrimitive([vertices], [declaration], indices, Laya.IndexFormat.UInt16, [{ length: indices.length, start...

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

6. 2D线渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 83%]

...也是在宽高范围内。 */ export class DrawLine extends Laya.Script { declare owner: Laya.Sprite; line2DRender: Laya.Line2DRender; lastMousePos: number[] = []; isDrawing: boolean = false; // 标记是否正在绘制 // 组件被激活后执行,此时所有节点和组件均已创建完毕,...

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

7. 2D方向光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

...regClass } = Laya; @regClass() export class DayNight extends Laya.Script { declare owner: Laya.Sprite; private lightComp: Laya.DirectionLight2D; private dayTime: number = 0; private dayDuration: number = 24; // 一个完整周期的秒数 private displayText: Laya.Text; // 文本显示当前时间 o...

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

8. 开放数据域组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 80%]

...perty } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { let opendata = new Laya.OpenDataContextV...

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

9. 多行输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

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

10. 基础文本 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...perty } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Text }) txt: Laya.Text; constructor() { super(); } onAwake(): void { this.txt.text = "第{n=1}页"; //显示文本的初始化内容 } onStart(): void { let page: number =...

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