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

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

1. 字体切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...虎兔龙蛇马羊猴鸡狗猪年快乐"; testFontClip.spaceY = 10; this.owner.addChild(clipnum); this.owner.addChild(fontClip); this.owner.addChild(testFontClip); this.owner.addChild(testClipNum); this.owner.addChild(clipnum1); } } 通常FontClip已经可以满足开发者的基本需求。如果...

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

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

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

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

3. UI运行时 · LayaAir3.3 · 引擎文档 · LAYABOX [ 96%]

... RuntimeScript; onStart() { // 获得场景的Runtime对象 this.ui = this.owner.scene as RuntimeScript; // Button添加鼠标事件,让Image不显示 this.ui.Button.on( Laya.Event.MOUSE_DOWN, null, ()=>{ this.ui.Image.visible = false; }); } } ui 属性直接从脚本中通过 this.owner.scene ...

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

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

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

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

5. 事件管理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 93%]

...如下代码: onAwake(): void { //侦听自定义的事件"Click" this.owner.on("Click",this,()=>{ console.log("侦听到自定义的“Click”事件"); }) } //鼠标点击后执行,发送Click事件。 onMouseClick(evt: Laya.Event): void { //自定义的事件 this.owner.event("Click"); } ...

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

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

... } = 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; // 文本显示当前时间 onAwake()...

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

7. 位图切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 88%]

...dth - bg.width >> 1, Laya.stage.height - bg.height >> 1); this.owner.addChild(bg); } private createTimerAnimation(): void { this.counter = new Laya.Clip(this.clipSkin, 10, 1); this.counter.autoPlay = true; this.counter.interval = 1000; this.counter.x = (Laya.stage.width - this.counter.wi...

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

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

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

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

9. 视频 · LayaAir3.3 · 引擎文档 · LAYABOX [ 84%]

...频纹理 */ @regClass() export class Script extends Laya.Script { declare owner: Laya.Sprite3D; @property(Laya.Scene3D) private scene: Laya.Scene3D; private videoPlane: Laya.Sprite3D; private videoTexture = new Laya.VideoTexture(); onAwake(): void { //获取场景中要添加视频纹理的3D节点...

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

10. 显示文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 79%]

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

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