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

大约有 1,013 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0053 秒)

311. 使用外部引擎播放layaair制作的.ani [ 68%]

...; //播放Animation动画 tl.play(); tl.on(Event.COMPLETE, this, () => {console.log('end')}); } 2018-08-23 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 zyx 相关问题 看了其他引擎才发现 LAYA 真的太太太太好用了!...

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

312. 微信小游戏分包实战(ActionScript-小游戏适配文档-微信小游戏) [ 68%]

...。示例代码如下: ```javascript loadTask.onProgressUpdate(res => { console.log('下载进度', res.progress) console.log('已经下载的数据长度', res.totalBytesWritten) console.log('预期需要下载的数据总长度', res.totalBytesExpectedToWrite) }) ``` 本篇文档主要是讲分...

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

313. Laya下的图片上传示例(完整版) [ 68%]

...y):void { if(file.files.length>0) { if(20*1024<file.files[0].size) { console.log("图片大小不能超过20kb!") }else{ fileReader.readAsDataURL(file.files[0]); //转换图片格式为字符编码 } } }; fileReader.onload = function(e):void { if(Laya.Browser.window.FileReader.DONE == fileRead...

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

314. UI场景加载,不稳定 [ 68%]

...LoadController中有个 public startLoad(){ if(LoadControl.isLaodSuccess){ console.log("加载成功了"); EventManager.Instance().BroadcastLisenter(GameEnum.load_success); }else{ console.log("开始加载进度了"); ResourceManager.Instance().loadSuccess(); // 这里改成不加载资源就能加...

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

315. 深入理解LayaAir引擎架构和实现原理(一)跨平台引擎源码编译 [ 68%]

...eld this.compile())) { //确认编译结果 this.checkAllDir(""); } else { console.log("compile fail!"); } }); } 复制代码[/code] 其中__awaiter是一个编译工具函数,相当于async/await ,因为引擎项目是ES6的,所以使用这种方式实现异步执行的功能,想进一步...

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

316. TS项目,index.html 里面的js代码如何调用项目里面的函数,window.addEventListener 在ts项目里面该怎么写 [ 68%]

....addEventListener('message', function(e) {                 console.log(e.data);        //分享成功之后这个参数是true         }, false);     </script>   window.addEventListener 在ts项目里面该怎么写  是直接这样写,还是这样写:...

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

317. tiledMap问题,getTileProperties获取地图属性不能获取到 [ 68%]

...ScreenPos(20,20); var pass = this.map.getTileProperties(0,idx - 1,'pass'); console.log('打印=======================================') console.log(idx, pass, this.map['_tileProperties'],this.map['_tileProperties2']); // 30 null {0:undefined} {} } }求官方给个回复 附件 : --> 2DTiled.zip 2019...

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

318. 在写屏蔽词库的程序时,字符串中没有屏蔽字库中的词,会出现返回0的情况 [ 68%]

...leName) != -1) { var index:number=this.shieldArray.indexOf(this.roleName); console.log("找到了,位置在"+index); return true; } console.log("没找到"); return false } cuixueying • 2017-08-28 11:56 https://ask.layabox.com/question/6734 Liu_1986 • 2017-08-28 11:38 已经...

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

319. 精灵 · LayaAir3.0文档 · LAYABOX [ 68%]

...ent.MOUSE_DOWN, this, this.test2);//设置监听,sprite1或sprite2均可 console.log(this.sprite1.mouseEnabled);//打印父节点sprite1的MouseEnabled的值:true console.log(this.sprite2.mouseEnabled);//打印子节点sprite2的MouseEnabled的值:true } test2(e: Laya.Event) { console.log('mou...

来源: Laya3.0_文档 发布时间: 20240528

320. 获取sprite对象的 width和height为0 [ 68%]

....Rectangle = bg.getBounds(); var btBound: Laya.Rectangle = bg.getBounds(); console.log(bgBound.width/2) console.log(bgBound.height - 150) bt.pos(bgBound.width/2 - btBound.width/2,bgBound.height - 150) } } //启动游戏 new Game();打印结果: 0 -150 bgBound.width 和 bgBound.heigt 都为0  2016...

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