美素佳儿 litter wizard小游戏
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
3.4KB

  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(){return e.call(this)||this}return __extends(n,e),n.prototype.proceed=function(e){function n(t){e.dispatchEvent(t)}function r(t){a(),e.dispatchEvent(t)}function o(){switch(a(),e.dataFormat){case t.URLLoaderDataFormat.VARIABLES:e.data=new t.URLVariables(d.response);break;default:e.data=d.response}window.setTimeout(function(){t.Event.dispatchEvent(e,t.Event.COMPLETE)},0)}function a(){d.removeEventListener(t.Event.COMPLETE,o,s),d.removeEventListener(t.IOErrorEvent.IO_ERROR,r,s),d.removeEventListener(t.ProgressEvent.PROGRESS,n,s)}var s=this;if(e.dataFormat==t.URLLoaderDataFormat.TEXTURE)return void this.loadTexture(e);if(e.dataFormat==t.URLLoaderDataFormat.SOUND)return void this.loadSound(e);var i=e._request,E=s.getVirtualUrl(t.$getUrl(i)),d=new t.HttpRequest;if(d.addEventListener(t.Event.COMPLETE,o,this),d.addEventListener(t.IOErrorEvent.IO_ERROR,r,this),d.addEventListener(t.ProgressEvent.PROGRESS,n,this),d.open(E,i.method),d.responseType=this.getResponseType(e.dataFormat),i.method!=t.URLRequestMethod.GET&&i.data)if(i.data instanceof t.URLVariables){d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var u=i.data;d.send(u.toString())}else d.setRequestHeader("Content-Type","multipart/form-data"),d.send(i.data);else d.send()},n.prototype.getResponseType=function(e){switch(e){case t.URLLoaderDataFormat.TEXT:case t.URLLoaderDataFormat.VARIABLES:return t.URLLoaderDataFormat.TEXT;case t.URLLoaderDataFormat.BINARY:return"arraybuffer";default:return e}},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,window.setTimeout(function(){e.dispatchEventWith(t.Event.COMPLETE)},0)}function a(){E.removeEventListener(t.Event.COMPLETE,o,s),E.removeEventListener(t.IOErrorEvent.IO_ERROR,r,s),E.removeEventListener(t.ProgressEvent.PROGRESS,n,s)}var s=this,i=this.getVirtualUrl(e._request.url),E=new t.Sound;E.addEventListener(t.Event.COMPLETE,o,s),E.addEventListener(t.IOErrorEvent.IO_ERROR,r,s),E.addEventListener(t.ProgressEvent.PROGRESS,n,s),E.load(i)},n.prototype.loadTexture=function(e){function n(t){e.dispatchEvent(t)}function r(t){a(),e.dispatchEvent(t)}function o(n){a();var r=E.data;r.source.setAttribute("bitmapSrc",i);var o=new t.Texture;o._setBitmapData(r),e.data=o,window.setTimeout(function(){e.dispatchEventWith(t.Event.COMPLETE)},s)}function a(){E.removeEventListener(t.Event.COMPLETE,o,s),E.removeEventListener(t.IOErrorEvent.IO_ERROR,r,s),E.removeEventListener(t.ProgressEvent.PROGRESS,n,s)}var s=this,i=this.getVirtualUrl(e._request.url),E=new t.ImageLoader;E.addEventListener(t.Event.COMPLETE,o,s),E.addEventListener(t.IOErrorEvent.IO_ERROR,r,s),E.addEventListener(t.ProgressEvent.PROGRESS,n,s),E.load(i)},n.prototype.getChangeList=function(){return[]},n.prototype.getVirtualUrl=function(t){return t},n.getNetContext=function(){return null==n._instance&&(n._instance=new n),n._instance},n}(t.HashObject);e.HTML5NetContext=n,__reflect(n.prototype,"egret.web.HTML5NetContext",["egret.NetContext"]),t.NetContext=n}(e=t.web||(t.web={}))}(egret||(egret={}));