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

大约有 580 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0055 秒)

121. 显示与切换图片(ActionScript-LayaAir基础篇(AS3)-位图) [ 81%]

...可以找到drawTexture()方法,除此之外,还需要了解laya.net.LoaderManager中的load()方法和getRes()方法,以及laya.utils.Handler中的create()方法,各方法的参数图3、图4、图5、图6所示: ![图3](img/3.png) (图3) ![图4](img/4.png) (图4) ![图2](img/5.png) (图5...

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

122. 内存释放问题 [ 81%]

...ion): void { let uiResArray = [ { url: "res/atlas/common.json", type: Laya.Loader.ATLAS }, { url: "res/atlas/comp.json", type: Laya.Loader.ATLAS }, // 登录的UI和选角的UI { url: "res/atlas/user.json", type: Laya.Loader.ATLAS }, { url: resourcesCenter.ResourcesPathStr.PROTO_FILE_PATH, type: Lay...

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

123. 小游戏内 个别手机出现图片花了 像马赛克一样的东西,很多图片不显示 [ 81%]

...dData = [ { "url": 'res/atlas/main.atlas', "type":Laya.loader.ATLAS }, { "url": 'res/atlas/newUser.atlas', "type":Laya.loader.ATLAS }, { 'url': "res/atlas/role_skin.atlas", "type":Laya.loader.ATLAS }, { 'url': "res/atlas/number.atlas&q...

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

124. 显存优化:纹理压缩的使用(TypeScript-2D进阶篇(TS)-性能优化) [ 81%]

...载纹理资源,如果要使用纹理压缩格式,则需要使用`Laya.loader.load()`来加载纹理资源。 示例代码如下所示: ```typescript //检测安卓平台 if (Laya.Browser.onAndroid) { //注意这里的加载 Laya.loader.load("res/layabox.ktx", Laya.Handler.create(null, functio...

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

125. 创建图集的问题 [ 81%]

...中: //加载图集 asset.push( { url: NVHAIDAOMAO_JSON_URL, type: Laya.Loader.ATLAS }, { url: WAR_JSON_URL, type: Laya.Loader.ATLAS } ); Laya.loader.load(asset, laya.utils.Handler.create(this, onLoaded), laya.utils.Handler.create(this, onLoading, null, false)); // 使用图集 var arr = []; for(v...

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

126. Sprite-屏幕截图 [ 81%]

...e.scaleMode = Stage.SCALE_FIXED_AUTO; Laya.stage.bgColor = "#232628"; Laya.loader.load(this.btnArr.concat("res/apes/monkey3.png"),Laya.Handler.create(this,this.onLoaded)); } createButton(skin, name, cb, index) { var btn = new Laya.Button(skin,name); Laya.stage.addChild(btn); btn.on(Laya.Event.CLICK,...

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

127. 发布h5项目,在浏览器上初始加载资源过多导致卡顿怎么优化 [ 81%]

...3-30 10:47 你预加载资源怎么写的 yaorao • 2018-03-30 11:29 Laya.loader.load([ { url: "res/common@atlas0.png", type: Loader.IMAGE }, { url: "res/common.fui", type: Loader.BUFFER }, { url: "res/game@atlas0.png", type: Loader.IMAGE }, { url: "res/game.fui&q...

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

128. Mac下LayaAirIDE1.7.20版本声音预加载失败,但windows下同个版本加载正常 [ 81%]

...Arr:Array=[             {url:"res/sound/music_gameplay.mp3", type:Loader.SOUND},             {url:"res/sound/button.mp3", type:Loader.SOUND},             {url:"res/sound/mob_true.mp3", type:Loader.SOUND},             {url:"res/sound/mob_hit.mp3", type:Loader.SOUND...

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

129. js预加载声音报错 [ 81%]

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

130. JSON文件加载成功后,怎么解析成Object对象 [ 80%]

...-----------------------package { import laya.display.Text; import laya.net.Loader; import laya.utils.Handler; /** * ... * @author OttoChen */ public class TestMain { private var txt:Text = null; public function TestMain() { Laya.init(800, 800); txt = new Text(); txt.mouseEnabled = false; txt.overflo...

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