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

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

41. 离线打包js打印问题 [ 88%]

...我用android studio 离线打包,为什么在logcat里打印不出js的console.log()内容?是不是需要哪里配置或导入插件? 2018-09-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 hj 赞同来...

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

42. list只能显示一个图片 [ 88%]

...) { var item = {pic:{skin:'cards/'+i+'tong.jpg'}}; this.data.push(item); } console.log(this.data); this.list1.dataSource = this.data; this.list1.x = 50; this.list1.y = 500; this.list1.getChildAt(0).height = 100; this.list1.vScrollBarSkin = ""; this.list1.hScrollBarSkin = "comp/hscroll.png"; this.lis...

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

43. 事件管理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 88%]

...LICK 的(以下代码来自“2D入门示例”): onEnable(): void { console.log("IndexRT onEnable") //侦听ui按钮点击事件 this.uiBtn.on(Laya.Event.CLICK, this, () => { //点击后,打开UI场景示例 console.log("uiBtn"); Laya.Scene.open("scenes/UiMain.ls"); }); //侦听物理按...

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

44. 加载-错误处理和进度 [ 88%]

...nt.ERROR, this, this.onError); } onAssetLoaded(texture) { // 使用texture console.log("加载结束"); } // 加载进度侦听器 onLoading(progress) { console.log("加载进度: " + progress); } onError(err) { console.log("加载失败: " + err); } } new Loader_ProgressAndErrorHandle();module laya...

来源: Laya2.0_示例 发布时间: 20251130

45. 最新版本IDE,如何获取http返回的json数据 [ 87%]

... //注册按钮响应函数 Login.prototype.onButtonLogin = function (){ console.log ('按了登录按钮')  var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.once(Event.PROG...

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

46. 关于多点触控e.touches问题 [ 87%]

...rlMoveRockerTouchDown);     function onCtrlMoveRockerTouchDown(e) {    console.log("onCtrlMoveRockerTouchDown()");    this.ctrlMoveRockerPosX = undefined;    this.ctrlMoveRockerPosY = undefined;    var tX, tY;    var ts = e.touches;    console.log(e.stageX + ":" + e.stageY);    if(ts...

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

47. Laya.Pool.getItemByClass 闪退 [ 87%]

...s 闪退 var fish:CFFish = Laya.Pool.getItemByClass(type,CFFish) as CFFish console.log(fish) fish.visible = true fish.init(type) 调用init方法时候闪退,错误信息是 "fish.init is not a function" "TypeError: fish.init is not a function at Function.CFSprite.reusableFishWithType (file:///Use...

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

48. WebSocket通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 87%]

...功回调,发送字符串数据 */ private onSocketOpen(e: any): void { console.log("WebSocket 已连接"); // 发送字符串示例 this.socket.send("Hello, LayaAir WebSocket!"); } /** 接收数据回调 */ private onMessageReceived(msg: any): void { console.log("接收到消息:"); if (typeof ...

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

49. 获取位置信息 · LayaAir3.3 · 引擎文档 · LAYABOX [ 87%]

...r.create(this, this.onSuccess), Laya.Handler.create(this, this.onError) ); console.log("click"); } // 成功获取位置后触发 onSuccess(info: Laya.GeolocationInfo): void { console.log('经纬度: (' + info.longitude + '°, ' + info.latitude + '°),精确度:' + info.accuracy + 'm'); if (info...

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

50. [LayaAirIDE3]xcode切入切出声音不播放 [ 86%]

...te onBlur() {         // 暂停所有需要停止的逻辑         console.log("onBlur");         SoundManager.Instance.pauseBGM();         // // 部分机型包内不生效         SoundManager.Instance.pauseAllEffects();     }    private onFocus() {         if (!SoundMa...

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