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

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

221. 当使用代码创建打开场景时,onOpened触发了,但场景active和activeInHierarchy还是处于false,请问纯代码怎么实现场景创建激活,谢谢 [ 73%]

...谢谢?   const scene = new Laya.Scene(); scene.onOpened = () => { console.log('scene onOpened'); }; scene.open(); console.log('scene', scene.active, scene.activeInHierarchy); Laya.timer.frameOnce(10, this, () => {   console.log('scene 2', scene.active, scene.activeInHierarchy); });   日...

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

222. 淘宝创意互动发布指南(TypeScript-小游戏适配文档-淘宝创意互动) [ 73%]

...s,a.js 和 b.js ```javascript //a.js 中的内容: var a = function(){ console.log("a") } //b.js 中的内容: var b = function(){ console.log("b") } ``` 然后我们引用 js,调用2个方法,在 H5 上是可以正常输出内容的。 ```javascript require("a.js") require("b.js") a(); //...

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

223. 获取的ui页面里下on事件无法触发 [ 73%]

...meStartView.super(this); this.Start.on(Laya.Event.CLICK, this, this.open); console.log(this.Start); GameStartView.prototype.open = function(){ console.log("Open is ok"); } }; Laya.class(GameStartView,"GameStartView", GameStartUI); 输出:Button {toggle: false, _bitmap: AutoBitmap, _text: Text, _st...

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

224. protobuf的bytes字段的问题 [ 73%]

...ode(loginReq).finish(); var de_loginProto= LoginReqCls.decode(loginProto); console.log('c : ' + de_loginProto['channel']); console.log('a : ' + de_loginProto['msg']); 输出结果是: c : 2 a : undefined 为什么 呢? msg为空?   2017-11-05 添加评论 免费帖 --> 分享 微博 QZONE 微...

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

225. LayaAir 如何读取资源中的txt文件中的内容 [ 73%]

...何读取资源中的txt文件中的内容 var testPath ="res/Test.txt"; console.log( Laya.loader.load(testPath)); console.log(Laya.Loader.getRes(testPath)); 这里打印的是 LoaderManager {retryNum: 1, retryDelay: 0, maxLoader: 5, _loaders: Array(4), _loaderCount: 1…} undefined 并不是文本...

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

226. EventDispatcher接收不到参数 [ 72%]

...r(); //发送事件 Dispatcher.Emit = function(InName,agv){ //派发事件 console.log("agv-->"+agv); Dispatcher.eventDispatcher.event(InName,agv); } //侦听事件 Dispatcher.AddNotice = function(InName,caller,listener,arg){ //监听事件 Dispatcher.eventDispatcher.on(InName,caller,listener,(ar...

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

227. 循环监听按钮,如何进行传参和接受参数 [ 72%]

...ypeBox.getChildByName('btn' + i) as Laya.Image;               console.log(e); e.on(Laya.Event.CLICK, this, this.onBtnClick); }   按钮事件 private onBtnClick(event:Laya.Event): void {         let b = event.currentTarget as Laya.Image; console.log('onClickLevel > ' + b.ski...

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

228. 微信加载文件失败没有回调 [ 72%]

...本管理(会重命名文件名称的)   例子代码: LoadError(){console.log("LoadError")} LoadOK(){console.log("LoadOK")}   Laya.loader.on(Laya.Event.ERROR,this,this.LoadError) Laya.loader.load("不存在的图片URL",Laya.Handler(this,this.LoadOK));     发布成微信小游戏版本...

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

229. 发布小米快游戏没有二维码也没有rpk文件 [ 72%]

...在 但是 并没有 publishProWin3属性   是在 IDE的谷歌tools的 console里面加入的 上午我就试了 2019-06-04 0 1 分享 微博 QZONE 微信 k642015631 赞同来自: 已上传日志 Laya日志.zip 2019-06-04 0 3 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该...

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

230. 在add panel 后设置 hScrollBar.value 没有用 [ 72%]

...Nevermore 赞同来自: Laya.stage.addChild(this);             console.log("addd 33");                         this.alpha = 0;             Laya.Tween.to(this,{alpha:1},200);             self.panel_room.hScrollBar.value = 432; console.log("s...

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