大约有 2,660 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0079 秒)
Laya_社区(2342) Laya2.0_文档(106) Laya3.0_文档(58) Laya_示例(52) Laya3.0_api(51) Laya2.0_示例(43) laya_api(4) Laya2.0_api(4)
...加 每张图片都是256*256大小的地图块 this.isShow = true; Laya.loader.load(name,Laya.Handler.create(this,this.drawImg)); } drawImg():void { var texture:Laya.Texture = Laya.loader.getRes(this.name); this.texture = texture; } clearImage(): void{ if (this.name != "") { this.isShow = false...
来源: Laya_社区 发布时间: 20190315
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
... var image:Image; public function LayaAirDemo() { Laya.init(800,600); Laya.loader.load(["bg.jpg","logo.png"],Handler.create(this,onLoaded)); } private function onLoaded():void { image=new Image(); image.skin="logo.png"; Laya.stage.addChild(image); Laya.stage.on(Event.CLICK,this,onClick); } private f...
来源: Laya_社区 发布时间: 20170628
...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Handler.create(this, setup)); })(); function setup() { createApe(); applayFilter(); } function createApe() { ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.x = ...
来源: Laya_示例 发布时间: 20251209
...链接 提交 1 个回复 qian 赞同来自: 先预加载 然后用是Laya.loader.getRes()读取 2018-01-31 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 ITMaster 相关问题 2.0一不小心删了bin目录下的某个场景json文件...
来源: Laya_社区 发布时间: 20180131
...我们可以用加载器预加载。 2D游戏资源我们是用**Laya.loader.load()**方法预加载,而3D资源必须用Laya.loader.create()这个方法。在加载完成后,我们就可以直接使用**Laya.loader.getRes()**这个方法来获取加载完成的资源。请参考的相关的...
来源: Laya2.0_文档 发布时间: 20210715
使用Laya.loader.load加载zip资源.稍微大一点,比如300多k.ios系统就会回调空数据 demo已上传.多测试几个手机,我测试了4个,有两个下载失败...... 方法中的 "http://ktv.x5.qq.com/dynamic_n ... ot%3B,使用ios访问下载.无法下载完成(之前写的项目会...
来源: Laya_社区 发布时间: 20180319
...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Laya.Handler.create(this, this.setup)); } setup() { this.createApe(); this.applayFilter(); } createApe() { const Sprite = Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture =...
来源: Laya2.0_示例 发布时间: 20251209
...ng, Laya.stage.width + padding * 2, Laya.stage.height + padding * 2); Laya.loader.load(texturePath, Handler.create(this, onTextureLoaded)); })(); function onTextureLoaded() { maggotTexture = Laya.loader.getRes(texturePath); initMaggots(); Laya.timer.frameLoop(1, this, animate); } function initMaggot...
来源: Laya_示例 发布时间: 20251209
...hild(ape); ape.loadImage(monkey1Path); // 方法2:使用drawTexture Laya.loader.load(monkey2Path, Laya.Handler.create(this, function () { let monkey2 = Laya.loader.getRes(monkey2Path); let ape2 = new Laya.Sprite(); Laya.stage.addChild(ape2); ape2.graphics.drawTexture(monkey2, 100, 0); })); } } new...
来源: Laya2.0_示例 发布时间: 20251209