美素佳儿 litter wizard小游戏
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

game.native.min.js 3.0KB

5 лет назад
1
  1. var __reflect=this&&this.__reflect||function(t,e,n){t.__class__=e,n?n.push(e):n=[e],t.__types__=t.__types__?n.concat(t.__types__):n},__extends=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},egret;!function(t){var e;!function(e){var n=function(e){function n(){var t=e.call(this)||this;return t.urlData={},t}return __extends(n,e),n.prototype.proceed=function(e){var n=this;if(e.dataFormat==t.URLLoaderDataFormat.TEXTURE)return void n.loadTexture(e);if(e.dataFormat==t.URLLoaderDataFormat.SOUND)return void n.loadSound(e);var r=e._request,o=n.getVirtualUrl(t.$getUrl(r)),a=new t.HttpRequest;a.open(o,r.method==t.URLRequestMethod.POST?t.HttpMethod.POST:t.HttpMethod.GET);for(var i=r.requestHeaders.length,s=0;i>s;s++){var E=r.requestHeaders[s];a.setRequestHeader(E.name,E.value)}a.addEventListener(t.Event.COMPLETE,function(){e.data=a.response,t.Event.dispatchEvent(e,t.Event.COMPLETE)},this),a.addEventListener(t.IOErrorEvent.IO_ERROR,function(){t.IOErrorEvent.dispatchIOErrorEvent(e)},this),a.responseType=e.dataFormat==t.URLLoaderDataFormat.BINARY?t.HttpResponseType.ARRAY_BUFFER:t.HttpResponseType.TEXT,a.send(r.data)},n.prototype.loadSound=function(e){function n(t){e.dispatchEvent(t)}function r(t){a(),e.dispatchEvent(t)}function o(n){a(),e.data=E;var r=function(){e.dispatchEventWith(t.Event.COMPLETE)};__global.setTimeout?__global.setTimeout(r,0):t.$callAsync(r,i)}function a(){E.removeEventListener(t.Event.COMPLETE,o,i),E.removeEventListener(t.IOErrorEvent.IO_ERROR,r,i),E.removeEventListener(t.ProgressEvent.PROGRESS,n,i)}var i=this,s=this.getVirtualUrl(e._request.url),E=new t.Sound;E.addEventListener(t.Event.COMPLETE,o,i),E.addEventListener(t.IOErrorEvent.IO_ERROR,r,i),E.addEventListener(t.ProgressEvent.PROGRESS,n,i),E.load(s)},n.prototype.loadTexture=function(e){function n(t){e.dispatchEvent(t)}function r(t){a(),e.dispatchEvent(t)}function o(n){a();var r=v.data,o=new t.Texture;o._setBitmapData(r),e.data=o;var s=function(){e.dispatchEventWith(t.Event.COMPLETE)};__global.setTimeout?__global.setTimeout(s,0):t.$callAsync(s,i)}function a(){v.removeEventListener(t.Event.COMPLETE,o,i),v.removeEventListener(t.IOErrorEvent.IO_ERROR,r,i),v.removeEventListener(t.ProgressEvent.PROGRESS,n,i)}var i=this,s=e._request,E=i.getVirtualUrl(s.url),v=new t.ImageLoader;v.addEventListener(t.Event.COMPLETE,o,i),v.addEventListener(t.IOErrorEvent.IO_ERROR,r,i),v.addEventListener(t.ProgressEvent.PROGRESS,n,i),v.load(E)},n.prototype.isNetUrl=function(t){return-1!=t.indexOf("http://")||-1!=t.indexOf("HTTP://")||-1!=t.indexOf("https://")||-1!=t.indexOf("HTTPS://")},n.prototype.getVirtualUrl=function(t){return t},n.getNetContext=function(){return null==n._instance&&(n._instance=new n),n._instance},n}(t.HashObject);n.__use_asyn=null==egret_native.readFileAsync?!1:!0,e.NativeNetContext=n,__reflect(n.prototype,"egret.native.NativeNetContext",["egret.NetContext"]),t.NetContext=n}(e=t["native"]||(t["native"]={}))}(egret||(egret={}));