大约有 36 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0042 秒)
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
...擎的核心模块,是必须要使用的功能,LayaAir引擎提供了Loader类用于加载文本、JSON、二进制、图像等资源。 下面我们在本篇文档中彻底掌握各种资源加载的使用。 一、加载单个资源 1.1 常用资源的加载方式 通常,采用Laya.loader.lo...
来源: Laya3.0_文档 发布时间: 20251010
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
...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
...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
...载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
...rt"); //加载指定的模型预制体,并添加到Scene3D场景内 Laya.loader.load("girl/girl.lh").then(res => { let girl : Laya.Sprite3D = res.create(); this.scene3D.addChild(girl); //获得Animator this._animator = girl.getComponent<Laya.Animator>(Laya.Animator); }); this.on( Laya.Eve...
来源: Laya3.0_文档 发布时间: 20251010
...组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load([this.TestClipNum, this.TestFontClip, this._ClipNum, this._FontClip, this._ClipNum1]).then( ()=>{ this.ShowContent(); } ); } private ShowContent(): void { var clipnum: Laya.FontClip = new Laya.FontClip(this._Cl...
来源: Laya3.0_文档 发布时间: 20251010
.../设置纹理 this._trail2D.texture = Laya.Texture2D.whiteTexture; // Laya.loader.load("此处填写纹理的路径").then((res) => { // this._trail2D.texture = res; // }); //设置线段颜色 this._trail2D.color = new Laya.Color(1, 1, 1, 1); } //控制物体向右移动 onUpdate(): void { this....
来源: Laya3.0_文档 发布时间: 20251010
...ackground looper Looper (main, tid 1) {4a7bba70} I/chromium: [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0 I/BrowserProcessMain: Initializing chromium process, renderers=0 W/chromium: [WARNING:proxy_service.cc(888)] PAC support disabled because there ...
来源: Laya_社区 发布时间: 20171218