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

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

1. 3D变换 · LayaAir3.0文档 · LAYABOX [ 100%]

...ivate translate: Laya.Vector3 = new Laya.Vector3(1, 1, 1); constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { // 平移cube this.cube.transform.translate(this.translate, false); } } 效果如图1-1...

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

2. 列表组件 · LayaAir3.0文档 · LAYABOX [ 88%]

...ya.Script { @property({ type: Laya.List }) list: Laya.List constructor() { super(); } // 组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { // 给List对象赋值 var data: Array<any> = []; for (var m: number = 0; m < 20; m++) { data.push({ m_label: "No." + m })...

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

3. 对象池 · LayaAir3.0文档 · LAYABOX [ 83%]

...的方式进行管理对象池: export class EffectA { constructor() { super(); } static create(): EffectA { Pool.getItemByClass(EffectA); } recover(): void { Pool.recoverByClass(this); } } export class EffectB { constructor() { super(); } static create(): EffectB { Pool.getItemByClass(EffectB); }...

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

4. 字体切片组件 · LayaAir3.0文档 · LAYABOX [ 77%]

... { type : Laya.FontClip } ) public fontclp: Laya.FontClip; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.fontclp.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.fo...

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

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

...property({ type: Laya.Button }) public uiBtn: Laya.Button; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.uiBtn.on(Laya.Event.CLICK, this, () => { //点击后,打开Msg场景 Laya.Sce...

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

6. 像素线 · LayaAir3.0文档 · LAYABOX [ 71%]

...name 名字。 */ constructor(maxCount: number = 2, name: string = null) { super(name); this._render = this.addComponent(PixelLineRenderer); this._geometryFilter = (this._render as PixelLineRenderer)._pixelLineFilter; (this._render as PixelLineRenderer).maxLineCount = maxCount; let material = this._...

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

7. 2.x引擎项目升级指南 · LayaAir3.0文档 · LAYABOX [ 66%]

... @property( { type : String } ) public text: string = ""; constructor() { super(); } } 5、Runtime的使用差异 3.0的场景与2.0完全不是一个概念, 3.0的runtime只能在场景上的2D根节点Scene2D或预制体的根节点上设置,其它的子级节点,不再支持runtime,如果...

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

8. UI运行时 · LayaAir3.0文档 · LAYABOX [ 62%]

... { console.log("Game start"); this.ui = this.owner.scene as RuntimeScript; super.baseUI(this.ui); } } import { Main } from "./Main"; import { ButtonRuntime } from "./ButtonRuntime"; const { regClass, property } = Laya; @regClass() export class ButtonScript extends Main { private ui: ButtonRuntime; o...

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

9. 单选框组组件 · LayaAir3.0文档 · LAYABOX [ 61%]

... 200; private Y_OFFSET: number = 80; private skins: any[]; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.skins = ["resources/res/ui/radioButton (1).png", "resources/res/ui/radioButton (2).png",...

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

10. 使用3D精灵 · LayaAir3.0文档 · LAYABOX [ 59%]

...ne: Laya.Scene3D = new Laya.Scene3D; speed: number = 0.01; constructor() { super(); } /** * @private */ protected _updateRotation(): void { if (Math.abs(this.yawPitchRoll.y) < 1.50) { Laya.Quaternion.createFromYawPitchRoll(this.yawPitchRoll.x, this.yawPitchRoll.y, this.yawPitchRoll.z, this.tempRo...

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