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

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

131. UI场景加载,不稳定 [ 70%]

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

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

132. 获取sprite对象的 width和height为0 [ 70%]

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

133. layaAirIDE中如何使用wx等微信基础对象,ide版本1.7.19.1beta [ 70%]

....login({ success: function () { wx.getUserInfo({ success: function (res) { console.log('success', res) }, fail: function (res) { console.log("reject",res) } }) } }); 这段代码里的wx对象,报错如下 "wx is not defined" 2018-07-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

134. android native环境,ttfloader加载的字体,设置无效果! [ 70%]

...关的链接 提交 2 个回复 Laya_Yan 赞同来自: Tick 、131*****361 console.log("加载字体");             let ttfloader = new Laya.TTFLoader();             ttfloader.load("font/ubuntu-bold.ttf");              ttfloader.fontName = "ubuntu";             ttfloader.err...

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

135. 龙骨动画残影 [ 69%]

...片段如下:  private _onAnimationCreated(ani)     {         console.log("ani created:" + ani);         this._hero = ani;         this.addChild(this._hero);         this._hero.pos(300, 400);         this._hero.scale(0.3, 0.3);         this._hero.on(La...

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

136. [LayaAir3]clickHandler只会执行一次,之后点击不再触发 laya.3.0.9 [ 69%]

...,例如节点被添加到舞台后     onEnable(): void {         console.log("2d gamescene onEnable");                  let btn:Laya.Button = LayaUtil.GetChildByPath(this.owner, "CreatePanel/BtnCreate");                 btn.clickHandler = Laya.Handler.create(this, this.onCl...

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

137. HTMLDivElement中图文混排怎么获取实际内容大小 [ 69%]

...MLDivElement(); imageHtml.innerHTML="<img src='res/image/1.png' />"; console.log("size: " + imageHtml.width + ", " + imageHtml.height); console.log("contextSize: " + imageHtml.contextWidth + ", " + imageHtml.contextHeight); Laya.stage.addChild(imageHtml);   上述代码在Laya中运行 正确...

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

138. 仅在Android微信小游戏下图片错乱 [ 69%]

...nLoaded), null, Loader.IMAGE, 1, true, null, true) } static onLoaded(res){ console.log("public assets inited !!!!") console.log(Laya.loader.getRes("res/ui/share@atlas0.png"))//此处会报循环引用错误,也就Android小游戏会 this.sInited = true }   用的是fairygui,目前已经通过...

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

139. ZipFile类用readFile读取文件内容时,整个界面都会卡住 [ 69%]

...hstr('/' + name); if (window["appcache"].updateFile(fid, 0, buf, false)) { console.log("更新缓存文件" + fid + "成功"); } else { console.log("更新缓存文件" + fid + "失败"); } } }); zip.close();//执行这一步时界面恢复正常 2018-12-28 添加评论 免费帖 --> 分享 微博 Q...

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

140. 华为快游戏接入与发布调试指南(TypeScript-小游戏适配文档-华为快游戏) [ 69%]

...,默认的时候该选项为log等级。如下图所示。这样会包括consolelog日志,以及报错日志。如果改为只是设置为error,则只显示报错日志,不会显示console日志。无论是error还是log都会在发布后,输出对应日志等级的相关输出信息,...

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