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

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

121. 没有预加载图片怎么获取width和height ? [ 83%]

...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

122. load完成后能否获取到具体是哪个对象资源完成 [ 83%]

...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

123. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 83%]

....js 在之前的基础上增加加载图片的代码://加载图片 Laya.loader.load(["res/background.png", "res/m_background.png"], laya.utils.Handler.create(this, onLoaded), laya.utils.Handler.create(this, onLoading, null, false)); //加载进度 function onLoading(progress){ console.log("onLoad...

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

124. js预加载声音报错 [ 83%]

js预加载声音报错 Laya.loader.load(slot_sound_res, Laya.Loader.SOUND, Handler.create(this, onSoundProgress, null, false)); //游戏资源加载进度函数 function onSoundProgress(pro) { console.log("sound" + pro); } 这样写哪里错了? 2016-12-16 添加评论 免费帖 --> 分享 微...

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

125. 不带格式后缀的图片无法成功加载 [ 82%]

...lstatp-toutiao.com/obj/ad.union.api/e285dd263aee2e8f7b302fa8d139de4c' Laya.loader.load(url, Laya.Handler.create(this, () => { let picTemp = Laya.Loader.getRes(url); console.log(picTemp.width) // undefined let nodee = new Laya.Sprite() nodee.texture = picTemp nodee.width = 500 nodee.height = 250 n...

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

126. Laya.loader.create问题 [ 82%]

Laya.loader.create问题 使用Laya.loader.create方法加载了png图片 之后使用new Laya.Image(url),并添加到舞台,发现场景整个是黑的,未发现图片,而如果没使用Laya.loader.create,而直接new Laya.Image(url)的话,就会出现图片,这是为啥? 2017-05-1...

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

127. Loader可以加载网络资源吗? [ 82%]

Loader可以加载网络资源吗? QQ玩一玩有10m包体限制,想把图集放服务器上,有接口吗 2018-03-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: 可以加载网络资...

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

128. 设置遮罩(ActionScript-LayaAir基础篇(AS3)-位图) [ 82%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); } private function graphicsImg():void { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台...

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

129. 资源版本问题 [ 82%]

...create(this, beginLoad)) function beginLoad() { //加载LOADING资源 Laya.loader.load([{ url: "res/atlas/icon.atlas" }, { url: "res/atlas/human.atlas" }], Laya.Handler.create(this, progress, null, false), null, Laya.Loader.ATLAS) } function progress() { (function loading() { Laya.loader.load([{ url...

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

130. ani如何实现预加载呢? [ 82%]

...第一次没缓存的情况下 动画只会播放一半.  附代码: Laya.loader.load("res/atlas/res.json", Laya.Handler.create(this, onLoaded), Laya.Handler.create(this, onLoading), Laya.Loader.ATLAS); 我是在onLoaded里面用游戏资源的.... 2017-07-01 添加评论 免费帖 --> 分享 微...

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