大约有 68 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0041 秒)
....init(800,600,Laya.WebGL); // var socket = io.connect('10.10.1.103:8081'); this.byte = new Laya.Byte(); this.byte.endian = Laya.Byte.LITTLE_ENDIAN; this.socket = new Laya.Socket(); this.socket.endian = Laya.Byte.LITTLE_ENDIAN; //建立连接 this.socket.connectByUrl("ws://10.10.1.103:8888"); // this...
来源: Laya_社区 发布时间: 20180509
...Laya.loader.load("http://192.168.1.21:90/Game_Config.xml",Handler.create(this,onLoadered)); public function onLoadered(data:*):void { trace("data:" + data); } 来完成文件的加载,在文件加载完会返回xml的内容信息,这是你可以解析加载的xml内容 2016-11-20 0 0 分享 ...
来源: Laya_社区 发布时间: 20161120
...eDistconnected; private initSocket(): void { this.on(Laya.Event.OPEN, this, this.onConected); this.on(Laya.Event.ERROR, this, this.onError); } public conectToServer(): void { //“连接”按钮的回调 if (t...
来源: Laya_社区 发布时间: 20170602
...rotoBuf:any = Browser.window.protobuf; ProtoBuf.load("type.proto", this.onProtoLoaded); ProtoBuf.load("Lobby/protobuf/client2world_protocol.proto", this.onProtoBufLoaded1); } function onProtoLoaded(err:any, root:any):void{ if (err) throw err; root_prot...
来源: Laya_社区 发布时间: 20170911
...new laya.net.HttpRequest(); req.on(laya.events.Event.COMPLETE, this, cb_onSuccess); req.on(laya.events.Event.ERROR, this, cb_onFail); req.send(url); } // 下载jpg图片成功后,显示在舞台上,response为 bmp图片二进制 function ...
来源: Laya_社区 发布时间: 20170103
... = console.log; console.warn = console.log; console.error = console.log; } this._message = new Message(); this._package = new Package(); this.socket = null; this.callbacks = {}; this.handlers = {}; // Map from request id to route this.routeMap = {}; this.heartbeatInterval = 0; this.heartbeatTimeout ...
来源: Laya_社区 发布时间: 20180119
...要的资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例UI界面 var testView:ui.test.TestPageUI = new ui.test.TestPageUI(); Laya.stage.addChild(testView); } } new LayaUISample; ``` `WorkerLoader.workerPath = "libs/worker.js";...
来源: Laya2.0_文档 发布时间: 20210715
...ion (ss) { var xhr = new Laya.HttpRequest(); xhr.once(Laya.Event.COMPLETE, this, completeHandler); xhr.once(Laya.Event.ERROR, this, errorHandler); xhr.send("http://192.168.10.108:35553/re ... ot%3B, "", "get", "arraybuffer"); function completeHandler(data) { //加载完成返回的data是arraybuffer...
来源: Laya_社区 发布时间: 20180201
...代码如下: var div:any = Laya.Browser.document.createElement("div"); this.qrcode = new Laya.Browser.window.QRCode(div,{ width:100, height:100 }); var url:string = "http://layabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite()...
来源: Laya3.0_文档 发布时间: 20240910
...要的资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例UI界面 var testView = ui.test.TestPageUI(); Laya.stage.addChild(testView); } ``` `WorkerLoader.workerPath = "libs/worker.js";`设置worker.js的路径,这个worker.js是Laya官...
来源: Laya2.0_文档 发布时间: 20210715