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

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

311. ReferenceError: Loader is not defined 搞不懂引擎原生的也会报这个错? [ 67%]

ReferenceError: Loader is not defined 搞不懂引擎原生的也会报这个错? onEnable() { //戏控制脚本引用,避免每次获取组件带来不必要的性能开销 thi   s._loveControl = this.getComponent(LoveControl);  //点击提示文字,开始游戏 this.label_start.on(Laya.Ev...

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

312. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 67%]

...a.Browser.window.URL.createObjectURL(blob);//创建一个url对象; //用loader来加载url Laya.loader.load(url,Laya.Handler.create(this,this.showImg,[url]),null,Laya.Loader.IMAGE); } private showImg(url:string):void{ var t:Laya.Texture = Laya.loader.getRes(url); var ape:Laya.Sprite = new Laya.Sp...

来源: Laya2.0_文档 发布时间: 20210714

313. 加载unity导出的.lh文件报错! [ 67%]

....load("res/room.lh");//方法二:预加载,创建为Sprite3D类型Laya.loader.create("res/room.lh",Laya.Handler.create(this,this.onCreateComplete));//预加载完成后回调private onCreateComplete():void{//实例化加载并创建好的3D对象var sprite3D:Laya.Sprite3D = Laya.loader.getRes("r...

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

314. 报无法找到资源,未升级ide之前不报错 [ 67%]

...览: 3508 关注: 3 人 逸辰 • 2023-07-19 22:52 onAwake(): void { Laya.loader.load( //先加载本场景要用的 ["resources/UI/image.png", "resources/UI/progress.png", "resources/UI/progress$bar.png","resources/UI/images/dsgame/banner2.jpg"] ).then(() =&...

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

315. 分享:LayaAir下如何获取图集下的小图资源? [ 67%]

...import laya.display.Animation; import laya.display.Sprite; import laya.net.Loader; import laya.resource.Texture; import laya.utils.Handler; public class Main { public function Main() { //初始化引擎 Laya.init(600, 800); //加载引擎需要的资源 Laya.loader.load([{url:"res/atlas/atlas_res.js...

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

316. 二进制图片(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 67%]

...= Browser.window.URL.createObjectURL(blob);//创建一个url对象; //用loader来加载url Laya.loader.load(url, Handler.create(this,showImg,[url]),null,Loader.IMAGE); } private function showImg(url:String):void { var t:Texture = Laya.loader.getRes(url); var ape:Sprite = new Sprite(); ape.graphic...

来源: Laya2.0_文档 发布时间: 20210714

317. UI-FontClip [ 67%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(assets, Laya.Handler.create(this, this.ShowContent)); } ShowContent() { const FontClip = Laya.FontClip; var clipnum= new FontClip(assets[0]); var fontClip = new FontClip(assets[1]); var TestFontClip = new FontClip...

来源: Laya2.0_示例 发布时间: 20240930

318. 微信资源加载问题 [ 67%]

... 我加载几十张图片,图片在外网服务器上面,然后我用loader加载 Laya.loader.load(resArr, Laya.Handler.create(null, function () { var a = new Laya.Image('comp/bg.png') Laya.stage.addChild(a) }), Laya.Handler.create(null, function (value) { console.log('加载进度:' + value) ...

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

319. 游戏系怎么把一些共用的功能独立出来 [ 67%]

...JS 如:  var atlas:Object[] = [{ url: "res/atlas/choujiang.js", type: Loader.TEXT },                             { url: "res/atlas/choujiang.json", type: Loader.ATLAS },         ];         Laya.loader.load(atlas, Handler.create(this, this.onLoaded), Handler.create(this, this...

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

320. ConchJNI.RunJS java调用js方法 [ 66%]

...? 调用 Laya.MiniAdpter.downLoadFile缓存文件之后。再调用Laya.loader.create,不会自动去读取缓存文件 引擎中有使得Label中文字逐字显示的方法吗? 使用Laya.loader.load缓存下来的文件还在res目录下吗?在编辑模式下怎么调用缓存下来的文件...

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