大约有 513 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0054 秒)
...LoadController中有个 public startLoad(){ if(LoadControl.isLaodSuccess){ console.log("加载成功了"); EventManager.Instance().BroadcastLisenter(GameEnum.load_success); }else{ console.log("开始加载进度了"); ResourceManager.Instance().loadSuccess(); // 这里改成不加载资源就能加...
来源: Laya_社区 发布时间: 20181213
....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
....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
...关的链接 提交 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
...片段如下: 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
...,例如节点被添加到舞台后 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
...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
...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
...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
...,默认的时候该选项为log等级。如下图所示。这样会包括console的log日志,以及报错日志。如果改为只是设置为error,则只显示报错日志,不会显示console日志。无论是error还是log都会在发布后,输出对应日志等级的相关输出信息,...
来源: Laya2.0_文档 发布时间: 20210714