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

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

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

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

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

2. 2.x引擎项目升级说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 99%]

2.0引擎开发者使用3.0的差异汇总1、LayaAir3.0 Loader修改1.1加载一个资源1.2 加载多个资源(用数组)1.3 加载多个文件(组合)1.5 加载HTMLImage1.6 使用Options。1.7 预制体/场景的问题1.8 旧版本引擎load和create的兼容性问题1.9扩展Loader能...

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

3. playSound和playMusic结束时候有异常抛出 [ 88%]

playSound和playMusic结束时候有异常抛出 1. loader加载了{url:"res/music/Music_start.mp3",type:Laya.Loader.SOUND}资源 2. 加载结束后,调用Laya.SoundManager.playSound("res/music/Music_start.mp3") 3. 声音播放完成后,系统抛出异常__proto._tryClearBuffer=function(sourceN...

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

4. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 87%]

...olor = "#101825"; this.init() } init() { // 预加载图集 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded ), null, Laya.Loader.ATLAS) } onLoaded(){ Laya.stage.addChild(new TopUI()) Laya.stage.addChild(new TabUI()) this.getGold.on(Laya.Event.MOUS...

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

5. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 79%]

...e(); // 守护神 this.angel = new Sprite(); // 加载主体的背景 Laya.loader.load("res/island.png", Handler.create(this, function() { // 图片加载 var t = Laya.loader.getRes("res/island.png"); var tBall = Texture.create(t,866,190,548,305); var tTower = Texture.create(t,data.tower[towerLel].x...

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

6. Spine渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...载Spine动画数据资源(json文件),注意一定要设置为Laya.Loader.SPINE类型,否则不会把json认为是SPINE资源 Laya.loader.load("girl2/mix-and-match-pro.json", Laya.Loader.SPINE).then(() => { // 添加Spine渲染器组件到精灵节点上 this.spine = this.owner.addCompon...

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

7. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 59%]

...码,可以初始化A*的地图数据 //读取地形图 this.aStarMap = Loader.getTexture2D("res/threeDimen/scene/TerrainScene/Assets/AStarMap.png"); //获得地图数据 var aStarArr = this.createGridFromAStarMap(this.aStarMap); //使用astar初始化地图数据 this.graph = new (window as any).G...

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

8. laya.ui.CheckBox_API3.0 [ 56%]

...。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load("resource/ui/check.png", Handler.create(this,onLoadComplete));//加载资源。 } private function onLoadComplete():void { trace("资源加载完成!"); var checkBox:CheckBox = new CheckBox("resource/ui/check.png"...

来源: Laya3.0_api 发布时间: 20231115

9. laya.ui.Button_API3.0 [ 56%]

...。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load("resource/ui/button.png", Handler.create(this,onLoadComplete));//加载资源。 } private function onLoadComplete():void { trace("资源加载完成!"); var button:Button = new Button("resource/ui/button.png","la...

来源: Laya3.0_api 发布时间: 20231115

10. 压缩纹理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 56%]

...@regClass() export class Main extends Laya.Script { onAwake(): void { Laya.loader.load(["resource/AtlasConfig.atlas"], Laya.Handler.create(this, () => { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500, 100); img.skin = "resources/img_bg.png"; //图集中的图片 })); } onStart() ...

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