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

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

551. Sprite的loadImage和Image的skin的区别 [ 57%]

...,但发现如果用Sprite的loadImage加载过的资源通过 通过Laya.loader.getRes可以获取到 说明被缓存了,但用Image的skin就获取不到 说明Laya没有去缓存。(因为浏览器本身自带缓存机制,哪怕laya不缓存,第二次加载也很快 只是会费点性能...

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

552. 获取图片资源出错,求大神解答,附代码 [ 57%]

获取图片资源出错,求大神解答,附代码 用Laya.loader.load获取res文件夹下的.png图片,出错,报错信息为:Uncaught TypeError: Cannot read property 'create' of undefined 附件 : --> LayaAir.zip 2017-03-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

553. 直接new sprite 跟graphics.drawTexture 有什么区别 [ 57%]

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

554. SoundManager第一次加载播放延迟怎么解决? [ 56%]

...播这个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

555. tiledMap显示层级问题 [ 56%]

...,走到临界点的时候读取需要加载的区块名称,通过Laya.loader.load(this.m_mapName, Laya.Handler.create(this, this.onLoadCompleteHandler), null, Laya.Loader.ATLAS);加载资源,成功后调用this.m_tileMap.createMap(OOXX);来显示。不知道这样调用是否正确? 因为...

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

556. IDE发布之后,在res下并没有任何资源,这是什么情况啊? [ 56%]

...也就是预加载资源的地方),资源路径写错了。改成 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

557. [LayaAir3]3D场景里面鼠标感应区域 3.2.1跟3.3不同 [ 56%]

...理不被拉伸导致偏差。   增加的修改示例如下:   Laya.loader.load("RenderTexture.rendertexture", null, Laya.Handler.create(this, null, null, false)).then(() => { this.spRole.texture = Laya.loader.getRes("RenderTexture.rendertexture"); //设置纹理的宽高为舞台大小,...

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

558. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 56%]

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

559. Laya IDE横竖屏切换时,不断刷新 [ 56%]

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

560. 小白求助,关于时间轴动画如何设置播放一次后消失? [ 56%]

...白求助,关于时间轴动画如何设置播放一次后消失? 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