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

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

161. swf预加载问题 [ 63%]

swf预加载问题 loader不能用于swf的预加载,于是用MovieClip的​load方式做了个。不知道会不会有问题。package util { import laya.ani.swf.MovieClip; import laya.events.Event; import laya.events.EventDispatcher; import laya.net.Loader; import laya.utils.Handler; public cl...

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

162. 如何通过代码控制prefab上面的时间轴动画animation[ 63%]

...后就跟普通scene一样使用了。 ... let prefab:Laya.Prefab = Laya.loader.getRes(".../xxx"); let soldier = prefab.create() as Laya.Box; // 为了代码提示,转成实际的类型 soldier["show"].play(); 在TS下面soldier如果不是any的话,直接使用soldier.show会编译报错。 可...

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

163. 使用Worker加载后,如何得到资源 [ 63%]

...得到data是string类型。请问如何得到加载的资源,使用Laya.loader.getRes得不到。有其他方法吗? 2019-08-14 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个回复...

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

164. 引擎示例中的新手引导自己写了一次,不知道为什么无法实现点击。 [ 63%]

...ar step = 0; Laya.init(1285, 727, Laya.WebGL); var stage = Laya.stage; var loader = Laya.loader; stage.bgColor = "#00ffff"; stage.alignH = "center"; stage.alignW = "middle"; stage.scaleMode = "showall"; loader.load("../../res/guide/crazy_snowball.png", Handler.create(this, init)); function init(e) {...

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

165. 打包APK运行,drag拖动出现问题;color="#0"程序直接崩溃 [ 63%]

...            Laya.init(1136, 640,WebGL);             Laya.loader.load([GameConfig.getAssetsFile("comp")],Handler.create(this, onComplet));                          }         private var imag:Image;         private function onComplet():void        ...

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

166. Sprite用graphics绘制图形后,mouse_over触发scale显示有问题 [ 62%]

... Laya.WebGL); let res:any = []; res.push({url:"res/atlas/comp.atlas", type:Loader.ATLAS}); Laya.loader.load(res, Handler.create(null, this.__onLoaded)); } private __onLoaded(): void { Laya.stage.addChild(new Test()); } } new Entry();   Test.ts import Sprite = Laya.Sprite; class Test extends Sprite{...

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

167. radioGroup设置labels后,每个radio的icon皮肤无法显示了 [ 62%]

...性后,icon就没有显示了,代码如下: 在入口文件: Laya.loader.load("res/atlas/template/QuestionDialog.atlas", Handler.create(null)); 对应的场景代码里: var dialog = new QuestionDialogUI();          Laya.stage.addChild(dialog);          dialog.popup();   ...

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

168. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 62%]

...正确获取宽高。 3. **直接调用size设置:** ```javascript Laya.loader.load("res/apes/monkey2.png", Handler.create(this, function() {     var texture:Texture = Laya.loader.getRes("res/apes/monkey2.png");     var sp:Spirte = new Sprite();     sp.graphics.drawTexture(tex...

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

169. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 62%]

...正确获取宽高。 1. **直接调用size设置:** ```javascript Laya.loader.load("res/apes/monkey2.png",Handler.create(this,function() { var texture=Laya.loader.getRes("res/apes/monkey2.png"); var sp=new Laya.Sprite(); sp.graphics.drawTexture(texture,0,0); sp.size(texture.width,texture.height);...

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

170. GlowFilter和TimeLine/Tween一起用的问题 [ 62%]

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

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