大约有 238 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0046 秒)
loading界面实现图片预加载后,创建Sprite执行loadImage出错 1、没有使用IDE; 2、仿照sample里面的 Loader_ProgressAndErrorHandle.js 构建了一个 Loading界面。 3、所有图片均成功载入 4、切换界面时,进入游戏界面,构造Sprite出错。 切...
来源: Laya_社区 发布时间: 20171015
loadImage 加载图片,怎么清理当前正在加载的图片 用 loadImage 加载很多图片,然后在某个时机需要清理这些加载的图片,用了 Laya.loader.cancelLoadByUrl(_urlVo.url); Laya.loader.clearTextureRes(_urlVo.url); Laya.loader.clearRes(_urlVo.url) 但是在...
来源: Laya_社区 发布时间: 20200420
Image.loadImage 方法加载问题 调用 setPublicSpacesData 这个方 传入参数 里面有每一个图片的名字 三个不同的图片 只能加载两个 但是三个同样的图片没问题 this.publicSpaceList = new Laya.List(); this.publicSpaceList.itemRender = gamepublicspaceitem.Pu...
来源: Laya_社区 发布时间: 20170923
如何使用graphics.loadImage加载图片资源的时候,如何判断加载失败? 伪代码: this.avatar.graphics.loadImage(url, 0, 0, 0, 0, __complete);这个时候,如果我的url为空或者为一个不存在的图片地址,我如何判断它加载失败呢? 我尝试使用了这...
来源: Laya_社区 发布时间: 20170928
...rl(url, type, thisLoader) { if (MiniAdpter.isZiYu) { thisLoader._loadImage(url, false); return; } if (MiniFileMgr.isLocalNativeFile(url)) { thisLoader._loadImage(url, false); return; } if (!MiniFileMgr.isLocalNativeFile(url) && !MiniFileMgr.getFil...
来源: Laya_社区 发布时间: 20191129
...写错了 _transformImgUrl方法里最底的一行代码, thisLoader._loadImage(url, false); 应该为: thisLoader._loadImage(url, true); 该错误会导致微信小游戏上,设置了URL.basePath的时候,部分图片会加载不到 ————————————————...
来源: Laya_社区 发布时间: 20191120
...reateAnimation = function(images) { animation = new Animation(); animation.loadImages(images); animation.interval = 70; animation.play(0); this.addChild(animation); } Character.prototype.createBloodBar = function() { bloodBar = new Sprite(); bloodBar.loadImage("../../res/cartoon2/blood_1_r.png"); bl...
来源: Laya_示例 发布时间: 20261113
...Laya.stage.addChild(box); bg1 = new laya.display.Sprite(); bg1.loadImage("res/bg1.png"); box.addChild(bg1); bg2 = new laya.display.Sprite(); bg2.loadImage("res/bg1.png"); bg2.pos(650, 0); box.addChild(bg2); Laya.timer.frameLoop(1, this, bg_loop()); } f...
来源: Laya_社区 发布时间: 20160721
...Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Stat.enable(); Laya.stage.loadImage("res/cartoon2/background.jpg", 0, 0, 1280, 900); this.createCharacters(); text = new Text(); text.zOrder = 10000; text.fontSize = 60; text.color = "#ff0000" Laya.stage.addChild(text); Laya.timer.frameLoop(1, this, t...
来源: Laya2.0_示例 发布时间: 20261113
2.0版API“loadImage”改了吗? sp.loadImage(_img, 0, 0, 0, 0, Handler.create(this, function(){ trace("complete!!"); 为何没有complete出现?? 另外,有没有1.0和2.0 API更新对照表? 2018-10-09 添加评论 免费帖 --> 分享 微博 QZONE 微...
来源: Laya_社区 发布时间: 20181009