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

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

1. 资源加载 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...擎的核心模块,是必须要使用的功能,LayaAir引擎提供了Loader类用于加载文本、JSON、二进制、图像等资源。 下面我们在本篇文档中彻底掌握各种资源加载的使用。 一、加载单个资源 1.1 常用资源的加载方式 通常,采用Laya.loader.lo...

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

2. 取色器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 82%]

...组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load(this.skin).then( ()=>{ this.onColorPickerSkinLoaded(); } ); } private onColorPickerSkinLoaded(e: any = null): void { let colorPicker: Laya.ColorPicker = new Laya.ColorPicker(); colorPicker.selectedColor = "#ff0...

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

3. 弹窗视图组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

...nMouseClick(): void { //使用Prefab,需要转换根节点为Dialog Laya.loader.load("resources/Prefab2D.lh").then(res => { let dlg: Laya.Dialog = res.create(); dlg.show(); }); } } 运行效果如下: (动图) 二、通过代码创建Dialog 在进行书写代码的时候,免不了通过...

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

4. Spine骨骼动画 · LayaAir3文档 · LAYABOX [ 78%]

...此方法只执行一次 onAwake(): void { //加载Spine动画资源 Laya.loader.load("resources/boy/spineboy-pma.skel").then(() => { //添加spine组件 this.spine = this.sprite.addComponent(Laya.Spine2DRenderNode); this.spine.source = "resources/boy/spineboy-pma.skel"; this.spine.animationName ...

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

5. 内置骨骼动画 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...Start() { console.log("Game start"); //加载内置骨骼动画资源 Laya.loader.load("skeleton/Dragon/Dragon.sk").then((templet: Laya.Templet) => { //创建模式为1,可以启用换装 this.mArmature = templet.buildArmature(0); this.mArmature.x = 300; this.mArmature.y = 350; this.mArmature.s...

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

6. 进度条组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 73%]

...加载进度条资源,图片资源来自“引擎API使用示例” Laya.loader.load(["resources/res/ui/progressBar.png", "resources/res/ui/progressBar$bar.png"]).then(() => { // 创建进度条 this.progressBar = new Laya.ProgressBar("resources/res/ui/progressBar.png"); this.progressBar.pos(10...

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

7. 垂直布局容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 73%]

...组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load(this.skins).then(() => { this.createBtn(); this.createvbox(); // 添加VBox组件 this.owner.addChild(this.vbox); }); } // 创建Button组件 private createBtn(): void { this.btn1 = new Laya.Button(this.skins);...

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

8. 水平布局容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 72%]

...组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load(this.skins).then(() => { this.createBtn(); this.createHbox(); // 添加HBox组件 this.owner.addChild(this.hbox); }); } // 创建Button组件 private createBtn(): void { this.btn1 = new Laya.Button(this.skins);...

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

9. 通用发布设置 · LayaAir3.3 · 引擎文档 · LAYABOX [ 72%]

...方法只执行一次 */ onAwake(): void { //Web平台使用远程包 Laya.loader.loadPackage("sub1","http://192.168.56.1:2840/",this.printProgress).then(()=>{ Laya.loader.load("sub1/cube.lh").then((res:Laya.PrefabImpl) =>{ let sp3:Laya.Sprite3D =res.create() as Laya.Sprite3D; this.scene3d.add...

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

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

...件均已创建完毕,此方法只执行一次 */ onAwake(): void { Laya.loader.load(this.skin).then( ()=>{ this.onLoadComplete(); } ); } private onLoadComplete(e: any = null): void { let ta: Laya.TextArea = new Laya.TextArea(""); ta.skin = this.skin; ta.font = "Arial"; ta.fontSize = 18; ta.bol...

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