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

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

61. Native1.0.1 无法连接wss [ 91%]

...aitve无法连接wss 示例代码如下: const url = "wss://xxx.com:8888"; this.socket = new Laya.Socket(); this.socket.endian = Laya.Byte.BIG_ENDIAN; this.socket.on(Laya.Event.OPEN, this, this.onConnectSuccess); this.socket.on(Laya.Event.CLOSE, this, this.onDisonnect); this.socket.on(Laya.Event.ERR...

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

62. IDE-显示IDE创建的界面 [ 90%]

... Laya.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Event.CLICK, this, onBtnClick); this.btn2.on(Event.CLICK, this, onBtn2Click); function onBtnClick() { //手动控制组...

来源: Laya_示例 发布时间: 20240929

63. IDE-显示IDE创建的界面 [ 90%]

... Laya.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Event.CLICK, this, onBtnClick); this.btn2.on(Event.CLICK, this, onBtn2Click); function onBtnClick() { //手动控制组...

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

64. Socket连接不上(已解决) [ 90%]

...et连接不上(已解决) socket = new Socket(); socket.on(Event.OPEN, this, onSocketOpen); socket.connect("127.0.0.1", 8080); 照着官方例子,服务器显示连接上了,但onSocketOpen没调用到,而且socket的connected为false。 能帮忙看是什么原因么?   具体代码:...

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

65. 2.0按钮添加事件报错 cannot read property 'on' fof undefined [ 90%]

...ned class GameLogin extends ui.login.login_bgUI { constructor() { super(); this.btn_register.on("click", this, this.ToRegisterPage); } ToRegisterPage() : void { this.loadScene("login/register_page"); } }   //调用on的时候 直接会报Cannot read property 'on' of undefined   我再把生成的u...

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

66. dialog的popup方法不会关闭其他弹窗 [ 90%]

...xtends ui.loginUI { normalDialog: NormalDialog; constructor() { super();  this.btn_signin.on(Laya.Event.CLICK, null, () => { this.showDialog("登录成功") }); this.btn_register.on(Laya.Event.CLICK, null, () => { this.showDialog("注册功能暂未开放") });  }  showDialog(context: strin...

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

67. websocket连接, ws 时没问题,改成 wss 没反应 [ 90%]

...该怎么改?或者哪里有连接 wss 的代码片段?谢谢!     this.byte = new Laya.Byte();     this.byte.endian = Laya.Byte.LITTLE_ENDIAN;  //这里我们采用小端     this.socket = new Laya.Socket();     this.socket.endian = Laya.Byte.LITTLE_ENDIAN;  //这里我们采用小...

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

68. laya接入vivo平台加载资源卡住66% [ 90%]

...wser.onVVMiniGame) {// _http = new HttpRequest(); _http.on(Event.PROGRESS, this, onProgress); _http.on(Event.ERROR, this, onError); _http.on(Event.COMPLETE, this, onLoaded); ////////////////////////////////////////////////////// } else { //...... } 已解决。 2020-11-23 0 0 分享 微博 QZONE 微...

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

69. 如何与服务端建立连接 [ 90%]

...ort; let socket:Laya.Socket = new Laya.Socket(); socket.on(Laya.Event.OPEN,this,()=>{ console.log("connect success!"); }) socket.connectByUrl(url);点此查看Socket官方示例 2018-05-15 1 0 分享 微博 QZONE 微信 rabbit 赞同来自: 只要前端的,还是要前端和后端代码? 2018...

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

70. 动画不显示 [ 90%]

...sh(m_MapImgUrl);             Laya.loader.load(urls,Handler.create(this,loadResourceComplated));         }         private function loadResourceComplated(e:*=null):void         {             //开始异步加载资源             Laya.loader.load(m_MapImgU...

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