大约有 250 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0052 秒)
...的加载进度呢 我在IDE中创建了整个游戏界面,然后通过loader去加载界面的配置文件:Laya.loader.load(['res/atlas/game.json'],Laya.Handler.create(this,Slot.onSourcesLoaded), Laya.Handler.create(this,Slot.onSourcesLoading,null,false),Laya.Loader.ATLAS);这样写似乎监听...
来源: Laya_社区 发布时间: 20170225
...在移动浏览器就显示不了。我在项目启动之初使用了Laya.loader.load预加载字体,PC浏览器日志显示字体被加载了,移动浏览器有报错。 Laya.loader.load({ url: respath.font_SemiBold, type: Laya.Loader.TTF }, Laya.Handler.create(this, (obj: object) => {...
来源: Laya_社区 发布时间: 20250616
...内容相关的链接 提交 3 个回复 Laya_XS 赞同来自: 你用Laya.loader.load一次加载很多图片,也是在图片加载完毕才返回完成事件的,但是有一种情况也会返回完成,就是你资源加载失败也会忽略,因为我们也不会因为你在队列里存在...
来源: Laya_社区 发布时间: 20170220
...动画进行单独处理?还是不允许把动画放进预制体? Laya.loader.load("prefab/gk2v1.json",Laya.Handler.create(this,function(pref:Laya.Prefab){ var gkpref:Laya.Prefab = new Laya.Prefab(); gkpref.json = pref; var OBJ = Laya.Pool.getItemByCreateFun("gk2v1",gkpref.create,gkpref); this.S...
来源: Laya_社区 发布时间: 20201022
UI相关问题 Laya.Loader.getRes请教 Laya.loader.load("res/atlas/games/game_13/image.atlas", Handler.create(this, this.createView)); 在createView回调里面调用 let tex: Texture = Laya.Loader.getRes("image/shake_01.png"); 想拿图集中的某一张图片。发现拿不到这张图片。 但...
来源: Laya_社区 发布时间: 20180326
...试过,发布到vivo真机调试,直接运行是没有问题的 Laya.loader.load([1.png,2.png,3.png]) 返回undefined Laya.loader.load("1.png") 加载返回false Laya.Texture2D.load("1.jpg") 加载返回undefined 求帮助 附件 : --> 2020-03-25 添加评论 已悬赏20元 --> 分享 微...
来源: Laya_社区 发布时间: 20200325
...的版本版本管理(会重命名文件名称的) 例子代码: LoadError(){console.log("LoadError")} LoadOK(){console.log("LoadOK")} Laya.loader.on(Laya.Event.ERROR,this,this.LoadError) Laya.loader.load("不存在的图片URL",Laya.Handler(this,this.LoadOK)); 发布成微信小...
来源: Laya_社区 发布时间: 20180920
...H5TestScene/H5TestScene.ls"); private LoadAsset(path: string): void { Laya.loader.create(path, Laya.Handler.create(this, this.OnAssetComplete)); } private OnAssetComplete(): void { console.log("on asset complete:"); } 我想在OnAssetComplete内知道是哪个资源被回调了,请问要怎样处...
来源: Laya_社区 发布时间: 20180316
...let resArr = [ {url:"wxlocal/enemy.png",type:Laya.Loader.IMAGE}, {url:"wxlocal/bg2.jpg",type:Laya.Loader.IMAGE} ]; Laya.loader.load(resArr, Laya.Handler.create(null, onLoaded)); function onLoaded(): void { Laya.URL.basePath ="https://xxx....
来源: Laya_社区 发布时间: 20191122
...nction text_load_width_height() { Laya.init(600,400); Laya.loader.load(["../laya/assets/comp/image.png","../laya/assets/comp/vscroll.png"],Laya.Handler.create(this,onAssetLoad)); } function onAssetLoad() { older = new Laya.Sprite(); older.loadImage("../laya/a...
来源: Laya_社区 发布时间: 20170118