大约有 744 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0049 秒)
Laya_社区(536) Laya2.0_文档(76) Laya_示例(48) Laya2.0_示例(39) Laya3.0_文档(24) Laya3.0_api(19) laya_api(1) Laya2.0_api(1)
...,但发现如果用Sprite的loadImage加载过的资源通过 通过Laya.loader.getRes可以获取到 说明被缓存了,但用Image的skin就获取不到 说明Laya没有去缓存。(因为浏览器本身自带缓存机制,哪怕laya不缓存,第二次加载也很快 只是会费点性能...
来源: Laya_社区 发布时间: 20191120
获取图片资源出错,求大神解答,附代码 用Laya.loader.load获取res文件夹下的.png图片,出错,报错信息为:Uncaught TypeError: Cannot read property 'create' of undefined 附件 : --> LayaAir.zip 2017-03-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...
来源: Laya_社区 发布时间: 20170331
...sprite 跟graphics.drawTexture 有什么区别 var downScoreTexture = Laya.loader.getRes("img/game/kc/score.png"); var _downScore = new Sprite(); _downScore.pos(150,130); _downScore.graphics.drawTexture(downScoreTexture); touPane.addChild(_downScore); 这个东西,跟 直接new sprite 然后loadim...
来源: Laya_社区 发布时间: 20170811
...播这个bgm.mp3,如何预加载呢 cuixueying • 2016-11-30 15:06 Laya.loader.load("xxx.mp3",Handler.create(this,onComplete),null,Loader.SOUND) daohu • 2016-11-30 18:09 @cuixueying:好的,这样写后,SoundManager.playMusic("../../../../res/sounds/bgm.mp3", 1, new Handl...
来源: Laya_社区 发布时间: 20161130
...,走到临界点的时候读取需要加载的区块名称,通过Laya.loader.load(this.m_mapName, Laya.Handler.create(this, this.onLoadCompleteHandler), null, Laya.Loader.ATLAS);加载资源,成功后调用this.m_tileMap.createMap(OOXX);来显示。不知道这样调用是否正确? 因为...
来源: Laya_社区 发布时间: 20170525
...也就是预加载资源的地方),资源路径写错了。改成 Laya.loader.load("res/atlas/Resources.json",laya.utils.Handler.create(this,this.onReader),null,laya.net.Loader.ATLAS);就好了 Buzhihew • 2017-01-11 15:50 @Monica:.......我.....总之谢谢啊啊啊 Monica • 2017-0...
来源: Laya_社区 发布时间: 20170111
...理不被拉伸导致偏差。 增加的修改示例如下: Laya.loader.load("RenderTexture.rendertexture", null, Laya.Handler.create(this, null, null, false)).then(() => { this.spRole.texture = Laya.loader.getRes("RenderTexture.rendertexture"); //设置纹理的宽高为舞台大小,...
来源: Laya_社区 发布时间: 20250109
...olor = "#101825"; this.init() } init() { // 预加载图集 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded ), null, Laya.Loader.ATLAS) } onLoaded(){ Laya.stage.addChild(new TopUI()) Laya.stage.addChild(new TabUI()) this.getGold.on(Laya.Event.MOUS...
来源: Laya_社区 发布时间: 20171213
...a.stage.scaleMode = 'exactfit'; Laya.stage.screenMode = 'horizontal'; Laya.loader.load(['res/atlas/view.atlas'], Handler.create(this, initGame)); Laya.timer.frameOnce(1, this, function () { Laya.stage.on(Event.RESIZE, this, function () { window.location.reload(); }) }) 2018-04-16 添加评论 免费...
来源: Laya_社区 发布时间: 20180416
...白求助,关于时间轴动画如何设置播放一次后消失? Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { var tl = new Laya.Animation(); tl.loadAnimation("democesi.ani"); Laya.stage.addChild(tl); tl.play(); tl.pos(302,650); } 2018-01-1...
来源: Laya_社区 发布时间: 20180117