game-min.js 264 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. var egret;(function(c){var b=function(){function c(){this._hashCode=c.hashCount++}Object.defineProperty(c.prototype,"hashCode",{get:function(){return this._hashCode},enumerable:!0,configurable:!0});c.hashCount=1;return c}();c.HashObject=b;b.prototype.__class__="egret.HashObject"})(egret||(egret={}));var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  2. (function(c){var b=function(c){function a(e){"undefined"===typeof e&&(e=300);c.call(this);this.objectPool=[];this._length=0;1>e&&(e=1);this.autoDisposeTime=e;this.frameCount=0}__extends(a,c);a.prototype._checkFrame=function(){this.frameCount--;0>=this.frameCount&&this.dispose()};Object.defineProperty(a.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0});a.prototype.push=function(e){var c=this.objectPool;-1==c.indexOf(e)&&(c.push(e),this._length++,0==this.frameCount&&
  3. (this.frameCount=this.autoDisposeTime,a._callBackList.push(this)))};a.prototype.pop=function(){if(0==this._length)return null;this._length--;return this.objectPool.pop()};a.prototype.dispose=function(){0<this._length&&(this.objectPool=[],this._length=0);this.frameCount=0;var e=a._callBackList,c=e.indexOf(this);-1!=c&&e.splice(c,1)};a._callBackList=[];return a}(c.HashObject);c.Recycler=b;b.prototype.__class__="egret.Recycler"})(egret||(egret={}));
  4. (function(c){c.__START_TIME;c.getTimer=function(){return Date.now()-c.__START_TIME}})(egret||(egret={}));(function(c){c.__callLaterFunctionList=[];c.__callLaterThisList=[];c.__callLaterArgsList=[];c.callLater=function(b,d){for(var a=[],e=0;e<arguments.length-2;e++)a[e]=arguments[e+2];c.__callLaterFunctionList.push(b);c.__callLaterThisList.push(d);c.__callLaterArgsList.push(a)}})(egret||(egret={}));var egret_dom;
  5. (function(c){function b(){for(var c=document.createElement("div").style,a=["t","webkitT","msT","MozT","OT"],e=0;e<a.length;e++)if(a[e]+"ransform"in c)return a[e];return a[0]}c.header="";c.getHeader=b;c.getTrans=function(d){""==c.header&&(c.header=b());return c.header+d.substring(1,d.length)}})(egret_dom||(egret_dom={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  6. (function(c){var b=function(b){function a(e,a,c){"undefined"===typeof a&&(a=!1);"undefined"===typeof c&&(c=!1);b.call(this);this._eventPhase=2;this._isPropagationImmediateStopped=this._isPropagationStopped=this._isDefaultPrevented=!1;this.isNew=!0;this._type=e;this._bubbles=a;this._cancelable=c}__extends(a,b);Object.defineProperty(a.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"bubbles",{get:function(){return this._bubbles},
  7. enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"cancelable",{get:function(){return this._cancelable},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"eventPhase",{get:function(){return this._eventPhase},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"currentTarget",{get:function(){return this._currentTarget},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0});
  8. a.prototype.isDefaultPrevented=function(){return this._isDefaultPrevented};a.prototype.preventDefault=function(){this._cancelable&&(this._isDefaultPrevented=!0)};a.prototype.stopPropagation=function(){this._bubbles&&(this._isPropagationStopped=!0)};a.prototype.stopImmediatePropagation=function(){this._bubbles&&(this._isPropagationImmediateStopped=!0)};a.prototype._reset=function(){this.isNew?this.isNew=!1:(this._isPropagationImmediateStopped=this._isPropagationStopped=this._isDefaultPrevented=!1,
  9. this._currentTarget=this._target=null,this._eventPhase=2)};a._dispatchByTarget=function(e,a,b,d,f,h){"undefined"===typeof f&&(f=!1);"undefined"===typeof h&&(h=!1);var k=e.eventRecycler;k||(k=e.eventRecycler=new c.Recycler);var p=k.pop();p?p._type=b:p=new e(b);p._bubbles=f;p._cancelable=h;if(d)for(var m in d)p[m]=d[m],null!==p[m]&&(d[m]=null);e=a.dispatchEvent(p);k.push(p);return e};a._getPropertyData=function(e){var a=e._props;a||(a=e._props={});return a};a.dispatchEvent=function(e,c,b,d){"undefined"===
  10. typeof b&&(b=!1);var f=a._getPropertyData(a);d&&(f.data=d);a._dispatchByTarget(a,e,c,f,b)};a.ADDED_TO_STAGE="addedToStage";a.REMOVED_FROM_STAGE="removedFromStage";a.ADDED="added";a.REMOVED="removed";a.COMPLETE="complete";a.ENTER_FRAME="enterFrame";a.RENDER="render";a.FINISH_RENDER="finishRender";a.FINISH_UPDATE_TRANSFORM="finishUpdateTransform";a.LEAVE_STAGE="leaveStage";a.RESIZE="resize";a.CHANGE="change";return a}(c.HashObject);c.Event=b;b.prototype.__class__="egret.Event"})(egret||(egret={}));
  11. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  12. (function(c){var b=function(b){function a(e,a,c){"undefined"===typeof a&&(a=!1);"undefined"===typeof c&&(c=!1);b.call(this,e,a,c)}__extends(a,b);a.dispatchIOErrorEvent=function(e){c.Event._dispatchByTarget(a,e,a.IO_ERROR)};a.IO_ERROR="ioError";return a}(c.Event);c.IOErrorEvent=b;b.prototype.__class__="egret.IOErrorEvent"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  13. (function(c){var b=function(b){function a(e,a,c,g,f,h,k,p,m,q){"undefined"===typeof a&&(a=!0);"undefined"===typeof c&&(c=!0);"undefined"===typeof g&&(g=0);"undefined"===typeof f&&(f=0);"undefined"===typeof h&&(h=0);"undefined"===typeof k&&(k=!1);"undefined"===typeof p&&(p=!1);"undefined"===typeof q&&(q=!1);b.call(this,e,a,c);this._stageY=this._stageX=0;this.touchPointID=g;this._stageX=f;this._stageY=h;this.ctrlKey=k;this.altKey=p;this.touchDown=q}__extends(a,b);Object.defineProperty(a.prototype,"stageX",
  14. {get:function(){return this._stageX},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"stageY",{get:function(){return this._stageY},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"localX",{get:function(){return this._currentTarget.globalToLocal(this._stageX,this._stageY,c.Point.identity).x},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"localY",{get:function(){return this._currentTarget.globalToLocal(this._stageX,this._stageY,c.Point.identity).y},
  15. enumerable:!0,configurable:!0});a.dispatchTouchEvent=function(e,l,b,d,f,h,k,p,m){"undefined"===typeof b&&(b=0);"undefined"===typeof d&&(d=0);"undefined"===typeof f&&(f=0);"undefined"===typeof h&&(h=!1);"undefined"===typeof k&&(k=!1);"undefined"===typeof p&&(p=!1);"undefined"===typeof m&&(m=!1);var q=c.Event._getPropertyData(a);q.touchPointID=b;q._stageX=d;q._stageY=f;q.ctrlKey=h;q.altKey=k;q.shiftKey=p;q.touchDown=m;c.Event._dispatchByTarget(a,e,l,q,!0,!0)};a.TOUCH_TAP="touchTap";a.TOUCH_MOVE="touchMove";
  16. a.TOUCH_BEGIN="touchBegin";a.TOUCH_END="touchEnd";a.TOUCH_RELEASE_OUTSIDE="touchReleaseOutside";a.TOUCH_ROLL_OUT="touchRollOut";a.TOUCH_ROLL_OVER="touchRollOver";a.TOUCH_OUT="touchOut";a.TOUCH_OVER="touchOver";return a}(c.Event);c.TouchEvent=b;b.prototype.__class__="egret.TouchEvent"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  17. (function(c){var b=function(b){function a(e,a,c){"undefined"===typeof a&&(a=!1);"undefined"===typeof c&&(c=!1);b.call(this,e,a,c)}__extends(a,b);a.dispatchTimerEvent=function(e,l){c.Event._dispatchByTarget(a,e,l)};a.TIMER="timer";a.TIMER_COMPLETE="timerComplete";return a}(c.Event);c.TimerEvent=b;b.prototype.__class__="egret.TimerEvent"})(egret||(egret={}));
  18. (function(c){var b=function(){function c(){}c.CAPTURING_PHASE=1;c.AT_TARGET=2;c.BUBBLING_PHASE=3;return c}();c.EventPhase=b;b.prototype.__class__="egret.EventPhase"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  19. (function(c){var b=function(b){function a(e){"undefined"===typeof e&&(e=null);b.call(this);this._eventTarget=e?e:this}__extends(a,b);a.prototype.addEventListener=function(e,a,b,d,f){"undefined"===typeof d&&(d=!1);"undefined"===typeof f&&(f=0);"undefined"===typeof d&&(d=!1);"undefined"===typeof f&&(f=0);a||c.Logger.fatal("addEventListener\u4fa6\u542c\u51fd\u6570\u4e0d\u80fd\u4e3a\u7a7a");d?(this._captureEventsMap||(this._captureEventsMap={}),d=this._captureEventsMap):(this._eventsMap||(this._eventsMap=
  20. {}),d=this._eventsMap);var h=d[e];h||(h=d[e]=[]);this._insertEventBin(h,a,b,f)};a.prototype._insertEventBin=function(e,a,c,b){for(var d=-1,h=e.length,k=0;k<h;k++){var p=e[k];if(p.listener===a&&p.thisObject===c)return!1;-1==d&&p.priority<b&&(d=k)}a={listener:a,thisObject:c,priority:b};-1!=d?e.splice(d,0,a):e.push(a);return!0};a.prototype.removeEventListener=function(e,a,c,b){"undefined"===typeof b&&(b=!1);if(b=b?this._captureEventsMap:this._eventsMap){var d=b[e];d&&(this._removeEventBin(d,a,c),0==
  21. d.length&&delete b[e])}};a.prototype._removeEventBin=function(e,a,c){for(var b=e.length,d=0;d<b;d++){var h=e[d];if(h.listener===a&&h.thisObject===c)return e.splice(d,1),!0}return!1};a.prototype.hasEventListener=function(e){return this._eventsMap&&this._eventsMap[e]||this._captureEventsMap&&this._captureEventsMap[e]};a.prototype.willTrigger=function(e){return this.hasEventListener(e)};a.prototype.dispatchEvent=function(e){e._reset();e._target=this._eventTarget;e._currentTarget=this._eventTarget;return this._notifyListener(e)};
  22. a.prototype._notifyListener=function(e){var a=1==e._eventPhase?this._captureEventsMap:this._eventsMap;if(!a)return!0;a=a[e._type];if(!a)return!0;var c=a.length;if(0==c)return!0;for(var a=a.concat(),b=0;b<c;b++){var d=a[b];d.listener.call(d.thisObject,e);if(e._isPropagationImmediateStopped)break}return!e._isDefaultPrevented};a.prototype.dispatchEventWith=function(e,a,b){"undefined"===typeof a&&(a=!1);c.Event.dispatchEvent(this,e,a,b)};return a}(c.HashObject);c.EventDispatcher=b;b.prototype.__class__=
  23. "egret.EventDispatcher"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  24. (function(c){var b=function(b){function a(){b.call(this);this.reuseEvent=new c.Event("")}__extends(a,b);a.prototype.run=function(){c.Ticker.getInstance().run();c.Ticker.getInstance().register(this.renderLoop,this,Number.NEGATIVE_INFINITY);c.Ticker.getInstance().register(this.broadcastEnterFrame,this,Number.POSITIVE_INFINITY);this.touchContext.run()};a.prototype.renderLoop=function(e){if(0<c.__callLaterFunctionList.length){var b=c.__callLaterFunctionList;c.__callLaterFunctionList=[];var d=c.__callLaterThisList;
  25. c.__callLaterThisList=[];var g=c.__callLaterArgsList;c.__callLaterArgsList=[]}e=this.stage;var f=a.cachedEvent;f._type=c.Event.RENDER;this.dispatchEvent(f);c.Stage._invalidateRenderFlag&&(this.broadcastRender(),c.Stage._invalidateRenderFlag=!1);b&&this.doCallLaterList(b,d,g);b=this.rendererContext;b.onRenderStart();b.clearScreen();e._updateTransform();f._type=c.Event.FINISH_UPDATE_TRANSFORM;this.dispatchEvent(f);e._draw(b);f._type=c.Event.FINISH_RENDER;this.dispatchEvent(f);b.onRenderFinish()};a.prototype.broadcastEnterFrame=
  26. function(e){e=this.reuseEvent;e._type=c.Event.ENTER_FRAME;this.dispatchEvent(e);for(var a=c.DisplayObject._enterFrameCallBackList.concat(),b=a.length,d=0;d<b;d++){var f=a[d];e._target=f.display;e._currentTarget=f.display;f.listener.call(f.thisObject,e)}a=c.Recycler._callBackList;for(d=a.length-1;0<=d;d--)a[d]._checkFrame()};a.prototype.broadcastRender=function(){var e=this.reuseEvent;e._type=c.Event.RENDER;for(var a=c.DisplayObject._renderCallBackList.concat(),b=a.length,d=0;d<b;d++){var f=a[d],h=
  27. f.display;e._target=h;e._currentTarget=h;f.listener.call(f.thisObject,e)}};a.prototype.doCallLaterList=function(e,a,c){for(var b=e.length,d=0;d<b;d++){var h=e[d];null!=h&&h.apply(a[d],c[d])}};a.DEVICE_PC="web";a.DEVICE_MOBILE="native";a.RUNTIME_HTML5="runtime_html5";a.RUNTIME_NATIVE="runtime_native";a.cachedEvent=new c.Event("");return a}(c.EventDispatcher);c.MainContext=b;b.prototype.__class__="egret.MainContext"})(egret||(egret={}));
  28. var testDeviceType=function(){if(!this.navigator)return!0;var c=navigator.userAgent.toLowerCase();return-1!=c.indexOf("mobile")||-1!=c.indexOf("android")},testRuntimeType=function(){return this.navigator?!0:!1};egret.MainContext.instance=new egret.MainContext;egret.MainContext.deviceType=testDeviceType()?egret.MainContext.DEVICE_MOBILE:egret.MainContext.DEVICE_PC;egret.MainContext.runtimeType=testRuntimeType()?egret.MainContext.RUNTIME_HTML5:egret.MainContext.RUNTIME_NATIVE;
  29. (function(c){var b=function(){function b(){this._tick=this._preDrawCount=this._updateTransformPerformanceCost=this._renderPerformanceCost=this._logicPerformanceCost=this._lastTime=0;this._maxDeltaTime=500;this._totalDeltaTime=0}b.getInstance=function(){null==b.instance&&(b.instance=new b);return b.instance};b.prototype.run=function(){c.Ticker.getInstance().register(this.update,this);null==this._txt&&(this._txt=new c.TextField,this._txt.size=28,c.MainContext.instance.stage.addChild(this._txt));var a=
  30. c.MainContext.instance;a.addEventListener(c.Event.ENTER_FRAME,this.onEnterFrame,this);a.addEventListener(c.Event.RENDER,this.onStartRender,this);a.addEventListener(c.Event.FINISH_RENDER,this.onFinishRender,this);a.addEventListener(c.Event.FINISH_UPDATE_TRANSFORM,this.onFinishUpdateTransform,this)};b.prototype.onEnterFrame=function(a){this._lastTime=c.getTimer()};b.prototype.onStartRender=function(a){a=c.getTimer();this._logicPerformanceCost=a-this._lastTime;this._lastTime=a};b.prototype.onFinishUpdateTransform=
  31. function(a){a=c.getTimer();this._updateTransformPerformanceCost=a-this._lastTime;this._lastTime=a};b.prototype.onFinishRender=function(a){a=c.getTimer();this._renderPerformanceCost=a-this._lastTime;this._lastTime=a};b.prototype.update=function(a){this._tick++;this._totalDeltaTime+=a;if(this._totalDeltaTime>=this._maxDeltaTime){a=(this._preDrawCount-1).toString();var e=Math.ceil(this._logicPerformanceCost).toString()+","+Math.ceil(this._updateTransformPerformanceCost).toString()+","+Math.ceil(this._renderPerformanceCost).toString()+
  32. ","+Math.ceil(c.MainContext.instance.rendererContext.renderCost).toString();this._txt.text="draw:"+a+"\ncost:"+e+"\nFPS:"+Math.floor(1E3*this._tick/this._totalDeltaTime).toString();this._tick=this._totalDeltaTime=0}this._preDrawCount=0};b.prototype.onDrawImage=function(){this._preDrawCount++};return b}();c.Profiler=b;b.prototype.__class__="egret.Profiler"})(egret||(egret={}));
  33. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  34. (function(c){var b=function(b){function a(){b.apply(this,arguments);this._timeScale=1;this._paused=!1;this.callBackList=[]}__extends(a,b);a.prototype.run=function(){c.__START_TIME=(new Date).getTime();c.MainContext.instance.deviceContext.executeMainLoop(this.update,this)};a.prototype.update=function(e){var a=this.callBackList.concat(),c=a.length;e*=this._timeScale;e*=this._timeScale;for(var b=0;b<c;b++){var d=a[b];d.listener.call(d.thisObject,e)}};a.prototype.register=function(e,a,c){"undefined"===
  35. typeof c&&(c=0);this._insertEventBin(this.callBackList,e,a,c)};a.prototype.unregister=function(e,a){this._removeEventBin(this.callBackList,e,a)};a.prototype.setTimeout=function(e,a,b){for(var d=[],f=0;f<arguments.length-3;f++)d[f]=arguments[f+3];c.Logger.warning("Ticker#setTimeout\u65b9\u6cd5\u5373\u5c06\u5e9f\u5f03,\u8bf7\u4f7f\u7528egret.setTimeout");c.setTimeout.apply(null,[e,a,b].concat(d))};a.prototype.setTimeScale=function(e){this._timeScale=e};a.prototype.getTimeScale=function(){return this._timeScale};
  36. a.prototype.pause=function(){this._paused=!0};a.prototype.resume=function(){this._paused=!1};a.getInstance=function(){null==a.instance&&(a.instance=new a);return a.instance};return a}(c.EventDispatcher);c.Ticker=b;b.prototype.__class__="egret.Ticker"})(egret||(egret={}));
  37. (function(c){var b=function(){function c(){}c.LEFT="left";c.RIGHT="right";c.CENTER="center";c.JUSTIFY="justify";c.CONTENT_JUSTIFY="contentJustify";return c}();c.HorizontalAlign=b;b.prototype.__class__="egret.HorizontalAlign"})(egret||(egret={}));(function(c){var b=function(){function c(){}c.TOP="top";c.BOTTOM="bottom";c.MIDDLE="middle";c.JUSTIFY="justify";c.CONTENT_JUSTIFY="contentJustify";return c}();c.VerticalAlign=b;b.prototype.__class__="egret.VerticalAlign"})(egret||(egret={}));
  38. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  39. (function(c){var b=function(b){function a(e,a){"undefined"===typeof a&&(a=0);b.call(this);this._currentCount=0;this.delay=e;this.repeatCount=a}__extends(a,b);a.prototype.currentCount=function(){return this._currentCount};Object.defineProperty(a.prototype,"running",{get:function(){return this._running},enumerable:!0,configurable:!0});a.prototype.reset=function(){this.stop();this._currentCount=0};a.prototype.start=function(){this._running||(this.lastTime=c.getTimer(),0!=this._currentCount&&(this._currentCount=
  40. 0),c.Ticker.getInstance().register(this.onEnterFrame,this),this._running=!0)};a.prototype.stop=function(){this._running&&(c.Ticker.getInstance().unregister(this.onEnterFrame,this),this._running=!1)};a.prototype.onEnterFrame=function(e){e=c.getTimer();e-this.lastTime>this.delay&&(this.lastTime=e,this._currentCount++,c.TimerEvent.dispatchTimerEvent(this,c.TimerEvent.TIMER),0<this.repeatCount&&this._currentCount>=this.repeatCount&&(this.stop(),c.TimerEvent.dispatchTimerEvent(this,c.TimerEvent.TIMER_COMPLETE)))};
  41. return a}(c.EventDispatcher);c.Timer=b;b.prototype.__class__="egret.Timer"})(egret||(egret={}));(function(c){c.getQualifiedClassName=function(c){c=c.prototype?c.prototype:c.__proto__;if(c.hasOwnProperty("__class__"))return c.__class__;var d=c.constructor.toString(),a=d.indexOf("("),d=d.substring(9,a);return c.__class__=d}})(egret||(egret={}));
  42. (function(c){var b={};c.getDefinitionByName=function(c){if(!c)return null;var a=b[c];if(a)return a;for(var e=c.split("."),l=e.length,a=__global,n=0;n<l;n++)if(a=a[e[n]],!a)return null;return b[c]=a}})(egret||(egret={}));var __global=__global||this;
  43. (function(c){function b(e){for(var a in d){var c=d[a];c.delay-=e;0>=c.delay&&(c.listener.apply(c.thisObject,c.params),delete d[a])}}var d={},a=0;c.setTimeout=function(e,l,n){for(var g=[],f=0;f<arguments.length-3;f++)g[f]=arguments[f+3];g={listener:e,thisObject:l,delay:n,params:g};0==a&&c.Ticker.getInstance().register(b,null);a++;d[a]=g;return a};c.clearTimeout=function(e){delete d[e]}})(egret||(egret={}));
  44. (function(c){c.hasDefinition=function(b){return c.getDefinitionByName(b)?!0:!1}})(egret||(egret={}));(function(c){c.toColorString=function(c){if(isNaN(c)||0>c)c=0;16777215<c&&(c=16777215);for(c=c.toString(16).toUpperCase();6>c.length;)c="0"+c;return"#"+c}})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  45. (function(c){var b=function(b){function a(e,a,c,g,f,h){"undefined"===typeof e&&(e=1);"undefined"===typeof a&&(a=0);"undefined"===typeof c&&(c=0);"undefined"===typeof g&&(g=1);"undefined"===typeof f&&(f=0);"undefined"===typeof h&&(h=0);b.call(this);this.a=e;this.b=a;this.c=c;this.d=g;this.tx=f;this.ty=h}__extends(a,b);a.prototype.prepend=function(e,a,c,b,d,h){var k=this.tx;if(1!=e||0!=a||0!=c||1!=b){var p=this.a,m=this.c;this.a=p*e+this.b*c;this.b=p*a+this.b*b;this.c=m*e+this.d*c;this.d=m*a+this.d*
  46. b}this.tx=k*e+this.ty*c+d;this.ty=k*a+this.ty*b+h;return this};a.prototype.append=function(e,a,c,b,d,h){var k=this.a,p=this.b,m=this.c,q=this.d;if(1!=e||0!=a||0!=c||1!=b)this.a=e*k+a*m,this.b=e*p+a*q,this.c=c*k+b*m,this.d=c*p+b*q;this.tx=d*k+h*m+this.tx;this.ty=d*p+h*q+this.ty;return this};a.prototype.prependMatrix=function(e){this.prepend(e.a,e.b,e.c,e.d,e.tx,e.ty);return this};a.prototype.appendMatrix=function(e){this.append(e.a,e.b,e.c,e.d,e.tx,e.ty);return this};a.prototype.prependTransform=function(e,
  47. c,b,d,f,h,k,p,m){if(f%360){var q=f*a.DEG_TO_RAD;f=Math.cos(q);q=Math.sin(q)}else f=1,q=0;if(p||m)this.tx-=p,this.ty-=m;h||k?(h*=a.DEG_TO_RAD,k*=a.DEG_TO_RAD,this.prepend(f*b,q*b,-q*d,f*d,0,0),this.prepend(Math.cos(k),Math.sin(k),-Math.sin(h),Math.cos(h),e,c)):this.prepend(f*b,q*b,-q*d,f*d,e,c);return this};a.prototype.appendTransform=function(e,c,b,d,f,h,k,p,m){if(f%360){var q=f*a.DEG_TO_RAD;f=Math.cos(q);q=Math.sin(q)}else f=1,q=0;h||k?(h*=a.DEG_TO_RAD,k*=a.DEG_TO_RAD,this.append(Math.cos(k),Math.sin(k),
  48. -Math.sin(h),Math.cos(h),e,c),this.append(f*b,q*b,-q*d,f*d,0,0)):this.append(f*b,q*b,-q*d,f*d,e,c);if(p||m)this.tx-=p*this.a+m*this.c,this.ty-=p*this.b+m*this.d;return this};a.prototype.rotate=function(e){var a=Math.cos(e);e=Math.sin(e);var c=this.a,b=this.c,d=this.tx;this.a=c*a-this.b*e;this.b=c*e+this.b*a;this.c=b*a-this.d*e;this.d=b*e+this.d*a;this.tx=d*a-this.ty*e;this.ty=d*e+this.ty*a;return this};a.prototype.skew=function(e,c){e*=a.DEG_TO_RAD;c*=a.DEG_TO_RAD;this.append(Math.cos(c),Math.sin(c),
  49. -Math.sin(e),Math.cos(e),0,0);return this};a.prototype.scale=function(e,a){this.a*=e;this.d*=a;this.c*=e;this.b*=a;this.tx*=e;this.ty*=a;return this};a.prototype.translate=function(e,a){this.tx+=e;this.ty+=a;return this};a.prototype.identity=function(){this.a=this.d=1;this.b=this.c=this.tx=this.ty=0;return this};a.prototype.identityMatrix=function(e){this.a=e.a;this.b=e.b;this.c=e.c;this.d=e.d;this.tx=e.tx;this.ty=e.ty;return this};a.prototype.invert=function(){var e=this.a,a=this.b,c=this.c,b=this.d,
  50. d=this.tx,h=e*b-a*c;this.a=b/h;this.b=-a/h;this.c=-c/h;this.d=e/h;this.tx=(c*this.ty-b*d)/h;this.ty=-(e*this.ty-a*d)/h;return this};a.transformCoords=function(e,a,b){var d=c.Point.identity;d.x=e.a*a+e.c*b+e.tx;d.y=e.d*b+e.b*a+e.ty;return d};a.prototype.toArray=function(e){this.array||(this.array=new Float32Array(9));e?(this.array[0]=this.a,this.array[1]=this.b,this.array[2]=0,this.array[3]=this.c,this.array[4]=this.d,this.array[5]=0,this.array[6]=this.tx,this.array[7]=this.ty):(this.array[0]=this.a,
  51. this.array[1]=this.b,this.array[2]=this.tx,this.array[3]=this.c,this.array[4]=this.d,this.array[5]=this.ty,this.array[6]=0,this.array[7]=0);this.array[8]=1;return this.array};a.identity=new a;a.DEG_TO_RAD=Math.PI/180;return a}(c.HashObject);c.Matrix=b;b.prototype.__class__="egret.Matrix"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  52. (function(c){var b=function(c){function a(e,a){"undefined"===typeof e&&(e=0);"undefined"===typeof a&&(a=0);c.call(this);this.x=e;this.y=a}__extends(a,c);a.prototype.clone=function(){return new a(this.x,this.y)};a.prototype.equals=function(e){return this.x==e.x&&this.y==e.y};a.distance=function(e,a){return Math.sqrt((e.x-a.x)*(e.x-a.x)+(e.y-a.y)*(e.y-a.y))};a.identity=new a(0,0);return a}(c.HashObject);c.Point=b;b.prototype.__class__="egret.Point"})(egret||(egret={}));
  53. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  54. (function(c){var b=function(c){function a(e,a,b,g){"undefined"===typeof e&&(e=0);"undefined"===typeof a&&(a=0);"undefined"===typeof b&&(b=0);"undefined"===typeof g&&(g=0);c.call(this);this.x=e;this.y=a;this.width=b;this.height=g}__extends(a,c);Object.defineProperty(a.prototype,"right",{get:function(){return this.x+this.width},set:function(e){this.width=e-this.x},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"bottom",{get:function(){return this.y+this.height},set:function(e){this.height=
  55. e-this.y},enumerable:!0,configurable:!0});a.prototype.initialize=function(e,a,c,b){this.x=e;this.y=a;this.width=c;this.height=b;return this};a.prototype.contains=function(e,a){return this.x<=e&&this.x+this.width>=e&&this.y<=a&&this.y+this.height>=a};a.prototype.intersects=function(e){var a=e.right,c=e.bottom,b=this.right,d=this.bottom;return this.contains(e.x,e.y)||this.contains(e.x,c)||this.contains(a,e.y)||this.contains(a,c)||e.contains(this.x,this.y)||e.contains(this.x,d)||e.contains(b,this.y)||
  56. e.contains(b,d)?!0:!1};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height)};a.prototype.containsPoint=function(e){return this.x<e.x&&this.x+this.width>e.x&&this.y<e.y&&this.y+this.height>e.y?!0:!1};a.identity=new a(0,0,0,0);return a}(c.HashObject);c.Rectangle=b;b.prototype.__class__="egret.Rectangle"})(egret||(egret={}));
  57. (function(c){var b=function(){function b(){}b.fatal=function(a,e){"undefined"===typeof e&&(e=null);c.Logger.traceToConsole("Fatal",a,e);throw Error(c.Logger.getTraceCode("Fatal",a,e));};b.info=function(a,e){"undefined"===typeof e&&(e=null);c.Logger.traceToConsole("Info",a,e)};b.warning=function(a,e){"undefined"===typeof e&&(e=null);c.Logger.traceToConsole("Warning",a,e)};b.traceToConsole=function(a,e,b){console.log(c.Logger.getTraceCode(a,e,b))};b.getTraceCode=function(a,e,c){return"["+a+"]"+e+":"+
  58. (null==c?"":c)};return b}();c.Logger=b;b.prototype.__class__="egret.Logger"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  59. (function(c){var b=function(b){function a(){b.call(this);this._isSupportDOMParser=this._xmlDict=this._parser=null;this._xmlDict={};window.DOMParser?(this._isSupportDOMParser=!0,this._parser=new DOMParser):this._isSupportDOMParser=!1}__extends(a,b);a.getInstance=function(){a._instance||(a._instance=new a);return a._instance};a.prototype.parserXML=function(e){for(var a=0;"\n"==e.charAt(a)||"\t"==e.charAt(a)||"\r"==e.charAt(a)||" "==e.charAt(a);)a++;0!=a&&(e=e.substring(a,e.length));this._isSupportDOMParser?
  60. a=this._parser.parseFromString(e,"text/xml"):(a=new ActiveXObject("Microsoft.XMLDOM"),a.async="false",a.loadXML(e));null==a&&c.Logger.info("xml not found!");return a};a._instance=null;return a}(c.HashObject);c.SAXParser=b;b.prototype.__class__="egret.SAXParser"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  61. (function(c){var b=function(e){function b(){e.call(this);this._designHeight=this._designWidth=0;this._scaleY=this._scaleX=1;this._stageHeight=this._stageWidth=this._offSetY=0}__extends(b,e);b.getInstance=function(){null==b.instance&&(a.initialize(),b.instance=new b);return b.instance};b.prototype.setDesignSize=function(e,a,b){this._designWidth=e;this._designHeight=a;b&&(c.Logger.warning("\u8be5\u65b9\u6cd5\u76ee\u524d\u4e0d\u5e94\u4f20\u5165 resolutionPolicy \u53c2\u6570\uff0c\u8bf7\u5728 docs/1.0_Final_ReleaseNote\u4e2d\u67e5\u770b\u5982\u4f55\u5347\u7ea7"),
  62. this._setResolutionPolicy(b))};b.prototype._setResolutionPolicy=function(e){this._resolutionPolicy=e;e.init(this);e._apply(this,this._designWidth,this._designHeight)};b.prototype.getScaleX=function(){return this._scaleX};b.prototype.getScaleY=function(){return this._scaleY};b.prototype.getOffSetY=function(){return this._offSetY};b.canvas_name="egretCanvas";b.canvas_div_name="gameDiv";return b}(c.HashObject);c.StageDelegate=b;b.prototype.__class__="egret.StageDelegate";var d=function(){function e(a,
  63. c){this._containerStrategy=a;this._contentStrategy=c}e.prototype.init=function(e){this._containerStrategy.init(e);this._contentStrategy.init(e)};e.prototype._apply=function(e,a,c){this._containerStrategy._apply(e,a,c);this._contentStrategy._apply(e,a,c)};return e}();c.ResolutionPolicy=d;d.prototype.__class__="egret.ResolutionPolicy";var a=function(){function a(){}a.initialize=function(){a.EQUAL_TO_FRAME=new e};a.prototype.init=function(e){};a.prototype._apply=function(e,a,c){};a.prototype._setupContainer=
  64. function(){var e=document.body,a;e&&(a=e.style)&&(a.paddingTop=a.paddingTop||"0px",a.paddingRight=a.paddingRight||"0px",a.paddingBottom=a.paddingBottom||"0px",a.paddingLeft=a.paddingLeft||"0px",a.borderTop=a.borderTop||"0px",a.borderRight=a.borderRight||"0px",a.borderBottom=a.borderBottom||"0px",a.borderLeft=a.borderLeft||"0px",a.marginTop=a.marginTop||"0px",a.marginRight=a.marginRight||"0px",a.marginBottom=a.marginBottom||"0px",a.marginLeft=a.marginLeft||"0px")};return a}();c.ContainerStrategy=a;
  65. a.prototype.__class__="egret.ContainerStrategy";var e=function(e){function a(){e.apply(this,arguments)}__extends(a,e);a.prototype._apply=function(e){this._setupContainer()};return a}(a);c.EqualToFrame=e;e.prototype.__class__="egret.EqualToFrame";d=function(){function e(){}e.prototype.init=function(e){};e.prototype._apply=function(e,a,c){};e.prototype.setEgretSize=function(e,a,d,l,n){"undefined"===typeof n&&(n=0);c.StageDelegate.getInstance()._stageWidth=e;c.StageDelegate.getInstance()._stageHeight=
  66. a;e=document.getElementById(b.canvas_div_name);e.style.width=d+"px";e.style.height=l+"px";e.style.top=n+"px"};return e}();c.ContentStrategy=d;d.prototype.__class__="egret.ContentStrategy";var l=function(e){function a(c){"undefined"===typeof c&&(c=0);e.call(this);this.minWidth=c}__extends(a,e);a.prototype._apply=function(e,a,c){a=document.documentElement.clientWidth;var b=document.documentElement.clientHeight,d=b/c,l=a/d,n=1;0!=this.minWidth&&(n=Math.min(1,l/this.minWidth));this.setEgretSize(l/n,c,
  67. a,b*n);e._scaleX=d*n;e._scaleY=d*n};return a}(d);c.FixedHeight=l;l.prototype.__class__="egret.FixedHeight";l=function(e){function a(c){"undefined"===typeof c&&(c=0);e.call(this);this.minHeight=c}__extends(a,e);a.prototype._apply=function(e,a,c){c=document.documentElement.clientWidth;var b=document.documentElement.clientHeight,d=c/a,l=b/d,n=1;0!=this.minHeight&&(n=Math.min(1,l/this.minHeight));this.setEgretSize(a,l/n,c*n,b);e._scaleX=d*n;e._scaleY=d*n};return a}(d);c.FixedWidth=l;l.prototype.__class__=
  68. "egret.FixedWidth";l=function(e){function a(c,b){e.call(this);this.width=c;this.height=b}__extends(a,e);a.prototype._apply=function(e,a,c){c=this.width;var b=this.height,d=c/a;this.setEgretSize(a,b/d,c,b);e._scaleX=d;e._scaleY=d};return a}(d);c.FixedSize=l;l.prototype.__class__="egret.FixedSize";l=function(e){function a(){e.call(this)}__extends(a,e);a.prototype._apply=function(e,a,c){this.setEgretSize(a,c,a,c);e._scaleX=1;e._scaleY=1};return a}(d);c.NoScale=l;l.prototype.__class__="egret.NoScale";
  69. l=function(e){function a(){e.call(this)}__extends(a,e);a.prototype._apply=function(e,a,c){var b=document.documentElement.clientWidth,d=document.documentElement.clientHeight,b=b/a<d/c?b/a:d/c,d=c*b;e._offSetY=Math.floor((document.documentElement.clientHeight-d)/2);this.setEgretSize(a,c/1,a*b*1,d,e._offSetY);e._scaleX=1*b;e._scaleY=1*b};return a}(d);c.ShowAll=l;l.prototype.__class__="egret.ShowAll";d=function(e){function a(){e.call(this)}__extends(a,e);a.prototype._apply=function(e,a,c){var b=document.documentElement.clientWidth,
  70. d=document.documentElement.clientHeight,b=b/a,d=d/c;this.setEgretSize(a,c,a*b,c*d);e._scaleX=b;e._scaleY=d};return a}(d);c.FullScreen=d;d.prototype.__class__="egret.FullScreen"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  71. (function(c){var b=function(b){function a(){b.call(this);this._originalData={};this._drawAreaList=[]}__extends(a,b);a.getInstance=function(){null==a.instance&&(a.instance=new a);return a.instance};a.prototype.addDrawArea=function(e){this._drawAreaList.push(e)};a.prototype.clearDrawArea=function(){this._drawAreaList=[]};a.prototype.drawImage=function(e,a,b,d,f,h,k,p,m,q){k=k||0;p=p||0;var s=a._texture_to_render;if(null!=s&&0!=h&&0!=f&&0!=m&&0!=q)if(a._worldBounds){var r=this._originalData;r.sourceX=
  72. b;r.sourceY=d;r.sourceWidth=f;r.sourceHeight=h;r.destX=k;r.destY=p;r.destWidth=m;r.destHeight=q;for(var t=this.getDrawAreaList(),u=0;u<t.length;u++){var v=t[u];if(!this.ignoreRender(a,v,r.destX,r.destY)){if(0!=this._drawAreaList.length)if(0!=a._worldTransform.b||0!=a._worldTransform.c){if(a._worldBounds.x+r.destX<v.x||a._worldBounds.y+r.destY<v.y||a._worldBounds.x+a._worldBounds.width+r.destX>v.x+v.width||a._worldBounds.y+a._worldBounds.height+r.destY>v.y+v.height){c.Logger.fatal("\u8bf7\u4e0d\u8981\u8ba9\u5e26\u6709\u65cb\u8f6c\u548c\u659c\u5207\u7684\u663e\u793a\u5bf9\u8c61\u8de8\u8fc7\u91cd\u7ed8\u533a\u57df");
  73. break}}else{var x=a._worldTransform.a,y=a._worldTransform.d,w;a._worldBounds.x+r.destX<v.x&&(w=(v.x-a._worldBounds.x)/x-r.destX,b+=w/(m/f),f-=w/(m/f),m-=w,k+=w);a._worldBounds.y+r.destY<v.y&&(w=(v.y-a._worldBounds.y)/y-r.destY,d+=w/(q/h),h-=w/(q/h),q-=w,p+=w);a._worldBounds.x+a._worldBounds.width+r.destX>v.x+v.width&&(w=(a._worldBounds.x+a._worldBounds.width-v.x-v.width)/x+r.destX,f-=w/(m/f),m-=w);a._worldBounds.y+a._worldBounds.height+r.destY>v.y+v.height&&(w=(a._worldBounds.y+a._worldBounds.height-
  74. v.y-v.height)/y+r.destY,h-=w/(q/h),q-=w)}e.drawImage(s,b,d,f,h,k,p,m,q)}}}else e.drawImage(s,b,d,f,h,k,p,m,q)};a.prototype.ignoreRender=function(e,a,c,b){var d=e._worldBounds;c*=e._worldTransform.a;b*=e._worldTransform.d;return d.x+d.width+c<=a.x||d.x+c>=a.x+a.width||d.y+d.height+b<=a.y||d.y+b>=a.y+a.height?!0:!1};a.prototype.getDrawAreaList=function(){var e;0==this._drawAreaList.length?(this._defaultDrawAreaList||(this._defaultDrawAreaList=[new c.Rectangle(0,0,c.MainContext.instance.stage.stageWidth,
  75. c.MainContext.instance.stage.stageHeight)]),e=this._defaultDrawAreaList):e=this._drawAreaList;return e};return a}(c.HashObject);c.RenderFilter=b;b.prototype.__class__="egret.RenderFilter"})(egret||(egret={}));
  76. (function(c){var b=function(){function b(){}b.mapClass=function(a,e,c){"undefined"===typeof c&&(c="");a=this.getKey(a)+"#"+c;this.mapClassDic[a]=e};b.getKey=function(a){return"string"==typeof a?a:c.getQualifiedClassName(a)};b.mapValue=function(a,e,c){"undefined"===typeof c&&(c="");a=this.getKey(a)+"#"+c;this.mapValueDic[a]=e};b.hasMapRule=function(a,e){"undefined"===typeof e&&(e="");var c=this.getKey(a)+"#"+e;return this.mapValueDic[c]||this.mapClassDic[c]?!0:!1};b.getInstance=function(a,e){"undefined"===
  77. typeof e&&(e="");var c=this.getKey(a)+"#"+e;if(this.mapValueDic[c])return this.mapValueDic[c];var b=this.mapClassDic[c];if(b)return b=new b,this.mapValueDic[c]=b,delete this.mapClassDic[c],b;throw Error("\u8c03\u7528\u4e86\u672a\u914d\u7f6e\u7684\u6ce8\u5165\u89c4\u5219:"+c+"\u3002 \u8bf7\u5148\u5728\u9879\u76ee\u521d\u59cb\u5316\u91cc\u914d\u7f6e\u6307\u5b9a\u7684\u6ce8\u5165\u89c4\u5219\uff0c\u518d\u8c03\u7528\u5bf9\u5e94\u5355\u4f8b\u3002");};b.mapClassDic={};b.mapValueDic={};return b}();c.Injector=
  78. b;b.prototype.__class__="egret.Injector"})(egret||(egret={}));(function(c){var b=function(){function c(){}c.NORMAL="normal";c.ADD="add";c.LAYER="layer";return c}();c.BlendMode=b;b.prototype.__class__="egret.BlendMode"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  79. (function(c){var b=function(b){function a(){b.call(this);this._sizeDirty=this._normalDirty=!0;this._parent=null;this._cacheAsBitmap=!1;this._y=this._x=0;this._scaleY=this._scaleX=1;this._anchorY=this._anchorX=this._anchorOffsetY=this._anchorOffsetX=0;this._visible=!0;this._rotation=0;this._alpha=1;this._skewY=this._skewX=0;this._hasHeightSet=this._hasWidthSet=!1;this.worldAlpha=1;this._rectH=this._rectW=0;this._stage=null;this._worldTransform=new c.Matrix;this._cacheBounds=new c.Rectangle(0,0,0,0)}
  80. __extends(a,b);a.prototype._setDirty=function(){this._normalDirty=!0};a.prototype.getDirty=function(){return this._normalDirty||this._sizeDirty};a.prototype._setParentSizeDirty=function(){var e=this._parent;!e||e._hasWidthSet||e._hasHeightSet||e._setSizeDirty()};a.prototype._setSizeDirty=function(){this._sizeDirty||(this._sizeDirty=!0,this._setDirty(),this._setParentSizeDirty())};a.prototype._clearDirty=function(){this._normalDirty=!1};a.prototype._clearSizeDirty=function(){this._sizeDirty=!1};Object.defineProperty(a.prototype,
  81. "parent",{get:function(){return this._parent},enumerable:!0,configurable:!0});a.prototype._parentChanged=function(e){this._parent=e};Object.defineProperty(a.prototype,"x",{get:function(){return this._x},set:function(e){this._setX(e)},enumerable:!0,configurable:!0});a.prototype._setX=function(e){c.NumberUtils.isNumber(e)&&this._x!=e&&(this._x=e,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(a.prototype,"y",{get:function(){return this._y},set:function(e){this._setY(e)},enumerable:!0,
  82. configurable:!0});a.prototype._setY=function(e){c.NumberUtils.isNumber(e)&&this._y!=e&&(this._y=e,this._setDirty(),this._setParentSizeDirty())};Object.defineProperty(a.prototype,"scaleX",{get:function(){return this._scaleX},set:function(e){c.NumberUtils.isNumber(e)&&this._scaleX!=e&&(this._scaleX=e,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"scaleY",{get:function(){return this._scaleY},set:function(e){c.NumberUtils.isNumber(e)&&
  83. this._scaleY!=e&&(this._scaleY=e,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorOffsetX",{get:function(){return this._anchorOffsetX},set:function(e){c.NumberUtils.isNumber(e)&&this._anchorOffsetX!=e&&(this._anchorOffsetX=e,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorOffsetY",{get:function(){return this._anchorOffsetY},set:function(e){c.NumberUtils.isNumber(e)&&
  84. this._anchorOffsetY!=e&&(this._anchorOffsetY=e,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorX",{get:function(){return this._anchorX},set:function(e){c.NumberUtils.isNumber(e)&&this._anchorX!=e&&(this._anchorX=e,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorY",{get:function(){return this._anchorY},set:function(e){c.NumberUtils.isNumber(e)&&this._anchorY!=
  85. e&&(this._anchorY=e,this._setDirty(),this._setParentSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"visible",{get:function(){return this._visible},set:function(e){this._setVisible(e)},enumerable:!0,configurable:!0});a.prototype._setVisible=function(e){this._visible!=e&&(this._visible=e,this._setSizeDirty())};Object.defineProperty(a.prototype,"rotation",{get:function(){return this._rotation},set:function(e){c.NumberUtils.isNumber(e)&&this._rotation!=e&&(this._rotation=
  86. e,this._setSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"alpha",{get:function(){return this._alpha},set:function(e){c.NumberUtils.isNumber(e)&&this._alpha!=e&&(this._alpha=e,this._setDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"skewX",{get:function(){return this._skewX},set:function(e){c.NumberUtils.isNumber(e)&&this._skewX!=e&&(this._skewX=e,this._setSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
  87. "skewY",{get:function(){return this._skewY},set:function(e){c.NumberUtils.isNumber(e)&&this._skewY!=e&&(this._skewY=e,this._setSizeDirty())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"touchEnabled",{get:function(){return this._touchEnabled},set:function(e){this._touchEnabled=e},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"scrollRect",{get:function(){return this._scrollRect},set:function(e){this._scrollRect=e;this._setSizeDirty()},enumerable:!0,configurable:!0});
  88. Object.defineProperty(a.prototype,"measuredWidth",{get:function(){return this._measureBounds().width},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"measuredHeight",{get:function(){return this._measureBounds().height},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"explicitWidth",{get:function(){return this._explicitWidth},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"explicitHeight",{get:function(){return this._explicitHeight},enumerable:!0,
  89. configurable:!0});Object.defineProperty(a.prototype,"width",{get:function(){return this._getSize(c.Rectangle.identity).width},set:function(e){this._setWidth(e)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this._getSize(c.Rectangle.identity).height},set:function(e){this._setHeight(e)},enumerable:!0,configurable:!0});a.prototype._setWidth=function(e){this._setSizeDirty();this._explicitWidth=e;this._hasWidthSet=c.NumberUtils.isNumber(e)};a.prototype._setHeight=
  90. function(e){this._setSizeDirty();this._explicitHeight=e;this._hasHeightSet=c.NumberUtils.isNumber(e)};a.prototype._draw=function(e){if(this._visible&&!this.drawCacheTexture(e)){e.setAlpha(this.worldAlpha,this.blendMode);e.setTransform(this._worldTransform);var a=this.mask||this._scrollRect;a&&e.pushMask(a);this._render(e);a&&e.popMask()}this.destroyCacheBounds()};a.prototype.drawCacheTexture=function(e){if(this._cacheAsBitmap){var a=this._texture_to_render,b=a._offsetX,d=a._offsetY,f=a._textureWidth,
  91. a=a._textureHeight;this._updateTransform();e.setAlpha(this.worldAlpha,this.blendMode);e.setTransform(this._worldTransform);var h=c.MainContext.instance.rendererContext.texture_scale_factor;c.RenderFilter.getInstance().drawImage(e,this,0,0,f*h,a*h,b,d,f,a);return!0}return!1};a.prototype._updateTransform=function(){this._calculateWorldform()};a.prototype._calculateWorldform=function(){this._worldTransform.identityMatrix(this._parent._worldTransform);var e=this._getOffsetPoint();this._worldTransform.appendTransform(this._x,
  92. this._y,this._scaleX,this._scaleY,this._rotation,this._skewX,this._skewY,e.x,e.y);this._scrollRect&&this._worldTransform.append(1,0,0,1,-this._scrollRect.x,-this._scrollRect.y);this.worldAlpha=this._parent.worldAlpha*this._alpha};a.prototype._render=function(e){};a.prototype.getBounds=function(e){var a=this._measureBounds(),b=this._hasWidthSet?this._explicitWidth:a.width,d=this._hasHeightSet?this._explicitHeight:a.height,f=a.x,a=a.y,h,k;0!=this._anchorX||0!=this._anchorY?(h=b*this._anchorX,k=d*this._anchorY):
  93. (h=this._anchorOffsetX,k=this._anchorOffsetY);this._cacheBounds.initialize(f-h,a-k,b,d);b=this._cacheBounds;e||(e=new c.Rectangle);return e.initialize(b.x,b.y,b.width,b.height)};a.prototype.destroyCacheBounds=function(){this._cacheBounds.x=0;this._cacheBounds.y=0;this._cacheBounds.width=0;this._cacheBounds.height=0};a.prototype._getConcatenatedMatrix=function(){for(var e=a.identityMatrixForGetConcatenated.identity(),b=this;null!=b;){if(0!=b._anchorX||0!=b._anchorY){var d=b._getSize(c.Rectangle.identity);
  94. e.prependTransform(b._x,b._y,b._scaleX,b._scaleY,b._rotation,b._skewX,b._skewY,d.width*b._anchorX,d.height*b._anchorY)}else e.prependTransform(b._x,b._y,b._scaleX,b._scaleY,b._rotation,b._skewX,b._skewY,b._anchorOffsetX,b._anchorOffsetY);b=b._parent}return e};a.prototype.localToGlobal=function(e,a,b){"undefined"===typeof e&&(e=0);"undefined"===typeof a&&(a=0);var d=this._getConcatenatedMatrix();d.append(1,0,0,1,e,a);b||(b=new c.Point);b.x=d.tx;b.y=d.ty;return b};a.prototype.globalToLocal=function(a,
  95. b,d){"undefined"===typeof a&&(a=0);"undefined"===typeof b&&(b=0);var g=this._getConcatenatedMatrix();g.invert();g.append(1,0,0,1,a,b);d||(d=new c.Point);d.x=g.tx;d.y=g.ty;return d};a.prototype.hitTest=function(a,b,d){"undefined"===typeof d&&(d=!1);if(!this._visible||!d&&!this._touchEnabled)return null;d=this._getSize(c.Rectangle.identity);return 0<=a&&a<d.width&&0<=b&&b<d.height?this.mask||this._scrollRect?this._scrollRect&&a<this._scrollRect.width&&b<this._scrollRect.height||this.mask&&this.mask.x<=
  96. a&&a<this.mask.x+this.mask.width&&this.mask.y<=b&&b<this.mask.y+this.mask.height?this:null:this:null};a.prototype.hitTestPoint=function(a,b,d){a=this.globalToLocal(a,b);return d?(this._hitTestPointTexture||(this._hitTestPointTexture=new c.RenderTexture),d=this._hitTestPointTexture,d.drawToTexture(this),0!=d.getPixel32(a.x-this._hitTestPointTexture._offsetX,a.y-this._hitTestPointTexture._offsetY)[3]?!0:!1):!!this.hitTest(a.x,a.y,!0)};a.prototype._getMatrix=function(){var a=c.Matrix.identity.identity(),
  97. b=this._getOffsetPoint();a.appendTransform(this._x,this._y,this._scaleX,this._scaleY,this._rotation,this._skewX,this._skewY,b.x,b.y);return a};a.prototype._getSize=function(a){return this._hasHeightSet&&this._hasWidthSet?a.initialize(0,0,this._explicitWidth,this._explicitHeight):this._measureSize(c.Rectangle.identity)};a.prototype._measureSize=function(a){this._sizeDirty?(a=this._measureBounds(),this._rectW=a.width,this._rectH=a.height,this._clearSizeDirty()):(a.width=this._rectW,a.height=this._rectH);
  98. return a};a.prototype._measureBounds=function(){return c.Rectangle.identity.initialize(0,0,0,0)};a.prototype._getOffsetPoint=function(){var a=this._anchorOffsetX,b=this._anchorOffsetY;if(0!=this._anchorX||0!=this._anchorY)b=this._getSize(c.Rectangle.identity),a=this._anchorX*b.width,b=this._anchorY*b.height;var d=c.Point.identity;d.x=a;d.y=b;return d};a.prototype._onAddToStage=function(){this._stage=c.MainContext.instance.stage;c.DisplayObjectContainer.__EVENT__ADD_TO_STAGE_LIST.push(this)};a.prototype._onRemoveFromStage=
  99. function(){this._stage=null;c.DisplayObjectContainer.__EVENT__REMOVE_FROM_STAGE_LIST.push(this)};Object.defineProperty(a.prototype,"stage",{get:function(){return this._stage},enumerable:!0,configurable:!0});a.prototype.addEventListener=function(e,l,n,g,f){"undefined"===typeof g&&(g=!1);"undefined"===typeof f&&(f=0);b.prototype.addEventListener.call(this,e,l,n,g,f);((g=e==c.Event.ENTER_FRAME)||e==c.Event.RENDER)&&this._insertEventBin(g?a._enterFrameCallBackList:a._renderCallBackList,l,n,f)};a.prototype.removeEventListener=
  100. function(e,l,n,g){"undefined"===typeof g&&(g=!1);b.prototype.removeEventListener.call(this,e,l,n,g);((g=e==c.Event.ENTER_FRAME)||e==c.Event.RENDER)&&this._removeEventBin(g?a._enterFrameCallBackList:a._renderCallBackList,l,n)};a.prototype.dispatchEvent=function(a){if(!a._bubbles)return b.prototype.dispatchEvent.call(this,a);for(var c=[],n=this;n;)c.push(n),n=n._parent;a._reset();this._dispatchPropagationEvent(a,c);return!a._isDefaultPrevented};a.prototype._dispatchPropagationEvent=function(a,c,b){b=
  101. c.length;for(var d=1,f=b-1;0<=f;f--){var h=c[f];a._currentTarget=h;a._target=this;a._eventPhase=d;h._notifyListener(a);if(a._isPropagationStopped||a._isPropagationImmediateStopped)return}h=c[0];a._currentTarget=h;a._target=this;a._eventPhase=2;h._notifyListener(a);if(!a._isPropagationStopped&&!a._isPropagationImmediateStopped)for(d=3,f=1;f<b&&(h=c[f],a._currentTarget=h,a._target=this,a._eventPhase=d,h._notifyListener(a),!a._isPropagationStopped&&!a._isPropagationImmediateStopped);f++);};a.prototype.willTrigger=
  102. function(a){for(var c=this;c;){if(c.hasEventListener(a))return!0;c=c._parent}return!1};Object.defineProperty(a.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(a){(this._cacheAsBitmap=a)?(this.renderTexture||(this.renderTexture=new c.RenderTexture),this.renderTexture.drawToTexture(this),this._texture_to_render=this.renderTexture):this._texture_to_render=null},enumerable:!0,configurable:!0});a.getTransformBounds=function(a,c){var b,d,f=a.width,h=a.height,k=f*c.a,f=
  103. f*c.b,p=h*c.c,h=h*c.d,m=c.tx,q=c.ty,s=m,r=m,t=q,u=q;(b=k+m)<s?s=b:b>r&&(r=b);(b=k+p+m)<s?s=b:b>r&&(r=b);(b=p+m)<s?s=b:b>r&&(r=b);(d=f+q)<t?t=d:d>u&&(u=d);(d=f+h+q)<t?t=d:d>u&&(u=d);(d=h+q)<t?t=d:d>u&&(u=d);return a.initialize(s,t,r-s,u-t)};a.identityMatrixForGetConcatenated=new c.Matrix;a._enterFrameCallBackList=[];a._renderCallBackList=[];return a}(c.EventDispatcher);c.DisplayObject=b;b.prototype.__class__="egret.DisplayObject"})(egret||(egret={}));
  104. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  105. (function(c){var b=function(b){function a(){b.call(this);this._touchChildren=!0;this._children=[]}__extends(a,b);Object.defineProperty(a.prototype,"touchChildren",{get:function(){return this._touchChildren},set:function(a){this._touchChildren=a},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"numChildren",{get:function(){return this._children.length},enumerable:!0,configurable:!0});a.prototype.setChildIndex=function(a,c){this.doSetChildIndex(a,c)};a.prototype.doSetChildIndex=function(a,
  106. b){var d=this._children.indexOf(a);0>d&&c.Logger.fatal("child\u4e0d\u5728\u5f53\u524d\u5bb9\u5668\u5185");this._children.splice(d,1);0>b||this._children.length<=b?this._children.push(a):this._children.splice(b,0,a)};a.prototype.addChild=function(a){var c=this._children.length;a._parent==this&&c--;return this._doAddChild(a,c)};a.prototype.addChildAt=function(a,c){return this._doAddChild(a,c)};a.prototype._doAddChild=function(e,b,d){"undefined"===typeof d&&(d=!0);if(e==this)return e;if(0>b||b>this._children.length)return c.Logger.fatal("\u63d0\u4f9b\u7684\u7d22\u5f15\u8d85\u51fa\u8303\u56f4"),
  107. e;var g=e._parent;if(g==this)return this.doSetChildIndex(e,b),e;g&&g.removeChild(e);this._children.splice(b,0,e);e._parentChanged(this);d&&e.dispatchEventWith(c.Event.ADDED,!0);if(this._stage)for(e._onAddToStage(),b=a.__EVENT__ADD_TO_STAGE_LIST;0<b.length;)b.shift().dispatchEventWith(c.Event.ADDED_TO_STAGE);e._setDirty();this._setSizeDirty();return e};a.prototype.removeChild=function(a){a=this._children.indexOf(a);if(0<=a)return this._doRemoveChild(a);c.Logger.fatal("child\u672a\u88abaddChild\u5230\u8be5parent");
  108. return null};a.prototype.removeChildAt=function(a){if(0<=a&&a<this._children.length)return this._doRemoveChild(a);c.Logger.fatal("\u63d0\u4f9b\u7684\u7d22\u5f15\u8d85\u51fa\u8303\u56f4");return null};a.prototype._doRemoveChild=function(e,b){"undefined"===typeof b&&(b=!0);var d=this._children,g=d[e];b&&g.dispatchEventWith(c.Event.REMOVED,!0);if(this._stage){g._onRemoveFromStage();for(var f=a.__EVENT__REMOVE_FROM_STAGE_LIST;0<f.length;)f.shift().dispatchEventWith(c.Event.REMOVED_FROM_STAGE)}g._parentChanged(null);
  109. d.splice(e,1);this._setSizeDirty();return g};a.prototype.getChildAt=function(a){if(0<=a&&a<this._children.length)return this._children[a];c.Logger.fatal("\u63d0\u4f9b\u7684\u7d22\u5f15\u8d85\u51fa\u8303\u56f4");return null};a.prototype.contains=function(a){for(;a;){if(a==this)return!0;a=a._parent}return!1};a.prototype.swapChildrenAt=function(a,b){0<=a&&a<this._children.length&&0<=b&&b<this._children.length?this._swapChildrenAt(a,b):c.Logger.fatal("\u63d0\u4f9b\u7684\u7d22\u5f15\u8d85\u51fa\u8303\u56f4")};
  110. a.prototype.swapChildren=function(a,b){var d=this._children.indexOf(a),g=this._children.indexOf(b);-1==d||-1==g?c.Logger.fatal("child\u672a\u88abaddChild\u5230\u8be5parent"):this._swapChildrenAt(d,g)};a.prototype._swapChildrenAt=function(a,c){if(a!=c){var b=this._children,d=b[a];b[a]=b[c];b[c]=d}};a.prototype.getChildIndex=function(a){return this._children.indexOf(a)};a.prototype.removeChildren=function(){for(var a=this._children.length-1;0<=a;a--)this._doRemoveChild(a)};a.prototype._updateTransform=
  111. function(){if(this._visible){b.prototype._updateTransform.call(this);for(var a=0,c=this._children.length;a<c;a++)this._children[a]._updateTransform()}};a.prototype._render=function(a){for(var c=0,b=this._children.length;c<b;c++)this._children[c]._draw(a)};a.prototype._measureBounds=function(){for(var a=0,b=0,d=0,g=0,f=this._children.length,h=0;h<f;h++){var k=this._children[h],p;if(k._visible&&(p=c.DisplayObject.getTransformBounds(k._getSize(c.Rectangle.identity),k._getMatrix()))){var k=p.x,m=p.y,
  112. q=p.width+p.x,s=p.height+p.y;if(k<a||0==h)a=k;if(q>b||0==h)b=q;if(m<d||0==h)d=m;if(s>g||0==h)g=s}}return c.Rectangle.identity.initialize(a,d,b-a,g-d)};a.prototype.hitTest=function(a,l,n){"undefined"===typeof n&&(n=!1);var g;if(!this._visible)return null;if(this._scrollRect){if(0>a||0>l||a>this._scrollRect.width||l>this._scrollRect.height)return null}else if(this.mask&&(this.mask.x>a||a>this.mask.x+this.mask.width||this.mask.y>l||l>this.mask.y+this.mask.height))return null;for(var f=this._children,
  113. h=this._touchChildren,k=f.length-1;0<=k;k--){var p=f[k],m=p,q=m._getOffsetPoint(),s=m._x,r=m._y;this._scrollRect&&(s-=this._scrollRect.x,r-=this._scrollRect.y);m=c.Matrix.identity.identity().prependTransform(s,r,m._scaleX,m._scaleY,m._rotation,0,0,q.x,q.y);m.invert();m=c.Matrix.transformCoords(m,a,l);if(p=p.hitTest(m.x,m.y,!0)){if(!h)return this;if(p._touchEnabled&&h)return p;g=this}}return g?g:this._texture_to_render||this.graphics?b.prototype.hitTest.call(this,a,l,n):null};a.prototype._onAddToStage=
  114. function(){b.prototype._onAddToStage.call(this);for(var a=this._children.length,c=0;c<a;c++)this._children[c]._onAddToStage()};a.prototype._onRemoveFromStage=function(){b.prototype._onRemoveFromStage.call(this);for(var a=this._children.length,c=0;c<a;c++)this._children[c]._onRemoveFromStage()};a.prototype.getChildByName=function(a){for(var c=this._children,b=c.length,d,f=0;f<b;f++)if(d=c[f],d.name==a)return d;return null};a.__EVENT__ADD_TO_STAGE_LIST=[];a.__EVENT__REMOVE_FROM_STAGE_LIST=[];return a}(c.DisplayObject);
  115. c.DisplayObjectContainer=b;b.prototype.__class__="egret.DisplayObjectContainer"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  116. (function(c){var b=function(b){function a(a,c){"undefined"===typeof a&&(a=480);"undefined"===typeof c&&(c=800);b.call(this);this.touchEnabled=!0;this._stage=this;this._stageWidth=a;this._stageHeight=c}__extends(a,b);a.prototype.invalidate=function(){a._invalidateRenderFlag=!0};Object.defineProperty(a.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(a){if(this._scaleMode!=a){this._scaleMode=a;var b={};b[c.StageScaleMode.NO_SCALE]=new c.NoScale;b[c.StageScaleMode.SHOW_ALL]=
  117. new c.ShowAll;b[c.StageScaleMode.NO_BORDER]=new c.FixedWidth;b[c.StageScaleMode.EXACT_FIT]=new c.FullScreen;a=b[a];if(!a)throw Error("\u4f7f\u7528\u4e86\u5c1a\u672a\u5b9e\u73b0\u7684ScaleMode");b=new c.EqualToFrame;a=new c.ResolutionPolicy(b,a);c.StageDelegate.getInstance()._setResolutionPolicy(a);this._stageWidth=c.StageDelegate.getInstance()._stageWidth;this._stageHeight=c.StageDelegate.getInstance()._stageHeight;this.dispatchEventWith(c.Event.RESIZE)}},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
  118. "stageWidth",{get:function(){return this._stageWidth},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"stageHeight",{get:function(){return this._stageHeight},enumerable:!0,configurable:!0});a.prototype.hitTest=function(a,b){if(!this._touchEnabled)return null;var d;if(!this._touchChildren)return this;for(var g=this._children,f=g.length-1;0<=f;f--){var h=d=g[f],k=h._getOffsetPoint(),h=c.Matrix.identity.identity().prependTransform(h._x,h._y,h._scaleX,h._scaleY,h._rotation,0,0,k.x,k.y);
  119. h.invert();h=c.Matrix.transformCoords(h,a,b);if((d=d.hitTest(h.x,h.y,!0))&&d._touchEnabled)return d}return this};a.prototype.getBounds=function(a){a||(a=new c.Rectangle);return a.initialize(0,0,this._stageWidth,this._stageHeight)};a.prototype._updateTransform=function(){for(var a=0,c=this._children.length;a<c;a++)this._children[a]._updateTransform()};a._invalidateRenderFlag=!1;return a}(c.DisplayObjectContainer);c.Stage=b;b.prototype.__class__="egret.Stage"})(egret||(egret={}));
  120. (function(c){var b=function(){function c(){}c.NO_BORDER="noBorder";c.NO_SCALE="noScale";c.SHOW_ALL="showAll";c.EXACT_FIT="exactFit";return c}();c.StageScaleMode=b;b.prototype.__class__="egret.StageScaleMode"})(egret||(egret={}));(function(c){var b=function(){function c(){}c.REPEAT="repeat";c.SCALE="scale";return c}();c.BitmapFillMode=b;b.prototype.__class__="egret.BitmapFillMode"})(egret||(egret={}));
  121. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  122. (function(c){var b=function(b){function a(a){b.call(this);this.debug=!1;this.debugColor=16711680;this.fillMode="scale";a&&(this._texture=a,this._setSizeDirty())}__extends(a,b);Object.defineProperty(a.prototype,"texture",{get:function(){return this._texture},set:function(a){a!=this._texture&&(this._setSizeDirty(),this._texture=a)},enumerable:!0,configurable:!0});a.prototype._render=function(e){var c=this._texture;c?(this._texture_to_render=c,a._drawBitmap(e,this._hasWidthSet?this._explicitWidth:c._textureWidth,
  123. this._hasHeightSet?this._explicitHeight:c._textureHeight,this)):this._texture_to_render=null};a._drawBitmap=function(e,b,d,g){var f=g._texture_to_render;if(f){var h=f._textureWidth,k=f._textureHeight;if("scale"==g.fillMode){var p=g.scale9Grid||f.scale9Grid;if(p&&h-p.width<b&&k-p.height<d)a.drawScale9GridImage(e,g,p,b,d);else{var p=f._offsetX,m=f._offsetY,q=f._bitmapWidth||h,s=f._bitmapHeight||k;b/=h;p=Math.round(p*b);b=Math.round(q*b);d/=k;m=Math.round(m*d);d=Math.round(s*d);c.RenderFilter.getInstance().drawImage(e,
  124. g,f._bitmapX,f._bitmapY,q,s,p,m,b,d)}}else a.drawRepeatImage(e,g,b,d)}};a.drawRepeatImage=function(a,b,d,g){var f=b._texture_to_render;if(f)for(var h=f._textureWidth,k=f._textureHeight,p=f._bitmapX,m=f._bitmapY,q=f._bitmapWidth||h,s=f._bitmapHeight||k,r=f._offsetX,f=f._offsetY,t=c.RenderFilter.getInstance();r<d;r+=h)for(var u=f;u<g;u+=k){var v=Math.min(q,d-r),x=Math.min(s,g-u);t.drawImage(a,b,p,m,v,x,r,u,v,x)}};a.drawScale9GridImage=function(a,b,d,g,f){var h=b._texture_to_render;if(h&&d){var k=c.RenderFilter.getInstance(),
  125. p=h._textureWidth,m=h._textureHeight,q=h._bitmapX,s=h._bitmapY,r=h._bitmapWidth||p,t=h._bitmapHeight||m,u=h._offsetX,h=h._offsetY;d=c.Rectangle.identity.initialize(d.x-Math.round(u),d.y-Math.round(u),d.width,d.height);u=Math.round(u);h=Math.round(h);g-=p-r;f-=m-t;d.y==d.bottom&&(d.bottom<t?d.bottom++:d.y--);d.x==d.right&&(d.right<r?d.right++:d.x--);var p=q+d.x,m=q+d.right,v=r-d.right,x=s+d.y,y=s+d.bottom,w=t-d.bottom,z=u+d.x,A=h+d.y,t=f-(t-d.bottom),r=g-(r-d.right);k.drawImage(a,b,q,s,d.x,d.y,u,h,
  126. d.x,d.y);k.drawImage(a,b,p,s,d.width,d.y,z,h,r-d.x,d.y);k.drawImage(a,b,m,s,v,d.y,u+r,h,g-r,d.y);k.drawImage(a,b,q,x,d.x,d.height,u,A,d.x,t-d.y);k.drawImage(a,b,p,x,d.width,d.height,z,A,r-d.x,t-d.y);k.drawImage(a,b,m,x,v,d.height,u+r,A,g-r,t-d.y);k.drawImage(a,b,q,y,d.x,w,u,h+t,d.x,f-t);k.drawImage(a,b,p,y,d.width,w,z,h+t,r-d.x,f-t);k.drawImage(a,b,m,y,v,w,u+r,h+t,g-r,f-t)}};a.prototype._measureBounds=function(){var a=this._texture;return a?c.Rectangle.identity.initialize(a._offsetX,a._offsetY,a._textureWidth,
  127. a._textureHeight):b.prototype._measureBounds.call(this)};a.debug=!1;return a}(c.DisplayObject);c.Bitmap=b;b.prototype.__class__="egret.Bitmap"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  128. (function(c){var b=function(b){function a(){b.call(this);this._text="";this._textChanged=!1;this._bitmapPool=[]}__extends(a,b);Object.defineProperty(a.prototype,"text",{get:function(){return this._text},set:function(a){this._textChanged=!0;this._text=a},enumerable:!0,configurable:!0});a.prototype._updateTransform=function(){this.visible&&(this._textChanged&&this._renderText(),b.prototype._updateTransform.call(this))};a.prototype._renderText=function(a){var b=a=0;this._textChanged&&this.removeChildren();
  129. for(var d=0,g=this.text.length;d<g;d++){var f=this.text.charAt(d),h=this.spriteSheet.getTexture(f);if(null==h)console.log("\u5f53\u524d\u6ca1\u6709\u4f4d\u56fe\u6587\u5b57\uff1a"+f);else{var f=h._offsetX,k=h._offsetY,p=h._textureWidth;if(this._textChanged){var m=this._bitmapPool[d];m||(m=new c.Bitmap,this._bitmapPool.push(m));m.texture=h;this.addChild(m);m.x=a}a+=p+f;k+h._textureHeight>b&&(b=k+h._textureHeight)}}this._textChanged=!1;return c.Rectangle.identity.initialize(0,0,a,b)};a.prototype._measureBounds=
  130. function(){return this._renderText(!0)};return a}(c.DisplayObjectContainer);c.BitmapText=b;b.prototype.__class__="egret.BitmapText"})(egret||(egret={}));
  131. (function(c){var b=function(){function c(){this._lastY=this._lastX=this._maxY=this._maxX=this._minY=this._minX=0;this.commandQueue=[]}c.prototype.beginFill=function(a,e){};c.prototype._setStyle=function(a){};c.prototype.drawRect=function(a,e,c,b){this.checkRect(a,e,c,b)};c.prototype.drawCircle=function(a,e,c){this.checkRect(a-c,e-c,2*c,2*c)};c.prototype.drawRoundRect=function(a,e,c,b,d,f){this.checkRect(a,e,c,b)};c.prototype.drawEllipse=function(a,e,c,b){this.checkRect(a-c,e-b,2*c,2*b)};c.prototype.lineStyle=
  132. function(a,e,c,b,d,f,h,k){};c.prototype.lineTo=function(a,e){this.checkPoint(a,e)};c.prototype.curveTo=function(a,e,c,b){this.checkPoint(a,e);this.checkPoint(c,b)};c.prototype.moveTo=function(a,e){this.checkPoint(a,e)};c.prototype.clear=function(){this._maxY=this._maxX=this._minY=this._minX=0};c.prototype.endFill=function(){};c.prototype._draw=function(a){};c.prototype.checkRect=function(a,e,c,b){this._minX=Math.min(this._minX,a);this._minY=Math.min(this._minY,e);this._maxX=Math.max(this._maxX,a+
  133. c);this._maxY=Math.max(this._maxY,e+b)};c.prototype.checkPoint=function(a,e){this._minX=Math.min(this._minX,a);this._minY=Math.min(this._minY,e);this._maxX=Math.max(this._maxX,a);this._maxY=Math.max(this._maxY,e);this._lastX=a;this._lastY=e};return c}();c.Graphics=b;b.prototype.__class__="egret.Graphics";(function(){return function(c,a,e){this.method=c;this.thisObject=a;this.args=e}})().prototype.__class__="Command"})(egret||(egret={}));
  134. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  135. (function(c){var b=function(b){function a(){b.call(this)}__extends(a,b);Object.defineProperty(a.prototype,"graphics",{get:function(){this._graphics||(this._graphics=new c.Graphics);return this._graphics},enumerable:!0,configurable:!0});a.prototype._render=function(a){this._graphics&&this._graphics._draw(a)};return a}(c.DisplayObject);c.Shape=b;b.prototype.__class__="egret.Shape"})(egret||(egret={}));
  136. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  137. (function(c){var b=function(b){function a(){b.call(this)}__extends(a,b);Object.defineProperty(a.prototype,"graphics",{get:function(){this._graphics||(this._graphics=new c.Graphics);return this._graphics},enumerable:!0,configurable:!0});a.prototype._render=function(a){this._graphics&&this._graphics._draw(a);b.prototype._render.call(this,a)};return a}(c.DisplayObjectContainer);c.Sprite=b;b.prototype.__class__="egret.Sprite"})(egret||(egret={}));
  138. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  139. (function(c){var b=function(b){function a(){b.call(this);this._fontFamily="Arial";this._size=30;this._textColorString="#FFFFFF";this._textColor=16777215;this._strokeColorString="#000000";this._stroke=this._strokeColor=0;this._textAlign="left";this._verticalAlign="top";this._numLines=this._lineSpacing=0;this.measuredWidths=[]}__extends(a,b);Object.defineProperty(a.prototype,"text",{get:function(){return this._text},set:function(a){this._setText(a)},enumerable:!0,configurable:!0});a.prototype._setTextDirty=
  140. function(){this._setSizeDirty()};a.prototype._setText=function(a){this._text!=a&&(this._setTextDirty(),this._text=a)};Object.defineProperty(a.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(a){this._setFontFamily(a)},enumerable:!0,configurable:!0});a.prototype._setFontFamily=function(a){this._fontFamily!=a&&(this._setTextDirty(),this._fontFamily=a)};Object.defineProperty(a.prototype,"size",{get:function(){return this._size},set:function(a){this._setSize(a)},enumerable:!0,
  141. configurable:!0});a.prototype._setSize=function(a){this._size!=a&&(this._setTextDirty(),this._size=a)};Object.defineProperty(a.prototype,"italic",{get:function(){return this._italic},set:function(a){this._setItalic(a)},enumerable:!0,configurable:!0});a.prototype._setItalic=function(a){this._italic!=a&&(this._setTextDirty(),this._italic=a)};Object.defineProperty(a.prototype,"bold",{get:function(){return this._bold},set:function(a){this._setBold(a)},enumerable:!0,configurable:!0});a.prototype._setBold=
  142. function(a){this._bold!=a&&(this._setTextDirty(),this._bold=a)};Object.defineProperty(a.prototype,"textColor",{get:function(){return this._textColor},set:function(a){this._setTextColor(a)},enumerable:!0,configurable:!0});a.prototype._setTextColor=function(a){this._textColor!=a&&(this._setTextDirty(),this._textColor=a,this._textColorString=c.toColorString(a))};Object.defineProperty(a.prototype,"strokeColor",{get:function(){return this._strokeColor},set:function(a){this._setStrokeColor(a)},enumerable:!0,
  143. configurable:!0});a.prototype._setStrokeColor=function(a){this._strokeColor!=a&&(this._setTextDirty(),this._strokeColor=a,this._strokeColorString=c.toColorString(a))};Object.defineProperty(a.prototype,"stroke",{get:function(){return this._stroke},set:function(a){this._setStroke(a)},enumerable:!0,configurable:!0});a.prototype._setStroke=function(a){this._stroke!=a&&(this._setTextDirty(),this._stroke=a)};Object.defineProperty(a.prototype,"textAlign",{get:function(){return this._textAlign},set:function(a){this._setTextAlign(a)},
  144. enumerable:!0,configurable:!0});a.prototype._setTextAlign=function(a){this._textAlign!=a&&(this._setTextDirty(),this._textAlign=a)};Object.defineProperty(a.prototype,"verticalAlign",{get:function(){return this._verticalAlign},set:function(a){this._setVerticalAlign(a)},enumerable:!0,configurable:!0});a.prototype._setVerticalAlign=function(a){this._verticalAlign!=a&&(this._setTextDirty(),this._verticalAlign=a)};Object.defineProperty(a.prototype,"lineSpacing",{get:function(){return this._lineSpacing},
  145. set:function(a){this._setLineSpacing(a)},enumerable:!0,configurable:!0});a.prototype._setLineSpacing=function(a){this._lineSpacing!=a&&(this._setTextDirty(),this._lineSpacing=a)};Object.defineProperty(a.prototype,"numLines",{get:function(){return this._numLines},enumerable:!0,configurable:!0});a.prototype._render=function(a){this.drawText(a,!1);this._clearDirty()};a.prototype._measureBounds=function(){return this.drawText(c.MainContext.instance.rendererContext,!0)};a.prototype.drawText=function(a,
  146. b){var d=this.getTextLines(a);if(!d)return c.Rectangle.identity.initialize(0,0,0,0);var g=d.length,f=0.5*this._size,h=this._size+this._lineSpacing,k=g*h-this._lineSpacing;this._textHeight=k;var p=this._hasHeightSet?this._explicitHeight:Number.POSITIVE_INFINITY;if(this._hasHeightSet&&k<p){var m=0;this._verticalAlign==c.VerticalAlign.MIDDLE?m=0.5:this._verticalAlign==c.VerticalAlign.BOTTOM&&(m=1);f+=m*(p-k)}var m=f=Math.round(f),q=0;this._textAlign==c.HorizontalAlign.CENTER?q=0.5:this._textAlign==c.HorizontalAlign.RIGHT&&
  147. (q=1);var s=this.measuredWidths,r;r=this._hasWidthSet?this._explicitWidth:this._textWidth;for(var t=Number.POSITIVE_INFINITY,u=0;u<g;u++){var v=d[u],x=Math.round((r-s[u])*q);x<t&&(t=x);!b&&f<p&&a.drawText(this,v,x,f,r);f+=h}return c.Rectangle.identity.initialize(t,m,r,k)};a.prototype.getTextLines=function(a){var c=this._text?this._text.toString():"";if(!c)return null;var b=this.measuredWidths;b.length=0;a.setupFont(this);var c=c.split(/(?:\r\n|\r|\n)/),d=c.length,f=0;if(this._hasWidthSet)for(var h=
  148. this._explicitWidth,k=0;k<d;k++){var p=c[k],m=a.measureText(p);if(m>h){for(var q="",s=0,r=p.length,t=0;t<r;t++){var u=p.charAt(t),m=a.measureText(u);s+m>h&&(0==s?(c.splice(k,0,u),b[k]=m,f<m&&(f=m),m=0,u=""):(c.splice(k,0,q),b[k]=s,f<s&&(f=s),q="",s=0),k++,d++);s+=m;q+=u}c[k]=q;b[k]=s}else b[k]=m,f<m&&(f=m)}else for(k=0;k<d;k++)p=c[k],m=a.measureText(p),b[k]=m,f<m&&(f=m);this._textWidth=f;return c};return a}(c.DisplayObject);c.TextField=b;b.prototype.__class__="egret.TextField"})(egret||(egret={}));
  149. (function(c){var b=function(){function c(){}c.DYNAMIC="dynamic";c.INPUT="input";return c}();c.TextFieldType=b;b.prototype.__class__="egret.TextFieldType"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  150. (function(c){var b=function(b){function a(a){b.call(this);var c=a.bitmapData;this.bitmapData=c;this._textureMap={};this._sourceWidth=c.width;this._sourceHeight=c.height;this._bitmapX=a._bitmapX-a._offsetX;this._bitmapY=a._bitmapY-a._offsetY}__extends(a,b);a.prototype.getTexture=function(a){return this._textureMap[a]};a.prototype.createTexture=function(a,b,d,g,f,h,k,p,m){"undefined"===typeof h&&(h=0);"undefined"===typeof k&&(k=0);"undefined"===typeof p&&(p=h+g);"undefined"===typeof m&&(m=k+f);var q=
  151. new c.Texture;q._bitmapData=this.bitmapData;q._bitmapX=this._bitmapX+b;q._bitmapY=this._bitmapY+d;q._bitmapWidth=g;q._bitmapHeight=f;q._offsetX=h;q._offsetY=k;q._textureWidth=p;q._textureHeight=m;q._sourceWidth=this._sourceWidth;q._sourceHeight=this._sourceHeight;return this._textureMap[a]=q};return a}(c.HashObject);c.SpriteSheet=b;b.prototype.__class__="egret.SpriteSheet"})(egret||(egret={}));
  152. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  153. (function(c){var b=function(b){function a(){b.call(this);this._isFocus=!1;this._size=30;this._textColorString="#FFFFFF";this._textColor=16777215;this._fontFamily="Arial";this._multiline=!1;this._text=new c.TextField;this.addChild(this._text);this._text.size=30;this.stageText=c.StageText.create();var a=this.localToGlobal();this.stageText._open(a.x,a.y,this._explicitWidth,this._explicitHeight)}__extends(a,b);a.prototype._onAddToStage=function(){b.prototype._onAddToStage.call(this);this.graphics.beginFill(16777215,
  154. 0);this.graphics.drawRect(0,0,this.width,this.height);this.graphics.endFill();this.touchEnabled=!0;this.stageText._addListeners();this.stageText.addEventListener("blur",this.onBlurHandler,this);this.stageText.addEventListener("focus",this.onFocusHandler,this);this.stageText.addEventListener("updateText",this.updateTextHandler,this);this.addEventListener(c.TouchEvent.TOUCH_BEGIN,this.onMouseDownHandler,this);c.MainContext.instance.stage.addEventListener(c.TouchEvent.TOUCH_BEGIN,this.onStageDownHandler,
  155. this)};a.prototype.onFocusHandler=function(a){this.hideText()};a.prototype.onBlurHandler=function(a){this.showText()};a.prototype.onMouseDownHandler=function(a){a.stopPropagation();this.stageText._show()};a.prototype.onStageDownHandler=function(a){this.stageText._hide();this.showText()};a.prototype.showText=function(){this._isFocus&&(this._isFocus=!1,this._text.visible=!0,this.resetText())};a.prototype.hideText=function(){this._isFocus||(this._text.visible=!1,this._isFocus=!0)};a.prototype._onRemoveFromStage=
  156. function(){b.prototype._onRemoveFromStage.call(this);this.stageText._remove();this.stageText._removeListeners();this.stageText.removeEventListener("blur",this.onBlurHandler,this);this.stageText.removeEventListener("focus",this.onFocusHandler,this);this.stageText.removeEventListener("updateText",this.updateTextHandler,this);this.removeEventListener(c.TouchEvent.TOUCH_BEGIN,this.onMouseDownHandler,this);c.MainContext.instance.stage.removeEventListener(c.TouchEvent.TOUCH_BEGIN,this.onStageDownHandler,
  157. this)};a.prototype.updateTextHandler=function(a){this.resetText()};a.prototype.setText=function(a){c.Logger.warning("TextInput.setText()\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528TextInput.text\u8bbe\u7f6e");this.stageText._setText(a);this.resetText()};a.prototype.getText=function(){c.Logger.warning("TextInput.getText()\u5df2\u5e9f\u5f03\uff0c\u8bf7\u4f7f\u7528TextInput.text\u83b7\u53d6");return this.stageText._getText()};Object.defineProperty(a.prototype,"text",{get:function(){return this.stageText._getText()},
  158. set:function(a){this.stageText._setText(a);this.resetText()},enumerable:!0,configurable:!0});a.prototype.setTextType=function(a){this.stageText._setTextType(a);this.resetText()};a.prototype.getTextType=function(){return this.stageText._getTextType()};a.prototype.resetText=function(){if("password"==this.getTextType()){this._text.text="";for(var a=0,c=this.stageText._getText().length;a<c;a++)this._text.text+="*"}else this._text.text=this.stageText._getText()};a.prototype._updateTransform=function(){var a=
  159. this._worldTransform.a,c=this._worldTransform.b,n=this._worldTransform.c,g=this._worldTransform.d,f=this._worldTransform.tx,h=this._worldTransform.ty;b.prototype._updateTransform.call(this);var k=this._worldTransform;if(a!=k.a||c!=k.b||n!=k.c||g!=k.d||f!=k.tx||h!=k.ty)a=this.localToGlobal(),this.stageText.changePosition(a.x,a.y),this.stageText.changeSize(this._explicitWidth,this._explicitHeight)};a.prototype._draw=function(a){b.prototype._draw.call(this,a);this.stageText._draw()};Object.defineProperty(a.prototype,
  160. "size",{get:function(){return this._size},set:function(a){this._size!=a&&(this._size=a,this._text.size=a,this.stageText.setSize(this._size))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"textColor",{get:function(){return this._textColor},set:function(a){this._textColor!=a&&(this._textColor=a,this._textColorString=c.toColorString(a),this._text.textColor=a,this.stageText.setTextColor(this._textColorString))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"fontFamily",
  161. {get:function(){return this._fontFamily},set:function(a){this._setFontFamily(a)},enumerable:!0,configurable:!0});a.prototype._setFontFamily=function(a){this._fontFamily!=a&&(this._fontFamily=a,this.stageText.setTextFontFamily(a))};a.prototype._setWidth=function(a){this._text.width=a;this.stageText.setWidth(a);b.prototype._setWidth.call(this,a)};a.prototype._setHeight=function(a){this._text.height=a;this.stageText.setHeight(a);b.prototype._setHeight.call(this,a)};a.prototype._setMultiline=function(a){this._multiline=
  162. a;this.stageText._setMultiline(a)};Object.defineProperty(a.prototype,"multiline",{get:function(){return this._multiline},set:function(a){this._setMultiline(a)},enumerable:!0,configurable:!0});return a}(c.Sprite);c.TextInput=b;b.prototype.__class__="egret.TextInput"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  163. (function(c){var b=function(c){function a(a,b){c.call(this,a);this.charList=this.parseConfig(b)}__extends(a,c);a.prototype.getTexture=function(a){var c=this._textureMap[a];if(!c){c=this.charList[a];if(!c)return null;c=this.createTexture(a,c.x,c.y,c.width,c.height,c.offsetX,c.offsetY);this._textureMap[a]=c}return c};a.prototype.parseConfig=function(a){a=a.split("\r\n").join("\n");a=a.split("\n");for(var c=this.getConfigByKey(a[3],"count"),b={},d=4;d<4+c;d++){var f=a[d],h=String.fromCharCode(this.getConfigByKey(f,
  164. "id")),k={};b[h]=k;k.x=this.getConfigByKey(f,"x");k.y=this.getConfigByKey(f,"y");k.width=this.getConfigByKey(f,"width");k.height=this.getConfigByKey(f,"height");k.offsetX=this.getConfigByKey(f,"xoffset");k.offsetY=this.getConfigByKey(f,"yoffset")}return b};a.prototype.getConfigByKey=function(a,c){for(var b=a.split(" "),d=0,f=b.length;d<f;d++){var h=b[d];if(c==h.substring(0,c.length))return b=h.substring(c.length+1),parseInt(b)}return 0};return a}(c.SpriteSheet);c.BitmapTextSpriteSheet=b;b.prototype.__class__=
  165. "egret.BitmapTextSpriteSheet"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  166. (function(c){var b=function(a){function b(e,n){a.call(this);this.frameRate=60;e instanceof d?(c.Logger.warning("MovieClip#constructor\u63a5\u53e3\u53c2\u6570\u5df2\u7ecf\u53d8\u66f4\uff0c\u8bf7\u5c3d\u5feb\u8c03\u6574\u7528\u6cd5\u4e3a new MovieClip(data,texture)"),this.delegate=e):this.delegate=new d(e,n);this.delegate.setMovieClip(this)}__extends(b,a);b.prototype.gotoAndPlay=function(a){this.delegate.gotoAndPlay(a)};b.prototype.gotoAndStop=function(a){this.delegate.gotoAndStop(a)};b.prototype.stop=
  167. function(){this.delegate.stop()};b.prototype.dispose=function(){this.delegate.dispose()};b.prototype.release=function(){c.Logger.warning("MovieClip#release\u65b9\u6cd5\u5373\u5c06\u5e9f\u5f03");this.dispose()};b.prototype.getCurrentFrameIndex=function(){c.Logger.warning("MovieClip#getCurrentFrameIndex\u65b9\u6cd5\u5373\u5c06\u5e9f\u5f03");return this.delegate._currentFrameIndex};b.prototype.getTotalFrame=function(){c.Logger.warning("MovieClip#getTotalFrame\u65b9\u6cd5\u5373\u5c06\u5e9f\u5f03");return this.delegate._totalFrame};
  168. b.prototype.setInterval=function(a){c.Logger.warning("MovieClip#setInterval\u65b9\u6cd5\u5373\u5c06\u5e9f\u5f03,\u8bf7\u4f7f\u7528MovieClip#frameRate\u4ee3\u66ff");this.frameRate=60/a};b.prototype.getIsPlaying=function(){c.Logger.warning("MovieClip#getIsPlaying\u65b9\u6cd5\u5373\u5c06\u5e9f\u5f03");return this.delegate.isPlaying};return b}(c.DisplayObjectContainer);c.MovieClip=b;b.prototype.__class__="egret.MovieClip";var d=function(){function a(a,b){this.data=a;this._currentFrameIndex=this._passTime=
  169. this._totalFrame=0;this._isPlaying=!1;this._frameData=a;this._spriteSheet=new c.SpriteSheet(b)}a.prototype.setMovieClip=function(a){this.movieClip=a;this.bitmap=new c.Bitmap;this.movieClip.addChild(this.bitmap)};a.prototype.gotoAndPlay=function(a){this.checkHasFrame(a);this._isPlaying=!0;this._currentFrameIndex=0;this._currentFrameName=a;this._totalFrame=this._frameData.frames[a].totalFrame;this.playNextFrame();this._passTime=0;c.Ticker.getInstance().register(this.update,this)};a.prototype.gotoAndStop=
  170. function(a){this.checkHasFrame(a);this.stop();this._currentFrameIndex=this._passTime=0;this._currentFrameName=a;this._totalFrame=this._frameData.frames[a].totalFrame;this.playNextFrame()};a.prototype.stop=function(){this._isPlaying=!1;c.Ticker.getInstance().unregister(this.update,this)};a.prototype.dispose=function(){};a.prototype.checkHasFrame=function(a){void 0==this._frameData.frames[a]&&c.Logger.fatal("MovieClip\u6ca1\u6709\u5bf9\u5e94\u7684frame\uff1a",a)};a.prototype.update=function(a){for(var c=
  171. 1E3/this.movieClip.frameRate,c=Math.floor((this._passTime%c+a)/c);1<=c;)1==c?this.playNextFrame():this.playNextFrame(!1),c--;this._passTime+=a};a.prototype.playNextFrame=function(a){"undefined"===typeof a&&(a=!0);var c=this._frameData.frames[this._currentFrameName].childrenFrame[this._currentFrameIndex];if(a){a=this.getTexture(c.res);var b=this.bitmap;b.x=c.x;b.y=c.y;b.texture=a}null!=c.action&&this.movieClip.dispatchEventWith(c.action);this._currentFrameIndex++;this._currentFrameIndex==this._totalFrame&&
  172. (this._currentFrameIndex=0)};a.prototype.getTexture=function(a){var c=this._frameData.res[a],b=this._spriteSheet.getTexture(a);b||(b=this._spriteSheet.createTexture(a,c.x,c.y,c.w,c.h));return b};return a}();c.DefaultMovieClipDelegate=d;d.prototype.__class__="egret.DefaultMovieClipDelegate"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  173. (function(c){var b=function(c){function a(){c.call(this);this._multiline=!1;this._maxChars=0}__extends(a,c);a.prototype._getText=function(){return null};a.prototype._setText=function(a){};a.prototype._setTextType=function(a){};a.prototype._getTextType=function(){return null};a.prototype._open=function(a,c,b,d){};a.prototype._show=function(){};a.prototype._remove=function(){};a.prototype._hide=function(){};a.prototype._draw=function(){};a.prototype._addListeners=function(){};a.prototype._removeListeners=
  174. function(){};a.prototype.changePosition=function(a,c){};a.prototype.changeSize=function(a,c){};a.prototype.setSize=function(a){};a.prototype.setTextColor=function(a){};a.prototype.setTextFontFamily=function(a){};a.prototype.setWidth=function(a){};a.prototype.setHeight=function(a){};a.prototype._setMultiline=function(a){this._multiline=a};a.create=function(){return null};return a}(c.EventDispatcher);c.StageText=b;b.prototype.__class__="egret.StageText"})(egret||(egret={}));
  175. (function(c){var b=function(){function c(){}c.GET="get";c.POST="post";return c}();c.URLRequestMethod=b;b.prototype.__class__="egret.URLRequestMethod"})(egret||(egret={}));(function(c){var b=function(){function c(){}c.BINARY="binary";c.TEXT="text";c.VARIABLES="variables";c.TEXTURE="texture";c.SOUND="sound";return c}();c.URLLoaderDataFormat=b;b.prototype.__class__="egret.URLLoaderDataFormat"})(egret||(egret={}));
  176. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  177. (function(c){var b=function(c){function a(a){"undefined"===typeof a&&(a=null);c.call(this);null!==a&&this.decode(a)}__extends(a,c);a.prototype.decode=function(a){this.variables||(this.variables={});a=a.split("+").join(" ");for(var c,b=/[?&]?([^=]+)=([^&]*)/g;c=b.exec(a);)this.variables[decodeURIComponent(c[1])]=decodeURIComponent(c[2])};a.prototype.toString=function(){if(!this.variables)return"";var a=this.variables,c="",b=!0,d;for(d in a)b?b=!1:c+="&",c+=d+"="+a[d];return c};return a}(c.HashObject);
  178. c.URLVariables=b;b.prototype.__class__="egret.URLVariables"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};(function(c){var b=function(b){function a(a){"undefined"===typeof a&&(a=null);b.call(this);this.method=c.URLRequestMethod.GET;this.url=a}__extends(a,b);return a}(c.HashObject);c.URLRequest=b;b.prototype.__class__="egret.URLRequest"})(egret||(egret={}));
  179. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  180. (function(c){var b=function(b){function a(a){"undefined"===typeof a&&(a=null);b.call(this);this.dataFormat=c.URLLoaderDataFormat.TEXT;a&&this.load(a)}__extends(a,b);a.prototype.load=function(a){this._request=a;this.data=null;c.MainContext.instance.netContext.proceed(this)};return a}(c.EventDispatcher);c.URLLoader=b;b.prototype.__class__="egret.URLLoader"})(egret||(egret={}));
  181. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  182. (function(c){var b=function(b){function a(){b.call(this);this._textureHeight=this._textureWidth=this._offsetY=this._offsetX=this._bitmapHeight=this._bitmapWidth=this._bitmapY=this._bitmapX=0}__extends(a,b);Object.defineProperty(a.prototype,"textureWidth",{get:function(){return this._textureWidth},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"textureHeight",{get:function(){return this._textureHeight},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"bitmapData",
  183. {get:function(){return this._bitmapData},enumerable:!0,configurable:!0});a.prototype._setBitmapData=function(a){var b=c.MainContext.instance.rendererContext.texture_scale_factor;this._bitmapData=a;this._sourceWidth=a.width;this._sourceHeight=a.height;this._textureWidth=this._sourceWidth*b;this._textureHeight=this._sourceHeight*b;this._bitmapWidth=this._textureWidth;this._bitmapHeight=this._textureHeight;this._offsetX=this._offsetY=this._bitmapX=this._bitmapY=0};a.prototype.getPixel32=function(a,c){return this._bitmapData.getContext("2d").getImageData(a,
  184. c,1,1).data};return a}(c.HashObject);c.Texture=b;b.prototype.__class__="egret.Texture"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  185. (function(c){var b=function(b){function a(){b.call(this);this._bitmapData=document.createElement("canvas");this.renderContext=c.RendererContext.createRendererContext(this._bitmapData)}__extends(a,b);a.prototype.drawToTexture=function(a){var b=this._bitmapData,d=a.getBounds(c.Rectangle.identity);b.width=d.width;b.height=d.height;a._worldTransform.identity();a.worldAlpha=1;if(a instanceof c.DisplayObjectContainer){this._offsetX=d.x;this._offsetY=d.y;a._worldTransform.append(1,0,0,1,-d.x,-d.y);for(var b=
  186. a._children,d=0,g=b.length;d<g;d++)b[d]._updateTransform()}b=c.RenderFilter.getInstance();d=b._drawAreaList.concat();b._drawAreaList.length=0;this.renderContext.clearScreen();this.webGLTexture=null;(g=a.mask||a._scrollRect)&&this.renderContext.pushMask(g);a._render(this.renderContext);g&&this.renderContext.popMask();b._drawAreaList=d;this._textureWidth=this._bitmapData.width;this._textureHeight=this._bitmapData.height;this._sourceWidth=this._textureWidth;this._sourceHeight=this._textureHeight};return a}(c.Texture);
  187. c.RenderTexture=b;b.prototype.__class__="egret.RenderTexture"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  188. (function(c){var b=function(b){function a(){b.call(this);this.renderCost=0;this.texture_scale_factor=1}__extends(a,b);a.prototype.clearScreen=function(){};a.prototype.clearRect=function(a,c,b,d){};a.prototype.drawImage=function(a,b,d,g,f,h,k,p,m){c.Profiler.getInstance().onDrawImage()};a.prototype.setTransform=function(a){};a.prototype.setAlpha=function(a,c){};a.prototype.setupFont=function(a){};a.prototype.measureText=function(a){return 0};a.prototype.drawText=function(a,b,d,g,f){c.Profiler.getInstance().onDrawImage()};
  189. a.prototype.strokeRect=function(a,c,b,d,f){};a.prototype.pushMask=function(a){};a.prototype.popMask=function(){};a.prototype.onRenderStart=function(){};a.prototype.onRenderFinish=function(){};a.createRendererContext=function(a){return null};return a}(c.HashObject);c.RendererContext=b;b.prototype.__class__="egret.RendererContext"})(egret||(egret={}));
  190. (function(c){var b=function(){function c(){}c.MOUSE="mouse";c.TOUCH="touch";c.mode="touch";return c}();c.InteractionMode=b;b.prototype.__class__="egret.InteractionMode"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  191. (function(c){var b=function(b){function a(){b.call(this);this._currentTouchTarget={};this.maxTouches=2;this.touchDownTarget={};this.touchingIdentifiers=[];this.lastTouchY=this.lastTouchX=-1}__extends(a,b);a.prototype.run=function(){};a.prototype.getTouchData=function(a,c,b){var d=this._currentTouchTarget[a];null==d&&(d={},this._currentTouchTarget[a]=d);d.stageX=c;d.stageY=b;d.identifier=a;return d};a.prototype.dispatchEvent=function(a,b){c.TouchEvent.dispatchTouchEvent(b.target,a,b.identifier,b.stageX,
  192. b.stageY,!1,!1,!1,!0==this.touchDownTarget[b.identifier])};a.prototype.onTouchBegan=function(a,b,d){if(this.touchingIdentifiers.length!=this.maxTouches){var g=c.MainContext.instance.stage.hitTest(a,b);g&&(a=this.getTouchData(d,a,b),this.touchDownTarget[d]=!0,a.target=g,a.beginTarget=g,this.dispatchEvent(c.TouchEvent.TOUCH_BEGIN,a));this.touchingIdentifiers.push(d)}};a.prototype.onTouchMove=function(a,b,d){if(-1!=this.touchingIdentifiers.indexOf(d)&&(a!=this.lastTouchX||b!=this.lastTouchY)){this.lastTouchX=
  193. a;this.lastTouchY=b;var g=c.MainContext.instance.stage.hitTest(a,b);g&&(a=this.getTouchData(d,a,b),a.target=g,this.dispatchEvent(c.TouchEvent.TOUCH_MOVE,a))}};a.prototype.onTouchEnd=function(a,b,d){var g=this.touchingIdentifiers.indexOf(d);-1!=g&&(this.touchingIdentifiers.splice(g,1),g=c.MainContext.instance.stage.hitTest(a,b))&&(a=this.getTouchData(d,a,b),delete this.touchDownTarget[d],d=a.beginTarget,a.target=g,this.dispatchEvent(c.TouchEvent.TOUCH_END,a),d==g?this.dispatchEvent(c.TouchEvent.TOUCH_TAP,
  194. a):a.beginTarget&&(a.target=a.beginTarget,this.dispatchEvent(c.TouchEvent.TOUCH_RELEASE_OUTSIDE,a)),delete this._currentTouchTarget[a.identifier])};return a}(c.HashObject);c.TouchContext=b;b.prototype.__class__="egret.TouchContext"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  195. (function(c){var b=function(b){function a(){b.call(this)}__extends(a,b);a.prototype.proceed=function(a){};a._getUrl=function(a){var b=a.url;-1==b.indexOf("?")&&a.method==c.URLRequestMethod.GET&&a.data&&a.data instanceof c.URLVariables&&(b=b+"?"+a.data.toString());return b};return a}(c.HashObject);c.NetContext=b;b.prototype.__class__="egret.NetContext"})(egret||(egret={}));
  196. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};(function(c){var b=function(c){function a(){c.call(this);this.frameRate=60}__extends(a,c);a.prototype.executeMainLoop=function(a,c){};return a}(c.HashObject);c.DeviceContext=b;b.prototype.__class__="egret.DeviceContext"})(egret||(egret={}));
  197. (function(c){var b=function(){function c(){}c.call=function(a,c){};c.addCallback=function(a,c){};return c}();c.ExternalInterface=b;b.prototype.__class__="egret.ExternalInterface"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  198. (function(c){var b=function(b){function a(){b.call(this);this.translate=this.isHD?function(a){return"translate3d("+a.x+"px, "+(a.y-c.MainContext.instance.stage.stageHeight)+"px, 0) "}:function(a){return"translate("+a.x+"px, "+a.y+"px) "};this.rotate=this.isHD?function(a){return"rotateZ("+a+"deg) "}:function(a){return"rotate("+a+"deg) "};this.ua=navigator.userAgent.toLowerCase();var a=this.ua.match(/micromessenger|qqbrowser|mqqbrowser|ucbrowser|360browser|baidubrowser|maxthon|ie|opera|firefox/)||this.ua.match(/chrome|safari/);
  199. a&&0<a.length&&(a=a[0],"micromessenger"==a&&(this.type="wechat"),this.type=a);this.type="unknow";switch(this.type){case "firefox":this.pfx="Moz";this.isHD=!0;break;case "chrome":case "safari":this.pfx="webkit";this.isHD=!0;break;case "opera":this.pfx="O";this.isHD=!1;break;case "ie":this.pfx="ms";this.isHD=!1;break;default:this.pfx="webkit",this.isHD=!0}this.trans=this.pfx+"Transform"}__extends(a,b);a.getInstance=function(){null==a.instance&&(a.instance=new a);return a.instance};Object.defineProperty(a.prototype,
  200. "isMobile",{get:function(){c.Logger.warning("Browser.isMobile\u63a5\u53e3\u53c2\u6570\u5df2\u7ecf\u53d8\u66f4\uff0c\u8bf7\u5c3d\u5feb\u8c03\u6574\u7528\u6cd5\u4e3a egret.MainContext.deviceType == egret.MainContext.DEVICE_MOBILE ");return c.MainContext.deviceType==c.MainContext.DEVICE_MOBILE},enumerable:!0,configurable:!0});a.prototype.$new=function(a){return this.$(document.createElement(a))};a.prototype.$=function(b){var d=document;if(b=b instanceof HTMLElement?b:d.querySelector(b))b.find=b.find||
  201. this.$,b.hasClass=b.hasClass||function(a){return this.className.match(new RegExp("(\\s|^)"+a+"(\\s|$)"))},b.addClass=b.addClass||function(a){this.hasClass(a)||(this.className&&(this.className+=" "),this.className+=a);return this},b.removeClass=b.removeClass||function(a){this.hasClass(a)&&(this.className=this.className.replace(a,""));return this},b.remove=b.remove||function(){},b.appendTo=b.appendTo||function(a){a.appendChild(this);return this},b.prependTo=b.prependTo||function(a){a.childNodes[0]?
  202. a.insertBefore(this,a.childNodes[0]):a.appendChild(this);return this},b.transforms=b.transforms||function(){this.style[a.getInstance().trans]=a.getInstance().translate(this.position)+a.getInstance().rotate(this.rotation)+a.getInstance().scale(this.scale)+a.getInstance().skew(this.skew);return this},b.position=b.position||{x:0,y:0},b.rotation=b.rotation||0,b.scale=b.scale||{x:1,y:1},b.skew=b.skew||{x:0,y:0},b.translates=function(a,b){this.position.x=a;this.position.y=b-c.MainContext.instance.stage.stageHeight;
  203. this.transforms();return this},b.rotate=function(a){this.rotation=a;this.transforms();return this},b.resize=function(a,c){this.scale.x=a;this.scale.y=c;this.transforms();return this},b.setSkew=function(a,c){this.skew.x=a;this.skew.y=c;this.transforms();return this};return b};a.prototype.scale=function(a){return"scale("+a.x+", "+a.y+") "};a.prototype.skew=function(a){return"skewX("+-a.x+"deg) skewY("+a.y+"deg)"};return a}(c.HashObject);c.Browser=b;b.prototype.__class__="egret.Browser"})(egret||(egret=
  204. {}));(function(c){(function(c){c.getItem=function(c){return null};c.setItem=function(c,a){};c.removeItem=function(c){};c.clear=function(){}})(c.localStorage||(c.localStorage={}))})(egret||(egret={}));
  205. (function(c){var b=function(){function b(){}b.parse=function(a){a=c.SAXParser.getInstance().parserXML(a);if(!a||!a.childNodes)return null;for(var e=a.childNodes.length,l=!1,n=0;n<e;n++){var g=a.childNodes[n];if(1==g.nodeType){l=!0;break}}return l?b.parseNode(g):null};b.parseNode=function(a){if(!a||1!=a.nodeType)return null;var c={};c.localName=a.localName;c.name=a.nodeName;a.namespaceURI&&(c.namespace=a.namespaceURI);a.prefix&&(c.prefix=a.prefix);for(var l=a.attributes,n=l.length,g=0;g<n;g++){var f=
  206. l[g],h=f.name;0!=h.indexOf("xmlns:")&&(c["$"+h]=f.value)}l=a.childNodes;n=l.length;for(g=0;g<n;g++)if(f=b.parseNode(l[g]))c.children||(c.children=[]),f.parent=c,c.children.push(f);!c.children&&(a=a.textContent.trim())&&(c.text=a);return c};b.findChildren=function(a,c,l){l?l.length=0:l=[];b.findByPath(a,c,l);return l};b.findByPath=function(a,c,l){var n=c.indexOf("."),g;-1==n?(g=c,n=!0):(g=c.substring(0,n),c=c.substring(n+1),n=!1);if(a=a.children)for(var f=a.length,h=0;h<f;h++){var k=a[h];k.localName==
  207. g&&(n?l.push(k):b.findByPath(k,c,l))}};b.getAttributes=function(a,c){c?c.length=0:c=[];for(var b in a)"$"==b.charAt(0)&&c.push(b.substring(1));return c};return b}();c.XML=b;b.prototype.__class__="egret.XML"})(egret||(egret={}));
  208. (function(c){var b=function(){function a(){}a.LITTLE_ENDIAN="LITTLE_ENDIAN";a.BIG_ENDIAN="BIG_ENDIAN";return a}();c.Endian=b;b.prototype.__class__="egret.Endian";var d=function(){function a(){this.length=this.position=0;this._mode="";this.maxlength=0;this._endian=b.LITTLE_ENDIAN;this.isLittleEndian=!1;this._mode="Typed array";this.maxlength=4;this.arraybytes=new ArrayBuffer(this.maxlength);this.unalignedarraybytestemp=new ArrayBuffer(16);this.endian=a.DEFAULT_ENDIAN}Object.defineProperty(a.prototype,
  209. "endian",{get:function(){return this._endian},set:function(a){this._endian=a;this.isLittleEndian=a==b.LITTLE_ENDIAN},enumerable:!0,configurable:!0});a.prototype.ensureWriteableSpace=function(a){this.ensureSpace(a+this.position)};a.prototype.setArrayBuffer=function(a){this.ensureSpace(a.byteLength);this.length=a.byteLength;a=new Int8Array(a);(new Int8Array(this.arraybytes,0,this.length)).set(a);this.position=0};Object.defineProperty(a.prototype,"bytesAvailable",{get:function(){return this.length-this.position},
  210. enumerable:!0,configurable:!0});a.prototype.ensureSpace=function(a){if(a>this.maxlength){a=a+255&-256;var c=new ArrayBuffer(a),b=new Uint8Array(this.arraybytes,0,this.length);(new Uint8Array(c,0,this.length)).set(b);this.arraybytes=c;this.maxlength=a}};a.prototype.writeByte=function(a){this.ensureWriteableSpace(1);(new Int8Array(this.arraybytes))[this.position++]=~~a;this.position>this.length&&(this.length=this.position)};a.prototype.readByte=function(){if(this.position>=this.length)throw"ByteArray out of bounds read. Positon="+
  211. this.position+", Length="+this.length;return(new Int8Array(this.arraybytes))[this.position++]};a.prototype.readBytes=function(a,c,b){"undefined"===typeof c&&(c=0);"undefined"===typeof b&&(b=0);null==b&&(b=a.length);a.ensureWriteableSpace(c+b);var d=new Int8Array(a.arraybytes),f=new Int8Array(this.arraybytes);d.set(f.subarray(this.position,this.position+b),c);this.position+=b;b+c>a.length&&(a.length+=b+c-a.length)};a.prototype.writeUnsignedByte=function(a){this.ensureWriteableSpace(1);(new Uint8Array(this.arraybytes))[this.position++]=
  212. ~~a&255;this.position>this.length&&(this.length=this.position)};a.prototype.readUnsignedByte=function(){if(this.position>=this.length)throw"ByteArray out of bounds read. Positon="+this.position+", Length="+this.length;return(new Uint8Array(this.arraybytes))[this.position++]};a.prototype.writeUnsignedShort=function(a){this.ensureWriteableSpace(2);if(0==(this.position&1)){var c=new Uint16Array(this.arraybytes);c[this.position>>1]=~~a&65535}else c=new Uint16Array(this.unalignedarraybytestemp,0,1),c[0]=
  213. ~~a&65535,a=new Uint8Array(this.arraybytes,this.position,2),c=new Uint8Array(this.unalignedarraybytestemp,0,2),a.set(c);this.position+=2;this.position>this.length&&(this.length=this.position)};a.prototype.readUTFBytes=function(a){var c="";a=this.position+a;for(var b=new DataView(this.arraybytes);this.position<a;){var d=b.getUint8(this.position++);if(128>d){if(0==d)break;c+=String.fromCharCode(d)}else if(224>d)c+=String.fromCharCode((d&63)<<6|b.getUint8(this.position++)&127);else if(240>d)var f=b.getUint8(this.position++),
  214. c=c+String.fromCharCode((d&31)<<12|(f&127)<<6|b.getUint8(this.position++)&127);else var f=b.getUint8(this.position++),h=b.getUint8(this.position++),c=c+String.fromCharCode((d&15)<<18|(f&127)<<12|h<<6&127|b.getUint8(this.position++)&127)}return c};a.prototype.readInt=function(){var a=(new DataView(this.arraybytes)).getInt32(this.position,this.isLittleEndian);this.position+=4;return a};a.prototype.readShort=function(){var a=(new DataView(this.arraybytes)).getInt16(this.position,this.isLittleEndian);
  215. this.position+=2;return a};a.prototype.readDouble=function(){var a=(new DataView(this.arraybytes)).getFloat64(this.position,this.isLittleEndian);this.position+=8;return a};a.prototype.readUnsignedShort=function(){if(this.position>this.length+2)throw"ByteArray out of bounds read. Position="+this.position+", Length="+this.length;if(0==(this.position&1)){var a=new Uint16Array(this.arraybytes),c=this.position>>1;this.position+=2;return a[c]}a=new Uint16Array(this.unalignedarraybytestemp,0,1);c=new Uint8Array(this.arraybytes,
  216. this.position,2);(new Uint8Array(this.unalignedarraybytestemp,0,2)).set(c);this.position+=2;return a[0]};a.prototype.writeUnsignedInt=function(a){this.ensureWriteableSpace(4);if(0==(this.position&3)){var c=new Uint32Array(this.arraybytes);c[this.position>>2]=~~a&4294967295}else c=new Uint32Array(this.unalignedarraybytestemp,0,1),c[0]=~~a&4294967295,a=new Uint8Array(this.arraybytes,this.position,4),c=new Uint8Array(this.unalignedarraybytestemp,0,4),a.set(c);this.position+=4;this.position>this.length&&
  217. (this.length=this.position)};a.prototype.readUnsignedInt=function(){if(this.position>this.length+4)throw"ByteArray out of bounds read. Position="+this.position+", Length="+this.length;if(0==(this.position&3)){var a=new Uint32Array(this.arraybytes),c=this.position>>2;this.position+=4;return a[c]}a=new Uint32Array(this.unalignedarraybytestemp,0,1);c=new Uint8Array(this.arraybytes,this.position,4);(new Uint8Array(this.unalignedarraybytestemp,0,4)).set(c);this.position+=4;return a[0]};a.prototype.writeFloat=
  218. function(a){this.ensureWriteableSpace(4);if(0==(this.position&3)){var c=new Float32Array(this.arraybytes);c[this.position>>2]=a}else c=new Float32Array(this.unalignedarraybytestemp,0,1),c[0]=a,a=new Uint8Array(this.arraybytes,this.position,4),c=new Uint8Array(this.unalignedarraybytestemp,0,4),a.set(c);this.position+=4;this.position>this.length&&(this.length=this.position)};a.prototype.readFloat=function(){if(this.position>this.length+4)throw"ByteArray out of bounds read. Positon="+this.position+", Length="+
  219. this.length;if(0==(this.position&3)){var a=new Float32Array(this.arraybytes),c=this.position>>2;this.position+=4;return a[c]}a=new Float32Array(this.unalignedarraybytestemp,0,1);c=new Uint8Array(this.arraybytes,this.position,4);(new Uint8Array(this.unalignedarraybytestemp,0,4)).set(c);this.position+=4;return a[0]};a.DEFAULT_ENDIAN=b.BIG_ENDIAN;return a}();c.ByteArray=d;d.prototype.__class__="egret.ByteArray"})(egret||(egret={}));
  220. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  221. (function(c){var b=function(b){function a(a,c,n){b.call(this);this._target=null;this.loop=this.ignoreGlobalPause=this._useTicks=!1;this._actions=this._steps=this.pluginData=null;this.paused=!1;this.duration=0;this._prevPos=-1;this.position=null;this._stepPosition=this._prevPosition=0;this.passive=!1;this.initialize(a,c,n)}__extends(a,b);a.get=function(c,b,d,g){"undefined"===typeof b&&(b=null);"undefined"===typeof d&&(d=null);"undefined"===typeof g&&(g=!1);g&&a.removeTweens(c);return new a(c,b,d)};
  222. a.removeTweens=function(c){if(c.tween_count){for(var b=a._tweens,d=b.length-1;0<=d;d--)b[d]._target==c&&(b[d].paused=!0,b.splice(d,1));c.tween_count=0}};a.pauseTweens=function(a){if(a.tween_count)for(var b=c.Tween._tweens,d=b.length-1;0<=d;d--)b[d]._target==a&&(b[d].paused=!0)};a.resumeTweens=function(a){if(a.tween_count)for(var b=c.Tween._tweens,d=b.length-1;0<=d;d--)b[d]._target==a&&(b[d].paused=!1)};a.tick=function(c,b){"undefined"===typeof b&&(b=!1);for(var d=a._tweens.concat(),g=d.length-1;0<=
  223. g;g--){var f=d[g];b&&!f.ignoreGlobalPause||f.paused||f.tick(f._useTicks?1:c)}};a._register=function(b,d){var n=b._target,g=a._tweens;if(d)n&&(n.tween_count=n.tween_count?n.tween_count+1:1),g.push(b),a._inited||(c.Ticker.getInstance().register(a.tick,null),a._inited=!0);else for(n&&n.tween_count--,n=g.length;n--;)if(g[n]==b){g.splice(n,1);break}};a.removeAllTweens=function(){for(var c=a._tweens,b=0,d=c.length;b<d;b++){var g=c[b];g.paused=!0;g._target.tweenjs_count=0}c.length=0};a.prototype.initialize=
  224. function(c,b,d){this._target=c;b&&(this._useTicks=b.useTicks,this.ignoreGlobalPause=b.ignoreGlobalPause,this.loop=b.loop,b.onChange&&this.addEventListener("change",b.onChange,b.onChangeObj),b.override&&a.removeTweens(c));this.pluginData=d||{};this._curQueueProps={};this._initQueueProps={};this._steps=[];this._actions=[];b&&b.paused?this.paused=!0:a._register(this,!0);b&&null!=b.position&&this.setPosition(b.position,a.NONE)};a.prototype.setPosition=function(a,c){"undefined"===typeof c&&(c=1);0>a&&
  225. (a=0);var b=a,d=!1;b>=this.duration&&(this.loop?b%=this.duration:(b=this.duration,d=!0));if(b==this._prevPos)return d;var f=this._prevPos;this.position=this._prevPos=b;this._prevPosition=a;if(this._target)if(d)this._updateTargetProps(null,1);else if(0<this._steps.length){for(var h=0,k=this._steps.length;h<k&&!(this._steps[h].t>b);h++);h=this._steps[h-1];this._updateTargetProps(h,(this._stepPosition=b-h.t)/h.d)}0!=c&&0<this._actions.length&&(this._useTicks?this._runActions(b,b):1==c&&b<f?(f!=this.duration&&
  226. this._runActions(f,this.duration),this._runActions(0,b,!0)):this._runActions(f,b));d&&this.setPaused(!0);this.dispatchEventWith("change");return d};a.prototype._runActions=function(a,c,b){"undefined"===typeof b&&(b=!1);var d=a,f=c,h=-1,k=this._actions.length,p=1;a>c&&(d=c,f=a,h=k,k=p=-1);for(;(h+=p)!=k;){c=this._actions[h];var m=c.t;(m==f||m>d&&m<f||b&&m==a)&&c.f.apply(c.o,c.p)}};a.prototype._updateTargetProps=function(c,b){var d,g,f,h;if(c||1!=b){if(this.passive=!!c.v)return;c.e&&(b=c.e(b,0,1,1));
  227. d=c.p0;g=c.p1}else this.passive=!1,d=g=this._curQueueProps;for(var k in this._initQueueProps){null==(f=d[k])&&(d[k]=f=this._initQueueProps[k]);null==(h=g[k])&&(g[k]=h=f);f=f==h||0==b||1==b||"number"!=typeof f?1==b?h:f:f+(h-f)*b;var p=!1;if(h=a._plugins[k])for(var m=0,q=h.length;m<q;m++){var s=h[m].tween(this,k,f,d,g,b,!!c&&d==g,!c);s==a.IGNORE?p=!0:f=s}p||(this._target[k]=f)}};a.prototype.setPaused=function(c){this.paused=c;a._register(this,!c);return this};a.prototype._cloneProps=function(a){var c=
  228. {},b;for(b in a)c[b]=a[b];return c};a.prototype._addStep=function(a){0<a.d&&(this._steps.push(a),a.t=this.duration,this.duration+=a.d);return this};a.prototype._appendQueueProps=function(c){var b,d,g,f,h,k;for(k in c)if(void 0===this._initQueueProps[k]){d=this._target[k];if(b=a._plugins[k])for(g=0,f=b.length;g<f;g++)d=b[g].init(this,k,d);this._initQueueProps[k]=this._curQueueProps[k]=void 0===d?null:d}for(k in c){d=this._curQueueProps[k];if(b=a._plugins[k])for(h=h||{},g=0,f=b.length;g<f;g++)b[g].step&&
  229. b[g].step(this,k,d,c[k],h);this._curQueueProps[k]=c[k]}h&&this._appendQueueProps(h);return this._curQueueProps};a.prototype._addAction=function(a){a.t=this.duration;this._actions.push(a);return this};a.prototype._set=function(a,c){for(var b in a)c[b]=a[b]};a.prototype.wait=function(a,c){if(null==a||0>=a)return this;var b=this._cloneProps(this._curQueueProps);return this._addStep({d:a,p0:b,p1:b,v:c})};a.prototype.to=function(a,c,b){"undefined"===typeof b&&(b=void 0);if(isNaN(c)||0>c)c=0;return this._addStep({d:c||
  230. 0,p0:this._cloneProps(this._curQueueProps),e:b,p1:this._cloneProps(this._appendQueueProps(a))})};a.prototype.call=function(a,c,b){"undefined"===typeof c&&(c=void 0);"undefined"===typeof b&&(b=void 0);return this._addAction({f:a,p:b?b:[],o:c?c:this._target})};a.prototype.set=function(a,c){"undefined"===typeof c&&(c=null);return this._addAction({f:this._set,o:this,p:[a,c?c:this._target]})};a.prototype.play=function(a){a||(a=this);return this.call(a.setPaused,a,[!1])};a.prototype.pause=function(a){a||
  231. (a=this);return this.call(a.setPaused,a,[!0])};a.prototype.tick=function(a){this.paused||this.setPosition(this._prevPosition+a)};a.NONE=0;a.LOOP=1;a.REVERSE=2;a._tweens=[];a.IGNORE={};a._plugins={};a._inited=!1;return a}(c.EventDispatcher);c.Tween=b;b.prototype.__class__="egret.Tween"})(egret||(egret={}));
  232. (function(c){var b=function(){function b(){c.Logger.fatal("Ease\u4e0d\u80fd\u88ab\u5b9e\u4f8b\u5316")}b.get=function(a){-1>a&&(a=-1);1<a&&(a=1);return function(b){return 0==a?b:0>a?b*(b*-a+1+a):b*((2-b)*a+(1-a))}};b.getPowIn=function(a){return function(b){return Math.pow(b,a)}};b.getPowOut=function(a){return function(b){return 1-Math.pow(1-b,a)}};b.getPowInOut=function(a){return function(b){return 1>(b*=2)?0.5*Math.pow(b,a):1-0.5*Math.abs(Math.pow(2-b,a))}};b.sineIn=function(a){return 1-Math.cos(a*
  233. Math.PI/2)};b.sineOut=function(a){return Math.sin(a*Math.PI/2)};b.sineInOut=function(a){return-0.5*(Math.cos(Math.PI*a)-1)};b.getBackIn=function(a){return function(b){return b*b*((a+1)*b-a)}};b.getBackOut=function(a){return function(b){b-=1;return b*b*((a+1)*b+a)+1}};b.getBackInOut=function(a){a*=1.525;return function(b){return 1>(b*=2)?0.5*b*b*((a+1)*b-a):0.5*((b-=2)*b*((a+1)*b+a)+2)}};b.circIn=function(a){return-(Math.sqrt(1-a*a)-1)};b.circOut=function(a){return Math.sqrt(1-a*a)};b.circInOut=function(a){return 1>
  234. (a*=2)?-0.5*(Math.sqrt(1-a*a)-1):0.5*(Math.sqrt(1-(a-=2)*a)+1)};b.bounceIn=function(a){return 1-b.bounceOut(1-a)};b.bounceOut=function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375};b.bounceInOut=function(a){return 0.5>a?0.5*b.bounceIn(2*a):0.5*b.bounceOut(2*a-1)+0.5};b.getElasticIn=function(a,b){var c=2*Math.PI;return function(d){if(0==d||1==d)return d;var g=b/c*Math.asin(1/a);return-(a*Math.pow(2,10*
  235. (d-=1))*Math.sin((d-g)*c/b))}};b.getElasticOut=function(a,b){var c=2*Math.PI;return function(d){if(0==d||1==d)return d;var g=b/c*Math.asin(1/a);return a*Math.pow(2,-10*d)*Math.sin((d-g)*c/b)+1}};b.getElasticInOut=function(a,b){var c=2*Math.PI;return function(d){var g=b/c*Math.asin(1/a);return 1>(d*=2)?-0.5*a*Math.pow(2,10*(d-=1))*Math.sin((d-g)*c/b):a*Math.pow(2,-10*(d-=1))*Math.sin((d-g)*c/b)*0.5+1}};b.quadIn=b.getPowIn(2);b.quadOut=b.getPowOut(2);b.quadInOut=b.getPowInOut(2);b.cubicIn=b.getPowIn(3);
  236. b.cubicOut=b.getPowOut(3);b.cubicInOut=b.getPowInOut(3);b.quartIn=b.getPowIn(4);b.quartOut=b.getPowOut(4);b.quartInOut=b.getPowInOut(4);b.quintIn=b.getPowIn(5);b.quintOut=b.getPowOut(5);b.quintInOut=b.getPowInOut(5);b.backIn=b.getBackIn(1.7);b.backOut=b.getBackOut(1.7);b.backInOut=b.getBackInOut(1.7);b.elasticIn=b.getElasticIn(1,0.3);b.elasticOut=b.getElasticOut(1,0.3);b.elasticInOut=b.getElasticInOut(1,0.3*1.5);return b}();c.Ease=b;b.prototype.__class__="egret.Ease"})(egret||(egret={}));
  237. (function(c){var b=function(){function b(){this.type=b.EFFECT}b.prototype.play=function(a){"undefined"===typeof a&&(a=!1);var b=this.audio;b&&(isNaN(b.duration)||(b.currentTime=0),b.loop=a,b.play())};b.prototype.pause=function(){var a=this.audio;a&&a.pause()};b.prototype.load=function(){var a=this.audio;a&&a.load()};b.prototype.addEventListener=function(a,b){this.audio&&this.audio.addEventListener(a,b,!1)};b.prototype.removeEventListener=function(a,b){this.audio&&this.audio.removeEventListener(a,
  238. b,!1)};b.prototype.setVolume=function(a){var b=this.audio;b&&(b.volume=a)};b.prototype.getVolume=function(){return this.audio?this.audio.volume:0};b.prototype.preload=function(a){this.type=a};b.prototype._setAudio=function(a){this.audio=a};b.MUSIC="music";b.EFFECT="effect";return b}();c.Sound=b;b.prototype.__class__="egret.Sound"})(egret||(egret={}));
  239. (function(c){var b=function(){function b(){}b.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};return b}();c.NumberUtils=b;b.prototype.__class__="egret.NumberUtils"})(egret||(egret={}));
  240. Function.prototype.bind||(Function.prototype.bind=function(c){if("function"!==typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),d=this,a=function(){},e=function(){return d.apply(this instanceof a&&c?this:c,b.concat(Array.prototype.slice.call(arguments)))};a.prototype=this.prototype;e.prototype=new a;return e});
  241. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},RES;
  242. (function(c){var b=function(b){function a(a,c,n){"undefined"===typeof c&&(c=!1);"undefined"===typeof n&&(n=!1);b.call(this,a,c,n);this.itemsTotal=this.itemsLoaded=0}__extends(a,b);a.dispatchResourceEvent=function(b,c,d,g,f,h){"undefined"===typeof d&&(d="");"undefined"===typeof g&&(g=null);"undefined"===typeof f&&(f=0);"undefined"===typeof h&&(h=0);var k=egret.Event._getPropertyData(a);k.groupName=d;k.resItem=g;k.itemsLoaded=f;k.itemsTotal=h;egret.Event._dispatchByTarget(a,b,c,k)};a.ITEM_LOAD_ERROR=
  243. "itemLoadError";a.CONFIG_COMPLETE="configComplete";a.GROUP_PROGRESS="groupProgress";a.GROUP_COMPLETE="groupComplete";return a}(egret.Event);c.ResourceEvent=b;b.prototype.__class__="RES.ResourceEvent"})(RES||(RES={}));
  244. (function(c){var b=function(){function b(a,c,d){this._loaded=!1;this.name=a;this.url=c;this.type=d}Object.defineProperty(b.prototype,"loaded",{get:function(){return this.data?this.data.loaded:this._loaded},set:function(a){this.data&&(this.data.loaded=a);this._loaded=a},enumerable:!0,configurable:!0});b.prototype.toString=function(){return'[ResourceItem name="'+this.name+'" url="'+this.url+'" type="'+this.type+'"]'};b.TYPE_XML="xml";b.TYPE_IMAGE="image";b.TYPE_BIN="bin";b.TYPE_TEXT="text";b.TYPE_JSON=
  245. "json";b.TYPE_SHEET="sheet";b.TYPE_FONT="font";b.TYPE_SOUND="sound";return b}();c.ResourceItem=b;b.prototype.__class__="RES.ResourceItem"})(RES||(RES={}));
  246. (function(c){var b=function(){function b(){this.keyMap={};this.groupDic={};c.configInstance=this}b.prototype.getGroupByName=function(a){var b=[];if(!this.groupDic[a])return b;a=this.groupDic[a];for(var c=a.length,d=0;d<c;d++)b.push(this.parseResourceItem(a[d]));return b};b.prototype.getRawGroupByName=function(a){return this.groupDic[a]?this.groupDic[a]:[]};b.prototype.createGroup=function(a,b,c){"undefined"===typeof c&&(c=!1);if(!c&&this.groupDic[a]||!b||0==b.length)return!1;c=this.groupDic;for(var d=
  247. [],g=b.length,f=0;f<g;f++){var h=b[f],k=c[h];if(k)for(var h=k.length,p=0;p<h;p++){var m=k[p];-1==d.indexOf(m)&&d.push(m)}else(m=this.keyMap[h])&&-1==d.indexOf(m)&&d.push(m)}if(0==d.length)return!1;this.groupDic[a]=d;return!0};b.prototype.parseConfig=function(a,b){if(a){var c=a.resources;if(c)for(var d=c.length,g=0;g<d;g++){var f=c[g],h=f.url;h&&-1==h.indexOf("://")&&(f.url=b+h);this.addItemToKeyMap(f)}if(c=a.groups)for(d=c.length,g=0;g<d;g++){for(var h=c[g],k=[],p=h.keys.split(","),m=p.length,q=0;q<
  248. m;q++)f=p[q].trim(),(f=this.keyMap[f])&&-1==k.indexOf(f)&&k.push(f);this.groupDic[h.name]=k}}};b.prototype.addSubkey=function(a,b){var c=this.keyMap[b];c&&!this.keyMap[a]&&(this.keyMap[a]=c)};b.prototype.addItemToKeyMap=function(a){this.keyMap[a.name]||(this.keyMap[a.name]=a);if(a.hasOwnProperty("subkeys")){var b=a.subkeys.split(",");a.subkeys=b;for(var c=b.length,d=0;d<c;d++){var g=b[d];null==this.keyMap[g]&&(this.keyMap[g]=a)}}};b.prototype.getName=function(a){return(a=this.keyMap[a])?a.name:""};
  249. b.prototype.getType=function(a){return(a=this.keyMap[a])?a.type:""};b.prototype.getRawResourceItem=function(a){return this.keyMap[a]};b.prototype.getResourceItem=function(a){return(a=this.keyMap[a])?this.parseResourceItem(a):null};b.prototype.parseResourceItem=function(a){var b=new c.ResourceItem(a.name,a.url,a.type);b.data=a;return b};return b}();c.ResourceConfig=b;b.prototype.__class__="RES.ResourceConfig"})(RES||(RES={}));
  250. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  251. (function(c){var b=function(b){function a(){b.call(this);this.thread=2;this.loadingCount=0;this.groupTotalDic={};this.numLoadedDic={};this.itemListDic={};this.priorityQueue={};this.lazyLoadList=[];this.analyzerDic={};this.queueIndex=0}__extends(a,b);a.prototype.isGroupInLoading=function(a){return void 0!==this.itemListDic[a]};a.prototype.loadGroup=function(a,b,d){"undefined"===typeof d&&(d=0);if(!this.itemListDic[b]&&b)if(a&&0!=a.length){this.priorityQueue[d]?this.priorityQueue[d].push(b):this.priorityQueue[d]=
  252. [b];this.itemListDic[b]=a;d=a.length;for(var g=0;g<d;g++)a[g].groupName=b;this.groupTotalDic[b]=a.length;this.numLoadedDic[b]=0;this.next()}else a=new c.ResourceEvent(c.ResourceEvent.GROUP_COMPLETE),a.groupName=b,this.dispatchEvent(a)};a.prototype.loadItem=function(a){this.lazyLoadList.push(a);a.groupName="";this.next()};a.prototype.next=function(){for(;this.loadingCount<this.thread;){var a=this.getOneResourceItem();if(!a)break;this.loadingCount++;if(a.loaded)this.onItemComplete(a);else{var b=this.analyzerDic[a.type];
  253. b||(b=this.analyzerDic[a.type]=egret.Injector.getInstance(c.AnalyzerBase,a.type));b.loadFile(a,this.onItemComplete,this)}}};a.prototype.getOneResourceItem=function(){var a=Number.NEGATIVE_INFINITY,b;for(b in this.priorityQueue)a=Math.max(a,b);a=this.priorityQueue[a];if(!a||0==a.length)return 0==this.lazyLoadList.length?null:this.lazyLoadList.pop();b=a.length;for(var c,d=0;d<b;d++){this.queueIndex>=b&&(this.queueIndex=0);c=this.itemListDic[a[this.queueIndex]];if(0<c.length)break;this.queueIndex++}return 0==
  254. c.length?null:c.shift()};a.prototype.onItemComplete=function(a){this.loadingCount--;var b=a.groupName;a.loaded||c.ResourceEvent.dispatchResourceEvent(this.resInstance,c.ResourceEvent.ITEM_LOAD_ERROR,b,a);if(b){this.numLoadedDic[b]++;var d=this.numLoadedDic[b],g=this.groupTotalDic[b];c.ResourceEvent.dispatchResourceEvent(this.resInstance,c.ResourceEvent.GROUP_PROGRESS,b,a,d,g);d==g&&(this.removeGroupName(b),delete this.groupTotalDic[b],delete this.numLoadedDic[b],delete this.itemListDic[b],c.ResourceEvent.dispatchResourceEvent(this,
  255. c.ResourceEvent.GROUP_COMPLETE,b))}else this.callBack.call(this.resInstance,a);this.next()};a.prototype.removeGroupName=function(a){for(var b in this.priorityQueue){for(var c=this.priorityQueue[b],d=c.length,f=0,h=!1,d=c.length,k=0;k<d;k++){if(c[k]==a){c.splice(f,1);h=!0;break}f++}if(h){0==c.length&&delete this.priorityQueue[b];break}}};return a}(egret.EventDispatcher);c.ResourceLoader=b;b.prototype.__class__="RES.ResourceLoader"})(RES||(RES={}));
  256. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  257. (function(c){var b=function(b){function a(){b.call(this);this.resourceConfig=c.configInstance}__extends(a,b);a.prototype.addSubkey=function(a,b){this.resourceConfig.addSubkey(a,b)};a.prototype.loadFile=function(a,b,c){};a.prototype.getRes=function(a){};a.prototype.destroyRes=function(a){return!1};a.getStringPrefix=function(a){if(!a)return"";var b=a.indexOf(".");return-1!=b?a.substring(0,b):""};a.getStringTail=function(a){if(!a)return"";var b=a.indexOf(".");return-1!=b?a.substring(b+1):""};return a}(egret.HashObject);
  258. c.AnalyzerBase=b;b.prototype.__class__="RES.AnalyzerBase"})(RES||(RES={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  259. (function(c){var b=function(b){function a(){b.call(this);this.fileDic={};this.resItemDic=[];this._dataFormat=egret.URLLoaderDataFormat.BINARY;this.recycler=new egret.Recycler}__extends(a,b);a.prototype.loadFile=function(a,b,c){if(this.fileDic[a.name])b.call(c,a);else{var d=this.getLoader();this.resItemDic[d.hashCode]={item:a,func:b,thisObject:c};d.load(new egret.URLRequest(a.url))}};a.prototype.getLoader=function(){var a=this.recycler.pop();a||(a=new egret.URLLoader,a.addEventListener(egret.Event.COMPLETE,
  260. this.onLoadFinish,this),a.addEventListener(egret.IOErrorEvent.IO_ERROR,this.onLoadFinish,this));a.dataFormat=this._dataFormat;return a};a.prototype.onLoadFinish=function(a){var b=a.target,c=this.resItemDic[b.hashCode];delete this.resItemDic[b.hashCode];this.recycler.push(b);var d=c.item,f=c.func;d.loaded=a.type==egret.Event.COMPLETE;d.loaded&&this.analyzeData(d,b.data);f.call(c.thisObject,d)};a.prototype.analyzeData=function(a,b){var c=a.name;!this.fileDic[c]&&b&&(this.fileDic[c]=b)};a.prototype.getRes=
  261. function(a){return this.fileDic[a]};a.prototype.hasRes=function(a){return null!=this.getRes(a)};a.prototype.destroyRes=function(a){return this.fileDic[a]?(delete this.fileDic[a],!0):!1};return a}(c.AnalyzerBase);c.BinAnalyzer=b;b.prototype.__class__="RES.BinAnalyzer"})(RES||(RES={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  262. (function(c){var b=function(b){function a(){b.call(this);this._dataFormat=egret.URLLoaderDataFormat.TEXTURE}__extends(a,b);a.prototype.analyzeData=function(a,b){var c=a.name;!this.fileDic[c]&&b&&(this.fileDic[c]=b,(c=a.data)&&c.scale9grid&&(c=c.scale9grid.split(","),b.scale9Grid=new egret.Rectangle(parseInt(c[0]),parseInt(c[1]),parseInt(c[2]),parseInt(c[3]))))};return a}(c.BinAnalyzer);c.ImageAnalyzer=b;b.prototype.__class__="RES.ImageAnalyzer"})(RES||(RES={}));
  263. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  264. (function(c){var b=function(b){function a(){b.call(this);this._dataFormat=egret.URLLoaderDataFormat.TEXT}__extends(a,b);a.prototype.analyzeData=function(a,b){var c=a.name;if(!this.fileDic[c]&&b)try{this.fileDic[c]=JSON.parse(b)}catch(d){egret.Logger.warning("JSON\u6587\u4ef6\u683c\u5f0f\u4e0d\u6b63\u786e: "+a.url+"\ndata:"+b)}};return a}(c.BinAnalyzer);c.JsonAnalyzer=b;b.prototype.__class__="RES.JsonAnalyzer"})(RES||(RES={}));
  265. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};(function(c){var b=function(b){function a(){b.call(this);this._dataFormat=egret.URLLoaderDataFormat.TEXT}__extends(a,b);return a}(c.BinAnalyzer);c.TextAnalyzer=b;b.prototype.__class__="RES.TextAnalyzer"})(RES||(RES={}));
  266. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  267. (function(c){var b=function(b){function a(){b.call(this);this.sheetMap={};this.textureMap={};this._dataFormat=egret.URLLoaderDataFormat.TEXT}__extends(a,b);a.prototype.getRes=function(a){var b=this.fileDic[a];b||(b=this.textureMap[a]);!b&&(b=c.AnalyzerBase.getStringPrefix(a),b=this.fileDic[b])&&(a=c.AnalyzerBase.getStringTail(a),b=b.getTexture(a));return b};a.prototype.onLoadFinish=function(a){var b=a.target,c=this.resItemDic[b.hashCode];delete this.resItemDic[b.hashCode];this.recycler.push(b);var d=
  268. c.item,f=c.func;d.loaded=a.type==egret.Event.COMPLETE;d.loaded&&this.analyzeData(d,b.data);"string"==typeof b.data?(this._dataFormat=egret.URLLoaderDataFormat.TEXTURE,this.loadFile(d,f,c.thisObject),this._dataFormat=egret.URLLoaderDataFormat.TEXT):f.call(c.thisObject,d)};a.prototype.analyzeData=function(a,b){var c=a.name;if(!this.fileDic[c]&&b){var d;if("string"==typeof b){try{d=JSON.parse(b)}catch(f){egret.Logger.warning("JSON\u6587\u4ef6\u683c\u5f0f\u4e0d\u6b63\u786e: "+a.url)}d&&(this.sheetMap[c]=
  269. d,a.loaded=!1,a.url=this.getRelativePath(a.url,d.file))}else d=this.sheetMap[c],delete this.sheetMap[c],b&&(d=this.parseSpriteSheet(b,d,a.data&&a.data.subkeys?"":c),this.fileDic[c]=d)}};a.prototype.getRelativePath=function(a,b){a=a.split("\\").join("/");var c=a.lastIndexOf("/");return a=-1!=c?a.substring(0,c+1)+b:b};a.prototype.parseSpriteSheet=function(a,b,c){b=b.frames;if(!b)return null;var d=new egret.SpriteSheet(a),f=this.textureMap,h;for(h in b){var k=b[h];a=d.createTexture(h,k.x,k.y,k.w,k.h,
  270. k.offX,k.offY,k.sourceW,k.sourceH);k.scale9grid&&(k=k.scale9grid.split(","),a.scale9Grid=new egret.Rectangle(parseInt(k[0]),parseInt(k[1]),parseInt(k[2]),parseInt(k[3])));null==f[h]&&(f[h]=a,c&&this.addSubkey(h,c))}return d};return a}(c.BinAnalyzer);c.SheetAnalyzer=b;b.prototype.__class__="RES.SheetAnalyzer"})(RES||(RES={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  271. (function(c){var b=function(b){function a(){b.call(this)}__extends(a,b);a.prototype.analyzeData=function(a,b){var c=a.name;if(!this.fileDic[c]&&b){var d;"string"==typeof b?(d=b,this.sheetMap[c]=d,a.loaded=!1,a.url=this.getTexturePath(a.url,d)):(d=this.sheetMap[c],delete this.sheetMap[c],b&&(d=new egret.BitmapTextSpriteSheet(b,d),this.fileDic[c]=d))}};a.prototype.getTexturePath=function(a,b){var c="",d=b.split("\n")[2],f=d.indexOf('file="');-1!=f&&(d=d.substring(f+6),f=d.indexOf('"'),c=d.substring(0,
  272. f));a=a.split("\\").join("/");f=a.lastIndexOf("/");return a=-1!=f?a.substring(0,f+1)+c:c};return a}(c.SheetAnalyzer);c.FontAnalyzer=b;b.prototype.__class__="RES.FontAnalyzer"})(RES||(RES={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  273. (function(c){var b=function(b){function a(){b.call(this);this._dataFormat=egret.URLLoaderDataFormat.SOUND}__extends(a,b);a.prototype.analyzeData=function(a,b){var c=a.name;!this.fileDic[c]&&b&&(this.fileDic[c]=b,(c=a.data)&&c.soundType?b.preload(c.soundType):b.preload(egret.Sound.EFFECT))};return a}(c.BinAnalyzer);c.SoundAnalyzer=b;b.prototype.__class__="RES.SoundAnalyzer"})(RES||(RES={}));
  274. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  275. (function(c){var b=function(b){function a(){b.call(this);this._dataFormat=egret.URLLoaderDataFormat.TEXT}__extends(a,b);a.prototype.analyzeData=function(a,b){var c=a.name;if(!this.fileDic[c]&&b)try{var d=egret.XML.parse(b);this.fileDic[c]=d}catch(f){}};return a}(c.BinAnalyzer);c.XMLAnalyzer=b;b.prototype.__class__="RES.XMLAnalyzer"})(RES||(RES={}));
  276. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  277. (function(c){c.loadConfig=function(a,b,c){"undefined"===typeof b&&(b="");"undefined"===typeof c&&(c="json");d.loadConfig(a,b,c)};c.loadGroup=function(a,b){"undefined"===typeof b&&(b=0);d.loadGroup(a,b)};c.isGroupLoaded=function(a){return d.isGroupLoaded(a)};c.getGroupByName=function(a){return d.getGroupByName(a)};c.createGroup=function(a,b,c){"undefined"===typeof c&&(c=!1);return d.createGroup(a,b,c)};c.hasRes=function(a){return d.hasRes(a)};c.getRes=function(a){return d.getRes(a)};c.getResAsync=
  278. function(a,b,c){d.getResAsync(a,b,c)};c.getResByUrl=function(a,b,c,n){"undefined"===typeof n&&(n="");d.getResByUrl(a,b,c,n)};c.destroyRes=function(a){return d.destroyRes(a)};c.setMaxLoadingThread=function(a){d.setMaxLoadingThread(a)};c.addEventListener=function(a,b,c,n,g){"undefined"===typeof n&&(n=!1);"undefined"===typeof g&&(g=0);d.addEventListener(a,b,c,n,g)};c.removeEventListener=function(a,b,c,n){"undefined"===typeof n&&(n=!1);d.removeEventListener(a,b,c,n)};var b=function(a){function b(){a.call(this);
  279. this.analyzerDic={};this.configItemList=[];this.configComplete=this.callLaterFlag=!1;this.loadedGroups=[];this.groupNameList=[];this.asyncDic={};this.init()}__extends(b,a);b.prototype.getAnalyzerByType=function(a){var b=this.analyzerDic[a];b||(b=this.analyzerDic[a]=egret.Injector.getInstance(c.AnalyzerBase,a));return b};b.prototype.init=function(){egret.Injector.hasMapRule(c.AnalyzerBase,c.ResourceItem.TYPE_BIN)||egret.Injector.mapClass(c.AnalyzerBase,c.BinAnalyzer,c.ResourceItem.TYPE_BIN);egret.Injector.hasMapRule(c.AnalyzerBase,
  280. c.ResourceItem.TYPE_IMAGE)||egret.Injector.mapClass(c.AnalyzerBase,c.ImageAnalyzer,c.ResourceItem.TYPE_IMAGE);egret.Injector.hasMapRule(c.AnalyzerBase,c.ResourceItem.TYPE_TEXT)||egret.Injector.mapClass(c.AnalyzerBase,c.TextAnalyzer,c.ResourceItem.TYPE_TEXT);egret.Injector.hasMapRule(c.AnalyzerBase,c.ResourceItem.TYPE_JSON)||egret.Injector.mapClass(c.AnalyzerBase,c.JsonAnalyzer,c.ResourceItem.TYPE_JSON);egret.Injector.hasMapRule(c.AnalyzerBase,c.ResourceItem.TYPE_SHEET)||egret.Injector.mapClass(c.AnalyzerBase,
  281. c.SheetAnalyzer,c.ResourceItem.TYPE_SHEET);egret.Injector.hasMapRule(c.AnalyzerBase,c.ResourceItem.TYPE_FONT)||egret.Injector.mapClass(c.AnalyzerBase,c.FontAnalyzer,c.ResourceItem.TYPE_FONT);egret.Injector.hasMapRule(c.AnalyzerBase,c.ResourceItem.TYPE_SOUND)||egret.Injector.mapClass(c.AnalyzerBase,c.SoundAnalyzer,c.ResourceItem.TYPE_SOUND);egret.Injector.hasMapRule(c.AnalyzerBase,c.ResourceItem.TYPE_XML)||egret.Injector.mapClass(c.AnalyzerBase,c.XMLAnalyzer,c.ResourceItem.TYPE_XML);this.resConfig=
  282. new c.ResourceConfig;this.resLoader=new c.ResourceLoader;this.resLoader.callBack=this.onResourceItemComp;this.resLoader.resInstance=this;this.resLoader.addEventListener(c.ResourceEvent.GROUP_COMPLETE,this.onGroupComp,this)};b.prototype.loadConfig=function(a,b,c){"undefined"===typeof c&&(c="json");this.configItemList.push({url:a,resourceRoot:b,type:c});this.callLaterFlag||(egret.callLater(this.startLoadConfig,this),this.callLaterFlag=!0)};b.prototype.startLoadConfig=function(){this.callLaterFlag=!1;
  283. var a=this.configItemList;this.configItemList=[];this.loadingConfigList=a;for(var d=a.length,g=[],f=0;f<d;f++){var h=a[f],h=new c.ResourceItem(h.url,h.url,h.type);g.push(h)}this.resLoader.loadGroup(g,b.GROUP_CONFIG,Number.MAX_VALUE)};b.prototype.isGroupLoaded=function(a){return-1!=this.loadedGroups.indexOf(a)};b.prototype.getGroupByName=function(a){return this.resConfig.getGroupByName(a)};b.prototype.loadGroup=function(a,b){"undefined"===typeof b&&(b=0);if(-1==this.loadedGroups.indexOf(a)&&!this.resLoader.isGroupInLoading(a))if(this.configComplete){var c=
  284. this.resConfig.getGroupByName(a);this.resLoader.loadGroup(c,a,b)}else this.groupNameList.push({name:a,priority:b})};b.prototype.createGroup=function(a,b,c){"undefined"===typeof c&&(c=!1);if(c){var d=this.loadedGroups.indexOf(a);-1!=d&&this.loadedGroups.splice(d,1)}return this.resConfig.createGroup(a,b,c)};b.prototype.onGroupComp=function(a){if(a.groupName==b.GROUP_CONFIG){a=this.loadingConfigList.length;for(var d=0;d<a;d++){var g=this.loadingConfigList[d],f=this.getAnalyzerByType(g.type),h=f.getRes(g.url);
  285. f.destroyRes(g.url);this.resConfig.parseConfig(h,g.resourceRoot)}this.configComplete=!0;this.loadingConfigList=null;c.ResourceEvent.dispatchResourceEvent(this,c.ResourceEvent.CONFIG_COMPLETE);g=this.groupNameList;a=g.length;for(d=0;d<a;d++)f=g[d],this.loadGroup(f.name,f.priority);this.groupNameList=[]}else this.loadedGroups.push(a.groupName),this.dispatchEvent(a)};b.prototype.hasRes=function(a){var b=this.resConfig.getType(a);return""==b&&(a=c.AnalyzerBase.getStringPrefix(a),b=this.resConfig.getType(a),
  286. ""==b)?!1:!0};b.prototype.getRes=function(a){var b=this.resConfig.getType(a);return""==b&&(b=c.AnalyzerBase.getStringPrefix(a),b=this.resConfig.getType(b),""==b)?null:this.getAnalyzerByType(b).getRes(a)};b.prototype.getResAsync=function(a,b,d){var e=this.resConfig.getType(a),h=this.resConfig.getName(a);if(""==e&&(h=c.AnalyzerBase.getStringPrefix(a),e=this.resConfig.getType(h),""==e)){b.call(d,null);return}(e=this.getAnalyzerByType(e).getRes(a))?b.call(d,e):(a={key:a,compFunc:b,thisObject:d},this.asyncDic[h]?
  287. this.asyncDic[h].push(a):(this.asyncDic[h]=[a],h=this.resConfig.getResourceItem(h),this.resLoader.loadItem(h)))};b.prototype.getResByUrl=function(a,b,d,e){"undefined"===typeof e&&(e="");if(a){e||(e=this.getTypeByUrl(a));var h=this.getAnalyzerByType(e).getRes(a);h?b.call(d,h):(b={key:a,compFunc:b,thisObject:d},this.asyncDic[a]?this.asyncDic[a].push(b):(this.asyncDic[a]=[b],a=new c.ResourceItem(a,a,e),this.resLoader.loadItem(a)))}else b.call(d,null)};b.prototype.getTypeByUrl=function(a){(a=a.substr(a.lastIndexOf(".")+
  288. 1))&&(a=a.toLowerCase());switch(a){case c.ResourceItem.TYPE_XML:case c.ResourceItem.TYPE_JSON:case c.ResourceItem.TYPE_SHEET:break;case "png":case "jpg":case "gif":a=c.ResourceItem.TYPE_IMAGE;break;case "fnt":a=c.ResourceItem.TYPE_FONT;break;case "txt":a=c.ResourceItem.TYPE_TEXT;break;case "mp3":case "ogg":case "mpeg":case "wav":case "m4a":case "mp4":case "aiff":case "wma":case "mid":a=c.ResourceItem.TYPE_SOUND;break;default:a=c.ResourceItem.TYPE_BIN}return a};b.prototype.onResourceItemComp=function(a){var b=
  289. this.asyncDic[a.name];delete this.asyncDic[a.name];a=this.getAnalyzerByType(a.type);for(var c=b.length,d=0;d<c;d++){var e=b[d],k=a.getRes(e.key);e.compFunc.call(e.thisObject,k,e.key)}};b.prototype.destroyRes=function(a){var b=this.resConfig.getRawGroupByName(a);if(b){var c=this.loadedGroups.indexOf(a);-1!=c&&this.loadedGroups.splice(c,1);a=b.length;for(var d=0;d<a;d++){c=b[d];c.loaded=!1;var e=this.getAnalyzerByType(c.type);e.destroyRes(c.name)}return!0}b=this.resConfig.getType(a);if(""==b)return!1;
  290. c=this.resConfig.getRawResourceItem(a);c.loaded=!1;e=this.getAnalyzerByType(b);return e.destroyRes(a)};b.prototype.setMaxLoadingThread=function(a){1>a&&(a=1);this.resLoader.thread=a};b.GROUP_CONFIG="RES__CONFIG";return b}(egret.EventDispatcher);b.prototype.__class__="Resource";var d=new b})(RES||(RES={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  291. (function(c){var b=function(b){function a(c){"undefined"===typeof c&&(c=60);b.call(this);this.frameRate=c;this._time=0;60==c&&(a.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame,a.cancelAnimationFrame=window.cancelAnimationFrame||window.msCancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.oCancelAnimationFrame||window.cancelRequestAnimationFrame||
  292. window.msCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.webkitCancelRequestAnimationFrame);a.requestAnimationFrame||(a.requestAnimationFrame=function(a){return window.setTimeout(a,1E3/c)});a.cancelAnimationFrame||(a.cancelAnimationFrame=function(a){return window.clearTimeout(a)});a.instance=this;this.registerListener()}__extends(a,b);a.prototype.enterFrame=function(){var b=a.instance,d=a._thisObject,n=a._callback,g=c.getTimer(),f=g-
  293. b._time;b._requestAnimationId=a.requestAnimationFrame.call(window,a.prototype.enterFrame);n.call(d,f);b._time=g};a.prototype.executeMainLoop=function(b,c){a._callback=b;a._thisObject=c;this.enterFrame()};a.prototype.reset=function(){var b=a.instance;b._requestAnimationId&&(b._time=c.getTimer(),a.cancelAnimationFrame.call(window,b._requestAnimationId),b.enterFrame())};a.prototype.registerListener=function(){var b=function(){a.instance.reset()},c=function(){document[d]||b()};window.onfocus=b;window.onblur=
  294. function(){};var d,g;"undefined"!==typeof document.hidden?(d="hidden",g="visibilitychange"):"undefined"!==typeof document.mozHidden?(d="mozHidden",g="mozvisibilitychange"):"undefined"!==typeof document.msHidden?(d="msHidden",g="msvisibilitychange"):"undefined"!==typeof document.webkitHidden&&(d="webkitHidden",g="webkitvisibilitychange");"onpageshow"in window&&"onpagehide"in window&&window.addEventListener("pageshow",b,!1);d&&g&&document.addEventListener(g,c,!1)};return a}(c.DeviceContext);c.HTML5DeviceContext=
  295. b;b.prototype.__class__="egret.HTML5DeviceContext"})(egret||(egret={}));var egret_html5_localStorage;(function(c){c.getItem=function(b){return window.localStorage.getItem(b)};c.setItem=function(b,c){window.localStorage.setItem(b,c)};c.removeItem=function(b){window.localStorage.removeItem(b)};c.clear=function(){window.localStorage.clear()};c.init=function(){for(var b in c)egret.localStorage[b]=c[b]}})(egret_html5_localStorage||(egret_html5_localStorage={}));egret_html5_localStorage.init();
  296. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  297. (function(c){var b=function(b){function a(a){b.call(this);this.globalAlpha=1;this.canvas=a||this.createCanvas();this.canvasContext=this.canvas.getContext("2d");var c=this.canvasContext.setTransform,n=this;this.canvasContext.setTransform=function(a,b,d,e,p,m){n._matrixA=a;n._matrixB=b;n._matrixC=d;n._matrixD=e;n._matrixTx=p;n._matrixTy=m;c.call(n.canvasContext,a,b,d,e,p,m)};this._matrixA=1;this._matrixC=this._matrixB=0;this._matrixD=1;this._transformTy=this._transformTx=this._matrixTy=this._matrixTx=
  298. 0;b.call(this)}__extends(a,b);a.prototype.createCanvas=function(){var a=c.Browser.getInstance().$("#egretCanvas");if(!a){var b=document.getElementById(c.StageDelegate.canvas_div_name),a=c.Browser.getInstance().$new("canvas");a.id="egretCanvas";a.width=c.MainContext.instance.stage.stageWidth;a.height=c.MainContext.instance.stage.stageHeight;a.style.width=b.style.width;a.style.height=b.style.height;b.appendChild(a)}return a};a.prototype.clearScreen=function(){for(var a=c.RenderFilter.getInstance().getDrawAreaList(),
  299. b=0,d=a.length;b<d;b++){var g=a[b];this.clearRect(g.x,g.y,g.width,g.height)}this.renderCost=0};a.prototype.clearRect=function(a,b,c,d){this.canvasContext.clearRect(a,b,c,d)};a.prototype.drawImage=function(a,l,n,g,f,h,k,p,m){var q=c.MainContext.instance.rendererContext.texture_scale_factor;l/=q;n/=q;g/=q;f/=q;a=a._bitmapData;h+=this._transformTx;k+=this._transformTy;q=c.getTimer();this.canvasContext.drawImage(a,l,n,g,f,h,k,p,m);b.prototype.drawImage.call(this,a,l,n,g,f,h,k,p,m);this.renderCost+=c.getTimer()-
  300. q};a.prototype.setTransform=function(a){1==a.a&&0==a.b&&0==a.c&&1==a.d&&1==this._matrixA&&0==this._matrixB&&0==this._matrixC&&1==this._matrixD?(this._transformTx=a.tx-this._matrixTx,this._transformTy=a.ty-this._matrixTy):(this._transformTx=this._transformTy=0,this._matrixA==a.a&&this._matrixB==a.b&&this._matrixC==a.c&&this._matrixD==a.d&&this._matrixTx==a.tx&&this._matrixTy==a.ty||this.canvasContext.setTransform(a.a,a.b,a.c,a.d,a.tx,a.ty))};a.prototype.setAlpha=function(a,b){a!=this.globalAlpha&&
  301. (this.canvasContext.globalAlpha=this.globalAlpha=a);b?(this.blendValue=b,this.canvasContext.globalCompositeOperation=b):this.blendValue!=c.BlendMode.NORMAL&&(this.blendValue=c.BlendMode.NORMAL,this.canvasContext.globalCompositeOperation=c.BlendMode.NORMAL)};a.prototype.setupFont=function(a){var b=this.canvasContext,c=a._italic?"italic ":"normal ",c=c+(a._bold?"bold ":"normal "),c=c+(a._size+"px "+a._fontFamily);b.font=c;b.textAlign="left";b.textBaseline="middle"};a.prototype.measureText=function(a){return this.canvasContext.measureText(a).width};
  302. a.prototype.drawText=function(a,c,n,g,f){var h=a._strokeColorString,k=a._stroke,p=this.canvasContext;p.fillStyle=a._textColorString;p.strokeStyle=h;k&&(p.lineWidth=2*k,p.strokeText(c,n+this._transformTx,g+this._transformTy,f||65535));p.fillText(c,n+this._transformTx,g+this._transformTy,f||65535);b.prototype.drawText.call(this,a,c,n,g,f)};a.prototype.strokeRect=function(a,b,c,d,f){this.canvasContext.strokeStyle=f;this.canvasContext.strokeRect(a,b,c,d)};a.prototype.pushMask=function(a){this.canvasContext.save();
  303. this.canvasContext.beginPath();this.canvasContext.rect(a.x+this._transformTx,a.y+this._transformTy,a.width,a.height);this.canvasContext.clip();this.canvasContext.closePath()};a.prototype.popMask=function(){this.canvasContext.restore();this.canvasContext.setTransform(1,0,0,1,0,0)};a.prototype.onRenderStart=function(){this.canvasContext.save()};a.prototype.onRenderFinish=function(){this.canvasContext.restore();this.canvasContext.setTransform(1,0,0,1,0,0)};return a}(c.RendererContext);c.HTML5CanvasRenderer=
  304. b;b.prototype.__class__="egret.HTML5CanvasRenderer"})(egret||(egret={}));var egret_h5_graphics;
  305. (function(c){c.beginFill=function(c,a){"undefined"===typeof a&&(a=1);var e="rgba("+(c>>16)+","+((c&65280)>>8)+","+(c&255)+","+a+")";this.fillStyleColor=e;this.commandQueue.push(new b(this._setStyle,this,[e]))};c.drawRect=function(c,a,e,l){this.commandQueue.push(new b(function(a,b,c,d){var e=this.renderContext;this.canvasContext.beginPath();this.canvasContext.rect(e._transformTx+a,e._transformTy+b,c,d);this.canvasContext.closePath()},this,[c,a,e,l]));this._fill()};c.drawCircle=function(c,a,e){this.commandQueue.push(new b(function(a,
  306. b,c){var d=this.renderContext;this.canvasContext.beginPath();this.canvasContext.arc(d._transformTx+a,d._transformTy+b,c,0,2*Math.PI);this.canvasContext.closePath()},this,[c,a,e]));this._fill()};c.drawRoundRect=function(c,a,e,l,n,g){this.commandQueue.push(new b(function(a,b,c,d,e,l){var g=this.renderContext;a=g._transformTx+a;b=g._transformTy+b;e/=2;l=l?l/2:e;c=a+c;d=b+d;g=d-l;this.canvasContext.beginPath();this.canvasContext.moveTo(c,g);this.canvasContext.quadraticCurveTo(c,d,c-e,d);this.canvasContext.lineTo(a+
  307. e,d);this.canvasContext.quadraticCurveTo(a,d,a,d-l);this.canvasContext.lineTo(a,b+l);this.canvasContext.quadraticCurveTo(a,b,a+e,b);this.canvasContext.lineTo(c-e,b);this.canvasContext.quadraticCurveTo(c,b,c,b+l);this.canvasContext.lineTo(c,g);this.canvasContext.closePath()},this,[c,a,e,l,n,g]));this._fill()};c.drawEllipse=function(c,a,e,l){this.commandQueue.push(new b(function(a,b,c,d){var e=this.renderContext;this.canvasContext.save();a=e._transformTx+a;b=e._transformTy+b;var e=c>d?c:d,l=c/e;d/=
  308. e;this.canvasContext.scale(l,d);this.canvasContext.beginPath();this.canvasContext.moveTo((a+c)/l,b/d);this.canvasContext.arc(a/l,b/d,e,0,2*Math.PI);this.canvasContext.closePath();this.canvasContext.restore();this.canvasContext.stroke()},this,[c,a,e,l]));this._fill()};c.lineStyle=function(c,a,e,l,n,g,f,h){"undefined"===typeof c&&(c=NaN);"undefined"===typeof a&&(a=0);"undefined"===typeof e&&(e=1);"undefined"===typeof l&&(l=!1);"undefined"===typeof n&&(n="normal");"undefined"===typeof g&&(g=null);"undefined"===
  309. typeof f&&(f=null);"undefined"===typeof h&&(h=3);this.strokeStyleColor&&(this.createEndLineCommand(),this.commandQueue.push(this.endLineCommand));this.strokeStyleColor=a="rgba("+(a>>16)+","+((a&65280)>>8)+","+(a&255)+","+e+")";this.commandQueue.push(new b(function(a,b){this.canvasContext.lineWidth=a;this.canvasContext.strokeStyle=b;this.canvasContext.beginPath()},this,[c,a]));"undefined"===typeof this.lineX&&(this.lineY=this.lineX=0);this.moveTo(this.lineX,this.lineY)};c.lineTo=function(c,a){this.commandQueue.push(new b(function(a,
  310. b){var c=this.renderContext;this.canvasContext.lineTo(c._transformTx+a,c._transformTy+b)},this,[c,a]));this.lineX=c;this.lineY=a};c.curveTo=function(c,a,e,l){this.commandQueue.push(new b(function(a,b,c,d){var e=this.renderContext;this.canvasContext.quadraticCurveTo(e._transformTx+a,e._transformTy+b,e._transformTx+c,e._transformTy+d)},this,[c,a,e,l]));this.lineX=e;this.lineY=l};c.moveTo=function(c,a){this.commandQueue.push(new b(function(a,b){var c=this.renderContext;this.canvasContext.moveTo(c._transformTx+
  311. a,c._transformTy+b)},this,[c,a]))};c.clear=function(){this.lineY=this.lineX=this.commandQueue.length=0;this.fillStyleColor=this.strokeStyleColor=null};c.createEndFillCommand=function(){this.endFillCommand||(this.endFillCommand=new b(function(){this.canvasContext.fill();this.canvasContext.closePath()},this,null))};c.endFill=function(){null!=this.fillStyleColor&&this._fill();this.fillStyleColor=null};c._fill=function(){this.fillStyleColor&&(this.createEndFillCommand(),this.commandQueue.push(this.endFillCommand))};
  312. c.createEndLineCommand=function(){this.endLineCommand||(this.endLineCommand=new b(function(){this.canvasContext.stroke();this.canvasContext.closePath()},this,null))};c._draw=function(b){this.renderContext=b;b=this.canvasContext=this.renderContext.canvasContext;b.save();var a=this.commandQueue.length;this.strokeStyleColor&&0<a&&this.commandQueue[a-1]!=this.endLineCommand&&(this.createEndLineCommand(),this.commandQueue.push(this.endLineCommand),a=this.commandQueue.length);for(var c=0;c<a;c++){var l=
  313. this.commandQueue[c];l.method.apply(l.thisObject,l.args)}b.restore()};var b=function(){return function(b,a,c){this.method=b;this.thisObject=a;this.args=c}}();b.prototype.__class__="Command";c._setStyle=function(b){this.canvasContext.fillStyle=b;this.canvasContext.beginPath()};c.init=function(){for(var b in c)egret.Graphics.prototype[b]=c[b];egret.RendererContext.createRendererContext=function(a){return new egret.HTML5CanvasRenderer(a)}}})(egret_h5_graphics||(egret_h5_graphics={}));egret_h5_graphics.init();
  314. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  315. (function(c){var b=function(b){function a(a){b.call(this);this.size=2E3;this.vertSize=6;this.contextLost=!1;this.glContextId=0;this.currentBlendMode="";this.currentBaseTexture=null;this.currentBatchSize=0;this.maskList=[];this.maskDataFreeList=[];this.canvasContext=document.createElement("canvas").getContext("2d");console.log("\u4f7f\u7528WebGL\u6a21\u5f0f");this.canvas=a||this.createCanvas();this.canvas.addEventListener("webglcontextlost",this.handleContextLost.bind(this),!1);this.canvas.addEventListener("webglcontextrestored",
  316. this.handleContextRestored.bind(this),!1);this.projectionX=this.canvas.width/2;this.projectionY=-this.canvas.height/2;a=6*this.size;this.vertices=new Float32Array(4*this.size*this.vertSize);this.indices=new Uint16Array(a);for(var l=0,n=0;l<a;l+=6,n+=4)this.indices[l+0]=n+0,this.indices[l+1]=n+1,this.indices[l+2]=n+2,this.indices[l+3]=n+0,this.indices[l+4]=n+2,this.indices[l+5]=n+3;this.initWebGL();this.shaderManager=new c.WebGLShaderManager(this.gl);this.worldTransform=new c.Matrix;this.initBlendMode();
  317. c.MainContext.instance.addEventListener(c.Event.FINISH_RENDER,this._draw,this);c.TextField.prototype._draw=function(a){this.getDirty()&&(this.cacheAsBitmap=!0);c.DisplayObject.prototype._draw.call(this,a)}}__extends(a,b);a.prototype.createCanvas=function(){var a=c.Browser.getInstance().$("#egretCanvas");if(!a){var b=document.getElementById(c.StageDelegate.canvas_div_name),a=c.Browser.getInstance().$new("canvas");a.id="egretCanvas";a.width=c.MainContext.instance.stage.stageWidth;a.height=c.MainContext.instance.stage.stageHeight;
  318. a.style.width=b.style.width;a.style.height=b.style.height;b.appendChild(a)}return a};a.prototype.handleContextLost=function(){this.contextLost=!0};a.prototype.handleContextRestored=function(){this.initWebGL();this.shaderManager.setContext(this.gl);this.contextLost=!1};a.prototype.initWebGL=function(){for(var a={stencil:!0},b,c=["experimental-webgl","webgl"],d=0;d<c.length;d++){try{b=this.canvas.getContext(c[d],a)}catch(f){}if(b)break}if(!b)throw Error("\u5f53\u524d\u6d4f\u89c8\u5668\u4e0d\u652f\u6301webgl");
  319. this.setContext(b)};a.prototype.setContext=function(a){this.gl=a;a.id=this.glContextId++;this.vertexBuffer=a.createBuffer();this.indexBuffer=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer);a.bufferData(a.ELEMENT_ARRAY_BUFFER,this.indices,a.STATIC_DRAW);a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer);a.bufferData(a.ARRAY_BUFFER,this.vertices,a.DYNAMIC_DRAW);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.enable(a.BLEND);a.colorMask(!0,!0,!0,!0)};a.prototype.initBlendMode=function(){a.blendModesWebGL[c.BlendMode.NORMAL]=
  320. [this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA];a.blendModesWebGL[c.BlendMode.ADD]=[this.gl.SRC_ALPHA,this.gl.DST_ALPHA]};a.prototype.start=function(){if(!this.contextLost){var a=this.gl;a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer);var b=this.shaderManager.defaultShader;a.uniform2f(b.projectionVector,this.projectionX,this.projectionY);var c=4*this.vertSize;a.vertexAttribPointer(b.aVertexPosition,2,a.FLOAT,!1,c,0);a.vertexAttribPointer(b.aTextureCoord,
  321. 2,a.FLOAT,!1,c,8);a.vertexAttribPointer(b.colorAttribute,2,a.FLOAT,!1,c,16)}};a.prototype.clearScreen=function(){var a=this.gl;a.colorMask(!0,!0,!0,!0);for(var b=c.RenderFilter.getInstance().getDrawAreaList(),d=0,g=b.length;d<g;d++){var f=b[d];a.viewport(f.x,f.y,f.width,f.height);a.bindFramebuffer(a.FRAMEBUFFER,null);a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT)}this.renderCost=0};a.prototype.setBlendMode=function(b){b||(b=c.BlendMode.NORMAL);if(this.currentBlendMode!=b){var d=a.blendModesWebGL[b];
  322. d&&(this.gl.blendFunc(d[0],d[1]),this.currentBlendMode=b)}};a.prototype.drawImage=function(a,b,d,g,f,h,k,p,m){if(!this.contextLost){var q=c.MainContext.instance.rendererContext.texture_scale_factor;b/=q;d/=q;g/=q;f/=q;this.createWebGLTexture(a);if(a.webGLTexture!==this.currentBaseTexture||this.currentBatchSize>=this.size)this._draw(),this.currentBaseTexture=a.webGLTexture;var s=this.worldTransform,r=s.a,t=s.b,u=s.c,v=s.d,x=s.tx,y=s.ty;0==h&&0==k||s.append(1,0,0,1,h,k);1==g/p&&1==f/m||s.append(p/g,
  323. 0,0,m/f,0,0);h=s.a;k=s.b;p=s.c;m=s.d;var q=s.tx,w=s.ty;s.a=r;s.b=t;s.c=u;s.d=v;s.tx=x;s.ty=y;r=a._sourceWidth;t=a._sourceHeight;a=g;s=f;b/=r;d/=t;g/=r;f/=t;r=this.vertices;t=4*this.currentBatchSize*this.vertSize;u=this.worldAlpha;r[t++]=q;r[t++]=w;r[t++]=b;r[t++]=d;r[t++]=u;r[t++]=16777215;r[t++]=h*a+q;r[t++]=k*a+w;r[t++]=g+b;r[t++]=d;r[t++]=u;r[t++]=16777215;r[t++]=h*a+p*s+q;r[t++]=m*s+k*a+w;r[t++]=g+b;r[t++]=f+d;r[t++]=u;r[t++]=16777215;r[t++]=p*s+q;r[t++]=m*s+w;r[t++]=b;r[t++]=f+d;r[t++]=u;r[t++]=
  324. 16777215;this.currentBatchSize++}};a.prototype._draw=function(){if(0!=this.currentBatchSize&&!this.contextLost){var a=c.getTimer();this.start();var b=this.gl;b.bindTexture(b.TEXTURE_2D,this.currentBaseTexture);var d=this.vertices.subarray(0,4*this.currentBatchSize*this.vertSize);b.bufferSubData(b.ARRAY_BUFFER,0,d);b.drawElements(b.TRIANGLES,6*this.currentBatchSize,b.UNSIGNED_SHORT,0);this.currentBatchSize=0;this.renderCost+=c.getTimer()-a;c.Profiler.getInstance().onDrawImage()}};a.prototype.setTransform=
  325. function(a){var b=this.worldTransform;b.a=a.a;b.b=a.b;b.c=a.c;b.d=a.d;b.tx=a.tx;b.ty=a.ty};a.prototype.setAlpha=function(a,b){this.worldAlpha=a;this.setBlendMode(b)};a.prototype.createWebGLTexture=function(a){if(!a.webGLTexture){var b=this.gl;a.webGLTexture=b.createTexture();b.bindTexture(b.TEXTURE_2D,a.webGLTexture);b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,a._bitmapData);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);
  326. b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.bindTexture(b.TEXTURE_2D,null)}};a.prototype.pushMask=function(a){this._draw();var b=this.gl;0==this.maskList.length&&(b.enable(b.STENCIL_TEST),b.stencilFunc(b.ALWAYS,1,1));var c=this.maskDataFreeList.pop();c?(c.x=a.x,c.y=a.y,c.w=a.width,c.h=a.height):c={x:a.x,y:a.y,w:a.width,h:a.height};this.maskList.push(c);b.colorMask(!1,
  327. !1,!1,!1);b.stencilOp(b.KEEP,b.KEEP,b.INCR);this.renderGraphics(c);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.NOTEQUAL,0,this.maskList.length);b.stencilOp(b.KEEP,b.KEEP,b.KEEP)};a.prototype.popMask=function(){this._draw();var a=this.gl,b=this.maskList.pop();b&&(a.colorMask(!1,!1,!1,!1),a.stencilOp(a.KEEP,a.KEEP,a.DECR),this.renderGraphics(b),a.colorMask(!0,!0,!0,!0),a.stencilFunc(a.NOTEQUAL,0,this.maskList.length),a.stencilOp(a.KEEP,a.KEEP,a.KEEP),this.maskDataFreeList.push(b));0==this.maskList.length&&
  328. a.disable(a.STENCIL_TEST)};a.prototype.setupFont=function(a){var b=this.canvasContext,c=a.italic?"italic ":"normal ",c=c+(a.bold?"bold ":"normal "),c=c+(a.size+"px "+a.fontFamily);b.font=c;b.textAlign="left";b.textBaseline="middle"};a.prototype.measureText=function(a){return this.canvasContext.measureText(a).width};a.prototype.renderGraphics=function(a){var b=this.gl,c=this.shaderManager.primitiveShader;this.graphicsPoints?(this.graphicsPoints.length=0,this.graphicsIndices.length=0):(this.graphicsPoints=
  329. [],this.graphicsIndices=[],this.graphicsBuffer=b.createBuffer(),this.graphicsIndexBuffer=b.createBuffer());this.updateGraphics(a);this.shaderManager.activateShader(c);b.blendFunc(b.ONE,b.ONE_MINUS_SRC_ALPHA);b.uniformMatrix3fv(c.translationMatrix,!1,this.worldTransform.toArray(!0));b.uniform2f(c.projectionVector,this.projectionX,-this.projectionY);b.uniform2f(c.offsetVector,0,0);b.uniform3fv(c.tintColor,[1,1,1]);b.uniform1f(c.alpha,this.worldAlpha);b.bindBuffer(b.ARRAY_BUFFER,this.graphicsBuffer);
  330. b.vertexAttribPointer(c.aVertexPosition,2,b.FLOAT,!1,24,0);b.vertexAttribPointer(c.colorAttribute,4,b.FLOAT,!1,24,8);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.graphicsIndexBuffer);b.drawElements(b.TRIANGLE_STRIP,this.graphicsIndices.length,b.UNSIGNED_SHORT,0);this.shaderManager.activateShader(this.shaderManager.defaultShader)};a.prototype.updateGraphics=function(a){var b=this.gl;this.buildRectangle(a);b.bindBuffer(b.ARRAY_BUFFER,this.graphicsBuffer);b.bufferData(b.ARRAY_BUFFER,new Float32Array(this.graphicsPoints),
  331. b.STATIC_DRAW);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.graphicsIndexBuffer);b.bufferData(b.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.graphicsIndices),b.STATIC_DRAW)};a.prototype.buildRectangle=function(a){var b=a.x,c=a.y,d=a.w;a=a.h;var f=this.graphicsPoints,h=this.graphicsIndices,k=f.length/6;f.push(b,c);f.push(0,0,0,1);f.push(b+d,c);f.push(0,0,0,1);f.push(b,c+a);f.push(0,0,0,1);f.push(b+d,c+a);f.push(0,0,0,1);h.push(k,k,k+1,k+2,k+3,k+3)};a.blendModesWebGL={};return a}(c.RendererContext);c.WebGLRenderer=
  332. b;b.prototype.__class__="egret.WebGLRenderer"})(egret||(egret={}));
  333. (function(c){var b=function(){function b(){}b.compileProgram=function(a,c,l){l=b.compileFragmentShader(a,l);c=b.compileVertexShader(a,c);var n=a.createProgram();a.attachShader(n,c);a.attachShader(n,l);a.linkProgram(n);a.getProgramParameter(n,a.LINK_STATUS)||console.log("\u65e0\u6cd5\u521d\u59cb\u5316\u7740\u8272\u5668");return n};b.compileFragmentShader=function(a,c){return b._compileShader(a,c,a.FRAGMENT_SHADER)};b.compileVertexShader=function(a,c){return b._compileShader(a,c,a.VERTEX_SHADER)};b._compileShader=
  334. function(a,b,c){c=a.createShader(c);a.shaderSource(c,b);a.compileShader(c);return a.getShaderParameter(c,a.COMPILE_STATUS)?c:(console.log(a.getShaderInfoLog(c)),null)};b.checkCanUseWebGL=function(){if(void 0==b.canUseWebGL)try{var a=document.createElement("canvas");b.canUseWebGL=!!window.WebGLRenderingContext&&!(!a.getContext("webgl")&&!a.getContext("experimental-webgl"))}catch(c){b.canUseWebGL=!1}return b.canUseWebGL};return b}();c.WebGLUtils=b;b.prototype.__class__="egret.WebGLUtils"})(egret||(egret=
  335. {}));
  336. (function(c){var b=function(){function b(a){this.maxAttibs=10;this.attribState=[];this.tempAttribState=[];for(var c=0;c<this.maxAttibs;c++)this.attribState[c]=!1;this.setContext(a)}b.prototype.setContext=function(b){this.gl=b;this.primitiveShader=new a(b);this.defaultShader=new d(b);this.activateShader(this.defaultShader)};b.prototype.activateShader=function(a){this.gl.useProgram(a.program);this.setAttribs(a.attributes)};b.prototype.setAttribs=function(a){var b,c;c=this.tempAttribState.length;for(b=
  337. 0;b<c;b++)this.tempAttribState[b]=!1;c=a.length;for(b=0;b<c;b++)this.tempAttribState[a[b]]=!0;a=this.gl;c=this.attribState.length;for(b=0;b<c;b++)this.attribState[b]!==this.tempAttribState[b]&&(this.attribState[b]=this.tempAttribState[b],this.tempAttribState[b]?a.enableVertexAttribArray(b):a.disableVertexAttribArray(b))};return b}();c.WebGLShaderManager=b;b.prototype.__class__="egret.WebGLShaderManager";var d=function(){function a(b){this.defaultVertexSrc="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec2 aColor;\nuniform vec2 projectionVector;\nuniform vec2 offsetVector;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nconst vec2 center = vec2(-1.0, 1.0);\nvoid main(void) {\n gl_Position = vec4( ((aVertexPosition + offsetVector) / projectionVector) + center , 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n vec3 color = mod(vec3(aColor.y/65536.0, aColor.y/256.0, aColor.y), 256.0) / 256.0;\n vColor = vec4(color * aColor.x, aColor.x);\n}";
  338. this.program=null;this.fragmentSrc="precision lowp float;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nuniform sampler2D uSampler;\nvoid main(void) {\n gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;\n}";this.gl=b;this.init()}a.prototype.init=function(){var a=this.gl,b=c.WebGLUtils.compileProgram(a,this.defaultVertexSrc,this.fragmentSrc);a.useProgram(b);this.uSampler=a.getUniformLocation(b,"uSampler");this.projectionVector=a.getUniformLocation(b,"projectionVector");this.offsetVector=
  339. a.getUniformLocation(b,"offsetVector");this.dimensions=a.getUniformLocation(b,"dimensions");this.aVertexPosition=a.getAttribLocation(b,"aVertexPosition");this.aTextureCoord=a.getAttribLocation(b,"aTextureCoord");this.colorAttribute=a.getAttribLocation(b,"aColor");-1===this.colorAttribute&&(this.colorAttribute=2);this.attributes=[this.aVertexPosition,this.aTextureCoord,this.colorAttribute];this.program=b};return a}();c.EgretShader=d;d.prototype.__class__="egret.EgretShader";var a=function(){function a(b){this.alpha=
  340. this.translationMatrix=this.attributes=this.colorAttribute=this.aVertexPosition=this.tintColor=this.offsetVector=this.projectionVector=this.program=null;this.fragmentSrc="precision mediump float;\nvarying vec4 vColor;\nvoid main(void) {\n gl_FragColor = vColor;\n}";this.vertexSrc="attribute vec2 aVertexPosition;\nattribute vec4 aColor;\nuniform mat3 translationMatrix;\nuniform vec2 projectionVector;\nuniform vec2 offsetVector;\nuniform float alpha;\nuniform vec3 tint;\nvarying vec4 vColor;\nvoid main(void) {\n vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);\n v -= offsetVector.xyx;\n gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);\n vColor = aColor * vec4(tint * alpha, alpha);\n}";
  341. this.gl=b;this.init()}a.prototype.init=function(){var a=this.gl,b=c.WebGLUtils.compileProgram(a,this.vertexSrc,this.fragmentSrc);a.useProgram(b);this.projectionVector=a.getUniformLocation(b,"projectionVector");this.offsetVector=a.getUniformLocation(b,"offsetVector");this.tintColor=a.getUniformLocation(b,"tint");this.aVertexPosition=a.getAttribLocation(b,"aVertexPosition");this.colorAttribute=a.getAttribLocation(b,"aColor");this.attributes=[this.aVertexPosition,this.colorAttribute];this.translationMatrix=
  342. a.getUniformLocation(b,"translationMatrix");this.alpha=a.getUniformLocation(b,"alpha");this.program=b};return a}();c.PrimitiveShader=a;a.prototype.__class__="egret.PrimitiveShader"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  343. (function(c){var b=function(b){function a(){b.call(this)}__extends(a,b);a.prototype.proceed=function(a){function b(d){c.IOErrorEvent.dispatchIOErrorEvent(a)}function d(b){switch(a.dataFormat){case c.URLLoaderDataFormat.TEXT:a.data=f.responseText;break;case c.URLLoaderDataFormat.VARIABLES:a.data=new c.URLVariables(f.responseText);break;case c.URLLoaderDataFormat.BINARY:a.data=f.response;break;default:a.data=f.responseText}c.callLater(c.Event.dispatchEvent,c.Event,a,c.Event.COMPLETE)}if(a.dataFormat==
  344. c.URLLoaderDataFormat.TEXTURE)this.loadTexture(a);else if(a.dataFormat==c.URLLoaderDataFormat.SOUND)this.loadSound(a);else{var g=a._request,f=this.getXHR();f.onerror=b;f.onload=d;var h=c.NetContext._getUrl(g);f.open(g.method,h,!0);this.setResponseType(f,a.dataFormat);g.method!=c.URLRequestMethod.GET&&g.data?g.data instanceof c.URLVariables?(f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.send(g.data.toString())):(f.setRequestHeader("Content-Type","multipart/form-data"),f.send(g.data)):
  345. f.send()}};a.prototype.loadSound=function(a){function b(f){window.clearTimeout(g.__timeoutId);g.removeEventListener("canplaythrough",b,!1);g.removeEventListener("error",d,!1);f=new c.Sound;f._setAudio(g);a.data=f;c.callLater(c.Event.dispatchEvent,c.Event,a,c.Event.COMPLETE)}function d(f){window.clearTimeout(g.__timeoutId);g.removeEventListener("canplaythrough",b,!1);g.removeEventListener("error",d,!1);c.IOErrorEvent.dispatchIOErrorEvent(a)}var g=new Audio(a._request.url);g.__timeoutId=window.setTimeout(b,
  346. 100);g.addEventListener("canplaythrough",b,!1);g.addEventListener("error",d,!1);g.load()};a.prototype.getXHR=function(){return window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("MSXML2.XMLHTTP")};a.prototype.setResponseType=function(a,b){switch(b){case c.URLLoaderDataFormat.TEXT:case c.URLLoaderDataFormat.VARIABLES:a.responseType=c.URLLoaderDataFormat.TEXT;break;case c.URLLoaderDataFormat.BINARY:a.responseType="arraybuffer";break;default:a.responseType=b}};a.prototype.loadTexture=
  347. function(a){var b=a._request,d=new Image;d.crossOrigin="Anonymous";d.onload=function(b){d.onerror=null;d.onload=null;b=new c.Texture;b._setBitmapData(d);a.data=b;c.callLater(c.Event.dispatchEvent,c.Event,a,c.Event.COMPLETE)};d.onerror=function(b){d.onerror=null;d.onload=null;c.IOErrorEvent.dispatchIOErrorEvent(a)};d.src=b.url};return a}(c.NetContext);c.HTML5NetContext=b;b.prototype.__class__="egret.HTML5NetContext"})(egret||(egret={}));
  348. __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  349. (function(c){var b=function(b){function a(){b.call(this);this._isTouchDown=!1;this.rootDiv=document.getElementById(c.StageDelegate.canvas_div_name)}__extends(a,b);a.prototype.prevent=function(a){a.stopPropagation();!0!=a.isScroll&&a.preventDefault()};a.prototype.run=function(){var a=this;window.navigator.msPointerEnabled?(this.rootDiv.addEventListener("MSPointerDown",function(b){a._onTouchBegin(b);a.prevent(b)},!1),this.rootDiv.addEventListener("MSPointerMove",function(b){a._onTouchMove(b);a.prevent(b)},
  350. !1),this.rootDiv.addEventListener("MSPointerUp",function(b){a._onTouchEnd(b);a.prevent(b)},!1)):c.MainContext.deviceType==c.MainContext.DEVICE_MOBILE?this.addTouchListener():c.MainContext.deviceType==c.MainContext.DEVICE_PC&&(this.addTouchListener(),this.addMouseListener());window.addEventListener("mousedown",function(b){a.inOutOfCanvas(b)?a.dispatchLeaveStageEvent():a._isTouchDown=!0});window.addEventListener("mouseup",function(b){a._isTouchDown&&a.inOutOfCanvas(b)&&a.dispatchLeaveStageEvent();a._isTouchDown=
  351. !1})};a.prototype.addMouseListener=function(){var a=this;this.rootDiv.addEventListener("mousedown",function(b){a._onTouchBegin(b)});this.rootDiv.addEventListener("mousemove",function(b){a._onTouchMove(b)});this.rootDiv.addEventListener("mouseup",function(b){a._onTouchEnd(b)})};a.prototype.addTouchListener=function(){var a=this;this.rootDiv.addEventListener("touchstart",function(b){for(var c=b.changedTouches.length,d=0;d<c;d++)a._onTouchBegin(b.changedTouches[d]);a.prevent(b)},!1);this.rootDiv.addEventListener("touchmove",
  352. function(b){for(var c=b.changedTouches.length,d=0;d<c;d++)a._onTouchMove(b.changedTouches[d]);a.prevent(b)},!1);this.rootDiv.addEventListener("touchend",function(b){for(var c=b.changedTouches.length,d=0;d<c;d++)a._onTouchEnd(b.changedTouches[d]);a.prevent(b)},!1);this.rootDiv.addEventListener("touchcancel",function(b){for(var c=b.changedTouches.length,d=0;d<c;d++)a._onTouchEnd(b.changedTouches[d]);a.prevent(b)},!1)};a.prototype.inOutOfCanvas=function(a){a=this.getLocation(this.rootDiv,a);return 0>
  353. a.x||0>a.y||a.x>c.MainContext.instance.stage.width||a.y>c.MainContext.instance.stage.height?!0:!1};a.prototype.dispatchLeaveStageEvent=function(){c.MainContext.instance.stage.dispatchEventWith(c.Event.LEAVE_STAGE)};a.prototype._onTouchBegin=function(a){var b=this.getLocation(this.rootDiv,a),c=-1;a.hasOwnProperty("identifier")&&(c=a.identifier);this.onTouchBegan(b.x,b.y,c)};a.prototype._onTouchMove=function(a){var b=this.getLocation(this.rootDiv,a),c=-1;a.hasOwnProperty("identifier")&&(c=a.identifier);
  354. this.onTouchMove(b.x,b.y,c)};a.prototype._onTouchEnd=function(a){var b=this.getLocation(this.rootDiv,a),c=-1;a.hasOwnProperty("identifier")&&(c=a.identifier);this.onTouchEnd(b.x,b.y,c)};a.prototype.getLocation=function(a,b){var d=document.documentElement,g=window,f,h;"function"===typeof a.getBoundingClientRect?(h=a.getBoundingClientRect(),f=h.left,h=h.top):h=f=0;f+=g.pageXOffset-d.clientLeft;h+=g.pageYOffset-d.clientTop;null!=b.pageX?(d=b.pageX,g=b.pageY):(f-=document.body.scrollLeft,h-=document.body.scrollTop,
  355. d=b.clientX,g=b.clientY);var k=c.Point.identity;k.x=(d-f)/c.StageDelegate.getInstance().getScaleX();k.y=(g-h)/c.StageDelegate.getInstance().getScaleY();return k};return a}(c.TouchContext);c.HTML5TouchContext=b;b.prototype.__class__="egret.HTML5TouchContext"})(egret||(egret={}));__extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d};
  356. (function(c){var b=function(b){function a(){b.call(this);this._size=30;this._isShow=!0;this._inputType=this._text="";this._canUse=!1}__extends(a,b);a.prototype._getText=function(){return this._isShow?this.inputElement.value:this._text};a.prototype._setText=function(a){this._isShow?this.inputElement.value=a:this._text=a};a.prototype._setTextType=function(a){this.inputElement.type=a};a.prototype._getTextType=function(){return this.inputElement.type};a.prototype._setMultiline=function(a){b.prototype._setMultiline.call(this,
  357. a);this._createInput()};a.prototype._open=function(a,b,d,g){"undefined"===typeof d&&(d=160);var f=c.StageDelegate.getInstance().getScaleX(),h=c.StageDelegate.getInstance().getScaleY();g=c.Browser.getInstance().$new("div");g.position.x=a*f;g.position.y=b*h;g.style.width=d+"px";g.scale.x=f;g.scale.y=h;g.transforms();g.style[egret_dom.getTrans("transformOrigin")]="0% 0% 0px";a=this.getStageDelegateDiv();a.appendChild(g);this.div=g;this._createInput();g&&!g.parentNode&&(a=this.getStageDelegateDiv(),a.appendChild(g));
  358. g.style.display="block";this._call=this.onHandler.bind(this)};a.prototype._createInput=function(){var a=!1,b;this._multiline&&"textarea"!=this._inputType?(a=!0,this._inputType="textarea",b=document.createElement("textarea")):this._multiline||"input"==this._inputType||(a=!0,this._inputType="input",b=document.createElement("input"));a&&(b.type="text",b.style.fontSize=this._size+"px",b.style.lineHeight=this._size+"px",b.style.textAlign="left",b.style.fontFamily="Arial",b.style.fontStyle="normal",b.style.fontWeight=
  359. "normal",b.style.color="#FFFFFF",b.style.border="none",b.style.background="none",b.style.width=this.div.style.width,b.style.padding="0",b.style.outline="medium",this.inputElement&&this.inputElement.parentNode?(this.inputElement.parentNode.removeChild(this.inputElement),this._removeListeners(),this.inputElement=b,this._addListeners()):this.inputElement=b,this.div.appendChild(b))};a.prototype._addListeners=function(){window.navigator.msPointerEnabled?(this.addListener("MSPointerDown"),this.addListener("MSPointerUp")):
  360. c.MainContext.deviceType==c.MainContext.DEVICE_MOBILE?(this.addListener("touchstart"),this.addListener("touchend"),this.addListener("touchcancel")):c.MainContext.deviceType==c.MainContext.DEVICE_PC&&(this.addListener("mousedown"),this.addListener("mouseup"));this.addListener("focus");this.addListener("blur");this._isShow=!0;this._closeInput();this.closeKeyboard()};a.prototype._removeListeners=function(){window.navigator.msPointerEnabled?(this.removeListener("MSPointerDown"),this.removeListener("MSPointerUp")):
  361. c.MainContext.deviceType==c.MainContext.DEVICE_MOBILE?(this.removeListener("touchstart"),this.removeListener("touchend"),this.removeListener("touchcancel")):c.MainContext.deviceType==c.MainContext.DEVICE_PC&&(this.removeListener("mousedown"),this.removeListener("mouseup"));this.removeListener("blur");this.removeListener("focus")};a.prototype.addListener=function(a){this.inputElement.addEventListener(a,this._call)};a.prototype.removeListener=function(a){this.inputElement.removeEventListener(a,this._call)};
  362. a.prototype.onHandler=function(a){a.isScroll=!0;"blur"==a.type?(this.dispatchEvent(new c.Event("blur")),this._closeInput()):"focus"==a.type?this._canUse?(this._canUse=!1,this._openInput(),this.dispatchEvent(new c.Event("focus"))):(a.isScroll=!1,this.inputElement.blur()):("touchstart"==a.type||"mousedown"==a.type||"MSPointerDown"==a.type)&&this._isShow&&a.stopPropagation()};a.prototype._show=function(){this._canUse=!0};a.prototype._hide=function(){this._canUse=!1;this._closeInput();this.closeKeyboard()};
  363. a.prototype._openInput=function(){this._isShow||(this._isShow=!0,this.inputElement.value=this._text)};a.prototype._closeInput=function(){this._isShow&&(this._isShow=!1,this._text=this.inputElement.value,this.inputElement.value="")};a.prototype.closeKeyboard=function(){this.inputElement.focus();this.inputElement.blur()};a.prototype.getStageDelegateDiv=function(){var a=c.Browser.getInstance().$("#StageDelegateDiv");a||(a=c.Browser.getInstance().$new("div"),a.id="StageDelegateDiv",document.getElementById(c.StageDelegate.canvas_div_name).appendChild(a),
  364. a.transforms());return a};a.prototype._remove=function(){var a=this.div;a&&a.parentNode&&a.parentNode.removeChild(a)};a.prototype.changePosition=function(a,b){var d=c.StageDelegate.getInstance().getScaleX(),g=c.StageDelegate.getInstance().getScaleY();this.div.position.x=a*d;this.div.position.y=b*g;this.div.transforms()};a.prototype.changeSize=function(a,b){this.inputElement.style.width=a+"px";this.div.style.width=a+"px";this.div.transforms()};a.prototype.setSize=function(a){this._size=a;this.inputElement.style.fontSize=
  365. this._size+"px"};a.prototype.setTextColor=function(a){this.inputElement.style.color=a};a.prototype.setTextFontFamily=function(a){this.inputElement.style.fontFamily=a};a.prototype.setWidth=function(a){this.inputElement.style.width=a+"px"};a.prototype.setHeight=function(a){this.inputElement.style.height=a+"px"};return a}(c.StageText);c.HTML5StageText=b;b.prototype.__class__="egret.HTML5StageText"})(egret||(egret={}));egret.StageText.create=function(){return new egret.HTML5StageText};
  366. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},ImgBtn=function(c){function b(b,a,e){c.call(this);e&&(this.resName=e);this.initBtn(b,a)}__extends(b,c);b.prototype.initBtn=function(b,a,c){this.removeChildren();this.resName?(this.upImg=ResourceUtils.createBitmapFromSheet(b,this.resName),this.downImg=ResourceUtils.createBitmapFromSheet(a,this.resName)):(this.upImg=ResourceUtils.createBitmapByName(b),
  367. this.downImg=ResourceUtils.createBitmapByName(a));this.downImg.visible=!1;this.upImg.anchorX=0.5;this.upImg.anchorY=0.5;this.downImg.anchorX=0.5;this.downImg.anchorY=0.5;this.addChild(this.downImg);this.addChild(this.upImg);this.touchEnabled=!0;this.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.touchBegin,this);this.addEventListener(egret.TouchEvent.TOUCH_END,this.touchEnd,this);this.addEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.touchEnd,this)};b.prototype.touchBegin=function(b){this.downImg.visible=
  368. !0;this.upImg.visible=!1};b.prototype.touchEnd=function(b){this.downImg.visible=!1;this.upImg.visible=!0};return b}(egret.Sprite);ImgBtn.prototype.__class__="ImgBtn";
  369. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},TipsBaseView=function(c){function b(){c.call(this)}__extends(b,c);b.prototype.drawBorder=function(b,a,c,l){this.width=b;this.height=a;this.bp=520==b?ResourceUtils.createBitmapByName("bj"):200==b?ResourceUtils.createBitmapByName("taskTitle"):ResourceUtils.createBitmapByName("btnbj");this.addChildAt(this.bp,0)};return b}(egret.Sprite);
  370. TipsBaseView.prototype.__class__="TipsBaseView";var ResourceUtils=function(){function c(){}c.createBitmapByName=function(b){var c=new egret.Bitmap;b=RES.getRes(b);c.texture=b;return c};c.createBitmapFromSheet=function(b,c){"undefined"===typeof c&&(c="gameRes");var a=RES.getRes(c).getTexture(b),e=new egret.Bitmap;e.texture=a;return e};c.getTextureFromSheet=function(b,c){"undefined"===typeof c&&(c="gameRes");return RES.getRes(c).getTexture(b)};return c}();ResourceUtils.prototype.__class__="ResourceUtils";
  371. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},Title=function(c){function b(b,a){c.call(this);this.tw=18;this.th=16;this.tColor=16777215;this.bBj=ResourceUtils.createBitmapByName("processB");this.bBj.visible=!1;this.addChild(this.bBj);this.hBj=ResourceUtils.createBitmapByName("processH");this.hBj.visible=!1;this.addChild(this.hBj);this.update(b,a,16777215)}__extends(b,c);b.prototype.update=
  372. function(b,a,c){this.tw=b;this.th=a;this.tColor=c;16777215==c?this.hBj.visible=!1:(this.bBj.visible=!1,this.hBj.visible=!0)};return b}(egret.Sprite);Title.prototype.__class__="Title";var Consts=function(){function c(){}c.Game_Width=570;c.title="\u611a\u516c\u79fb\u5c71";c.desc="\u4ece\u524d\u6709\u4e2a\u4f20\u8bf4\uff0c\u611a\u516c\u8eba\u7740\u90fd\u80fd\u751f\u5b69\u5b50\u3002";c.iconLink="http://egret-game.b0.upaiyun.com/foolMan/120.png";return c}();Consts.prototype.__class__="Consts";
  373. var NumUtils=function(){function c(){}c.numToString=function(b){c.numString=Math.floor(b).toString();c.numString=c.numString.split("").reverse().join("").replace(/(\d{3})/g,"$1,").split("").reverse().join("");b=c.numString.length;","==c.numString.charAt(0)&&(c.numString=c.numString.slice(1,b));return c.numString};c.stringToString=function(b){c.sS=b;b=c.sS.indexOf(".");-1!=b&&(c.sS=c.sS.substring(0,b));c.sS=c.sS.split("").reverse().join("").replace(/(\d{3})/g,"$1,").split("").reverse().join("");b=
  374. c.sS.length;","==c.sS.charAt(0)&&(c.sS=c.sS.slice(1,b));return c.sS};c.numToW=function(b){};return c}();NumUtils.prototype.__class__="NumUtils";
  375. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},TitleTips=function(c){function b(){c.call(this);this.bgAlpha=0.8;this.init()}__extends(b,c);b.prototype.init=function(){this.maskBj=ResourceUtils.createBitmapByName("mask");this.maskBj.width=Consts.Game_Width;this.maskBj.height=30;this.maskBj.alpha=0.6;this.addChild(this.maskBj);this.leftLb=new egret.TextField;this.leftLb.x=10;this.leftLb.y=
  376. 5;this.leftLb.size=20;this.addChild(this.leftLb);this.leftTxt=new egret.TextField;this.leftTxt.x=58;this.leftTxt.y=5;this.leftTxt.size=20;this.rightLb=new egret.TextField;this.rightLb.x=330;this.rightLb.y=5;this.rightLb.width=230;this.rightLb.textAlign="right";this.rightLb.size=20;this.addChild(this.rightLb);this.rightTxt=new egret.TextField;this.rightTxt.x=510;this.rightTxt.y=5;this.rightTxt.size=20;this.width=Consts.Game_Width};b.prototype.updateLb=function(b,a,c){this.bgAlpha=c;this.leftTxtS=this.leftLb.text=
  377. b;this.rightTxtS=this.rightLb.text=a;this.leftLb.text=b+"0 /\u79d2";this.rightLb.text=a+"0%"};b.prototype.updateTxt=function(b,a){this.leftLb.text=this.leftTxtS+NumUtils.numToString(b);this.rightLb.text=NumUtils.numToString(a)+" /\u79d2"};b.prototype.updateLeft=function(b){this.leftLb.text=this.leftTxtS+NumUtils.numToString(b)+" /\u79d2"};b.prototype.updateRight=function(b){this.rightLb.text=this.rightTxtS+Math.floor(100*b).toString()+"%"};b.prototype.resetRightX=function(){};return b}(egret.Sprite);
  378. TitleTips.prototype.__class__="TitleTips";var AGK=function(){return function(){}}();AGK.prototype.__class__="AGK";
  379. var HouseType=function(){function c(){}c.H0=0;c.H1=1;c.H2=2;c.H3=3;c.H4=4;c.H0_ICON="10000";c.H0_NEED=1;c.H0_TITLE="\u8349\u623f";c.H0_DESC="\u4e0d\u8981\u770b\u4e0d\u8d77\u8349\u623f\uff0c\u6bcf\u6b21\u70b9\u51fb+1\u4e2a\u5b50\u5b59\u54df\u3002";c.H0_JC=1;c.H1_ICON="10010";c.H1_NEED=100;c.H1_TITLE="\u8c6a\u5b85";c.H1_DESC="\u5176\u5b9e\u5c31\u662f\u4e00\u4e2a\u724c\u533e\u5566\uff5e\uff08\u6bcf\u6b21\u70b9\u51fb+20\u4e2a\u513f\u5b59\uff0c\u6bcf\u79d2\u513f\u5b59\u4ea7\u91cf\u63d0\u5347110%\uff09";c.H1_JC=
  380. 1.1;c.H2_ICON="10020";c.H2_NEED=500;c.H2_TITLE="\u8349\u623f";c.H2_DESC="";c.H2_JC=1;c.H3_ICON="10030";c.H3_NEED=500;c.H3_TITLE="\u8349\u623f";c.H3_DESC="";c.H3_JC=1;c.H4_ICON="10040";c.H4_NEED=500;c.H4_TITLE="\u8349\u623f";c.H4_DESC="";c.H4_JC=1;return c}();HouseType.prototype.__class__="HouseType";
  381. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},Progress=function(c){function b(b){c.call(this);this.lg=18;this.currentLg=0;this.magin=2;this.tw=18;this.th=16;this.lg=b;this.init()}__extends(b,c);b.prototype.init=function(){this.bg=ResourceUtils.createBitmapByName("process");this.addChild(this.bg);this.bg2m=new egret.Rectangle;this.bg2m.width=360;this.bg2m.height=16;this.mask=this.bg2m;
  382. this.bg2=ResourceUtils.createBitmapByName("process2");this.bg2.x=-360;this.addChild(this.bg2)};b.prototype.update=function(b,a){"undefined"===typeof a&&(a=!1);b<=this.lg&&(this.currentLg=b);if(a)for(var c=0;c<this.lg;c++)this.bg2.x=-360;else for(c=0;c<this.currentLg;c++)this.bg2.x=20*this.currentLg-360};return b}(egret.Sprite);Progress.prototype.__class__="Progress";
  383. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},StateBtn=function(c){function b(b,a,e){c.call(this);this.selected=!1;e||(e=!1);this.initBtn(b,a,e)}__extends(b,c);b.prototype.initBtn=function(b,a,c){this.upImg=ResourceUtils.createBitmapFromSheet(b,"btnRes");this.downImg=ResourceUtils.createBitmapFromSheet(a,"btnRes");this.updateState(c);this.downImg.visible=!1;this.addChild(this.downImg);
  384. this.addChild(this.upImg);this.touchEnabled=!0;this.addEventListener(egret.TouchEvent.TOUCH_TAP,this.touchTap,this)};b.prototype.updateState=function(b){(this.selected=b)?(this.upImg.visible=!1,this.downImg.visible=!0):(this.upImg.visible=!0,this.downImg.visible=!1)};b.prototype.touchTap=function(b){this.selected=!this.selected;this.updateState(this.selected)};return b}(egret.Sprite);StateBtn.prototype.__class__="StateBtn";
  385. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},TopView=function(c){function b(){c.call(this);this.dq="\u5f53\u524d\u5171\uff1a";this.dw=" \u5b50\u5b59";this.isPlayingRed=this.isPlayingRed1=!1;this.init()}__extends(b,c);b.prototype.init=function(){this.initView()};b.prototype.initView=function(){this.bg=ResourceUtils.createBitmapByName("title");this.addChild(this.bg);this.targetLb=
  386. new egret.TextField;this.targetLb.text="\u76ee\u6807";this.targetLb.x=440;this.targetLb.y=20;this.targetLb.size=22;this.targetLb.width=70;this.targetLb.textAlign="center";this.addChild(this.targetLb);this.targetTxt=new egret.TextField;this.targetTxt.text="0";this.targetTxt.x=440;this.targetTxt.y=46;this.targetTxt.size=22;this.targetTxt.width=70;this.targetTxt.textAlign="center";this.addChild(this.targetTxt);this.progress=new Progress(18);this.progress.x=75;this.progress.y=28;this.addChild(this.progress);
  387. this.timeTip=new egret.TextField;this.timeTip.x=10;this.timeTip.y=25;this.timeTip.size=30;this.timeTip.textColor=16777215;this.timeTip.text="60'";this.addChild(this.timeTip);this.soundBtn=new StateBtn("60100_1","60100_2");this.soundBtn.x=520;this.soundBtn.y=22;this.addChild(this.soundBtn);this.sonTip=new egret.TextField;this.sonTip.x=110;this.sonTip.y=61;this.sonTip.width=320;this.sonTip.textAlign="center";this.sonTip.size=20;this.sonTip.text="\u5f53\u524d:0 \u5b50\u5b59";this.addChild(this.sonTip);
  388. this.sonsTxt=new egret.TextField;this.sonsTxt.x=175;this.sonsTxt.y=58;this.sonsTxt.size=20;this.sonsTxt.text="0";this.sonsTxt2=new egret.TextField;this.sonsTxt2.x=205;this.sonsTxt2.y=58;this.sonsTxt2.size=20;this.sonsTxt2.text="\u4e2a\u513f\u5b59";this.titleTips=new TitleTips;this.titleTips.y=93;this.titleTips.updateLb("\u4ea7\u91cf\uff1a","\u52a0\u6210\uff1a",0.3);this.addChild(this.titleTips);this.ssTimer=new egret.Timer(200,10);this.ssTimer.addEventListener(egret.TimerEvent.TIMER,this.playTargetTxt,
  389. this);this.ssTimer1=new egret.Timer(200,50);this.ssTimer1.addEventListener(egret.TimerEvent.TIMER,this.playTimeTxt,this)};b.prototype.updateTitleTip=function(b,a){this.titleTips.updateTxt(b,a)};b.prototype.updateProgress=function(b,a){"undefined"===typeof a&&(a=!1);this.progress.update(b,a)};b.prototype.updateSonTxt=function(b){this.sonTip.text=this.dq+NumUtils.numToString(b)+this.dw;450<this.sonsTxt.width?this.sonsTxt2.x=this.sonsTxt.x+470:400<this.sonsTxt.width?this.sonsTxt2.x=this.sonsTxt.x+430:
  390. 350<this.sonsTxt.width?this.sonsTxt2.x=this.sonsTxt.x+380:300<this.sonsTxt.width?this.sonsTxt2.x=this.sonsTxt.x+330:250<this.sonsTxt.width?this.sonsTxt2.x=this.sonsTxt.x+280:200<this.sonsTxt.width?this.sonsTxt2.x=this.sonsTxt.x+230:150<this.sonsTxt.width?this.sonsTxt2.x=this.sonsTxt.x+180:100<this.sonsTxt.width?this.sonsTxt2.x=this.sonsTxt.x+130:50<this.sonsTxt.width?this.sonsTxt2.x=this.sonsTxt.x+80:20<this.sonsTxt.width&&(this.sonsTxt2.x=this.sonsTxt.x+50)};b.prototype.updateTagetTxt=function(b){this.targetTxt.text=
  391. b};b.prototype.updateTimeTxt=function(b,a){"undefined"===typeof a&&(a=!1);10>=b?this.timeTip.textColor=16711680:a&&(this.timeTip.textColor=16777215);this.timeTip.text=b.toString()+"''"};b.prototype.playTimeTxt=function(b){this.isPlayingRed1?(this.timeTip.textColor=16777215,this.isPlayingRed1=!1):(this.timeTip.textColor=16711680,this.isPlayingRed1=!0);50<=this.ssTimer1.currentCount()&&(this.ssTimer1.stop(),this.ssTimer1.reset(),this.isPlayingRed1=!1,this.timeTip.textColor=16777215)};b.prototype.updateDCL=
  392. function(b){this.titleTips.updateLeft(b)};b.prototype.updateJC=function(b){this.titleTips.updateRight(b)};b.prototype.ssTargetTxt=function(){this.ssTimer.start()};b.prototype.playTargetTxt=function(b){this.isPlayingRed?(this.targetLb.textColor=16777215,this.targetTxt.textColor=16777215,this.timeTip.textColor=16777215,this.isPlayingRed=!1):(this.targetLb.textColor=16711680,this.targetTxt.textColor=16711680,this.timeTip.textColor=16711680,this.isPlayingRed=!0);10<=this.ssTimer.currentCount()&&(this.ssTimer.stop(),
  393. this.ssTimer.reset(),this.isPlayingRed=!1,this.targetLb.textColor=16777215,this.timeTip.textColor=16777215)};return b}(egret.Sprite);TopView.prototype.__class__="TopView";
  394. var TaskManager=function(){function c(){this.hasGood=this.dcl=this.runTime=this.targetTime=this.currentNum=this.targetNum=0;this.stop=!1;this.currentTaskIndex=0;this.taskList=[];this.fxjs=1;this.taskIsPause=!0;this.ydArr=[];this.isLastTask=!1;this.proLg=this.difDcl=0;if(null!=c._instance)throw Error("singleton");}c.instance=function(){return null==this._instance?this._instance=new c:this._instance};c.prototype.initTaskManager=function(){this.taskLayer.taskView.addEventListener(egret.TouchEvent.TOUCH_TAP,
  395. this.closeTaskView,this);this.taskLayer.taskFailView.restartBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.restartGame,this);this.taskLayer.taskFailView.qzBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.shareGame,this);this.taskLayer.taskFailView.andrb.addEventListener(egret.TouchEvent.TOUCH_TAP,this.loadGame,this);this.initTaskList()};c.prototype.loadGame=function(b){console.log("loadGameEvent");ShareUtils.loadGame()};c.prototype.initTaskList=function(){for(var b=RES.getRes("yindaoRes"),
  396. c=b.yindao.length,a=0;a<c;a++)this.ydArr.push(b.yindao[a].gkIndex);b=RES.getRes("taskList");c=b.taskList.length;for(a=0;a<c;a++){var e=new Task;e.index=b.taskList[a].tid;e.target=b.taskList[a].target;e.targetS=b.taskList[a].targetS;e.time=b.taskList[a].time;e.icon=b.taskList[a].icon;e.isShowTip=1==b.taskList[a].type?!0:!1;e.jc=b.taskList[a].jc;e.title=b.taskList[a].name;e.desc=b.taskList[a].desc;this.taskList.push(e)}this.fxjs=b.fxjs;egret.setTimeout(this.setFXJC,this,25E3)};c.prototype.setFXJC=function(){DataManager.instance().fxJc=
  397. ShareUtils.help*this.fxjs;DataManager.instance().updateJC(DataManager.instance().fxJc,!0)};c.prototype.goGame=function(){this.taskLayer.visible=!1;MCLayer.me.updateTxt(this.currentTask.targetS,this.currentTask.time)};c.prototype.startGameFromPause=function(){GameContent.me.startGame()};c.prototype.pauseGame=function(){GameContent.me.stopGame()};c.prototype.shareGame=function(){Consts.GameApp.shareGame(this.taskLayer.taskFailView.shareTxts)};c.prototype.restartGame=function(){GameContent.me.restart()};
  398. c.prototype.restart=function(){this.currentTaskIndex=this.proLg=this.difDcl=this.dcl=this.runTime=this.targetTime=this.targetNum=this.currentNum=0;this.isLastTask=!1;this.taskLayer.restart()};c.prototype.startTask=function(){this.taskList[this.currentTaskIndex]?(this.updateTask(this.taskList[this.currentTaskIndex]),this.currentNum=0,this.targetNum=this.currentTask.target,this.runTime=0,this.targetTime=1E3*this.currentTask.time,this.proLg=0,this.timeTips=this.currentTask.time,this.gameTitle.updateProgress(this.proLg,
  399. !0),this.gameTitle.updateTagetTxt(this.currentTask.targetS),this.gameTitle.updateTimeTxt(this.timeTips,!0),1==this.currentTaskIndex&&egret.setTimeout(this.showStartView,this,800)):(this.startGameFromPause(),this.isLastTask=!0,this.gameTitle.updateProgress(this.proLg,!0),this.gameTitle.updateTagetTxt("0"),this.gameTitle.updateTimeTxt(0,!0),GameContent.me.gameLayer.house.touchEnabled=!0)};c.prototype.closeTaskView=function(b){1==this.currentTaskIndex?this.closeStartView(b):this.goGame()};c.prototype.showStartView=
  400. function(){this.taskLayer.showStartView(this.currentTask.targetS,this.currentTask.desc,"2");this.pauseGame()};c.prototype.closeStartView=function(b){this.taskLayer.visible=!1;MCLayer.me.updateTxt(this.currentTask.targetS,this.currentTask.time)};c.prototype.updateTask=function(b){this.prevTask=this.currentTask?this.currentTask:b;this.currentTask=b;this.currentTaskIndex++};c.prototype.pauseTask=function(){this.taskIsPause=!0;egret.Ticker.getInstance().unregister(this.taskRunning,this);GameContent.me.gameLayer.house.touchEnabled=
  401. !1};c.prototype.goTaskFromPause=function(){this.startGameFromPause();egret.Ticker.getInstance().register(this.taskRunning,this);GameContent.me.gameLayer.house.touchEnabled=!0;this.taskIsPause=!1};c.prototype.taskRunning=function(b){this.runTime+=b;this.difDcl=b/1E3*this.dcl;this.currentNum+=this.difDcl;this.currentNum>=this.targetNum?(this.pauseTask(),this.pauseGame(),this.finishedTask()):(this.runTime>=this.targetTime&&this.failedTask(),this.updateGameTitle())};c.prototype.updateCurrentNum=function(b){this.taskIsPause||
  402. (this.currentNum+=b)};c.prototype.finishedTask=function(){this.currentTask.isShowTip?(this.gameTitle.updateProgress(100),GameContent.me.gameLayer.house.touchEnabled=!1,this.startTask(),this.isLastTask||this.taskLayer.showFinishTxt(this.currentTask.title,this.currentTask.desc,this.currentTask.icon,this.currentTask.targetS)):this.startTask()};c.prototype.failedTask=function(){this.pauseTask();GameContent.me.stopGame();this.lszg=ShareUtils.lszg;this.lszg<DataManager.instance().currentTotal&&(this.lszg=
  403. Math.floor(DataManager.instance().currentTotal),ShareUtils.cm(this.lszg));var b=NumUtils.numToString(this.lszg);this.taskLayer.taskFailView.updateLS(b);this.prevTask?this.taskLayer.showFailTxt(this.prevTask.title,Math.floor(DataManager.instance().currentTotal),"3"):this.taskLayer.showFailTxt(this.currentTask.title,Math.floor(DataManager.instance().currentTotal),"3")};c.prototype.updateDcl=function(b){this.dcl=b};c.prototype.updateGameTitle=function(){this.timeTips=Math.floor((this.targetTime-this.runTime)/
  404. 1E3);this.proLg=Math.ceil(this.currentNum/this.targetNum*18);0>=this.timeTips&&(this.timeTips=0);this.gameTitle.updateProgress(this.proLg);this.gameTitle.updateTimeTxt(this.timeTips)};return c}();TaskManager.prototype.__class__="TaskManager";var GK=function(){return function(){this.itemNum=0;this.needsList=[];this.currentIndex=this.ADD=0;this.list=[]}}();GK.prototype.__class__="GK";
  405. var GKConsts=function(){function c(){}c.HOME=0;c.GK1=1;c.GK2=2;c.GK3=3;c.GK4=4;c.GK_TargetTxt="\u9700\u8981\u5b50\u5b59\uff1a";c.GK_CurrentTxt="\u5f53\u524d\u5b50\u5b59\uff1a";c.GK1_Icon="20100";c.GK1_Title="\u8349\u4e1b ";c.GK1_Desc="\u4eba\u7c7b\u6587\u660e\u7684\u7e41\u884d\uff0c\u4ece\u8349\u4e1b\u5f00\u59cb\uff01";c.GK2_Icon="20200";c.GK2_Title="\u4e5d\u9633\u795e\u529f ";c.GK2_Desc="\u4f20\u8bf4\u4e2d\u7684\u6b66\u6797\u79d8\u7c4d\uff0c\u63d0\u9ad8\u547d\u4e2d\u7387\uff01";c.GK3_Icon="20300";
  406. c.GK3_Title="\u795e\u65cf\u6c34\u6676 ";c.GK3_Desc="\u795e\u65cf\u91d1\u514b\u62c9\u6280\u672f\uff0c\u63d0\u9ad8\u4eba\u53e3\u4ea9\u4ea7\uff01";c.GK4_Icon="20400";c.GK4_Title="\u514b\u9686\u4eba\u88c5\u7f6e ";c.GK4_Desc="\u57fa\u56e0\u6280\u672f\uff0c\u65e0\u6027\u5927\u6279\u91cf\u7e41\u6b96\uff01";c.GK1_First=1;c.GK1_JS=2;c.GK1_DCL=1;c.GK2_First=50;c.GK2_JS=1.7;c.GK2_DCL=10;c.GK3_First=200;c.GK3_JS=1.6;c.GK3_DCL=50;c.GK4_First=2500;c.GK4_JS=1.5;c.GK4_DCL=100;return c}();
  407. GKConsts.prototype.__class__="GKConsts";var GKType=function(){function c(){}c.HOME=0;c.GK1=1;c.GK2=2;c.GK3=3;c.GK4=4;return c}();GKType.prototype.__class__="GKType";
  408. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},House=function(c){function b(){c.call(this,"10000","10005","houseRes");this.houseType=HouseType.H0;this.downImg.scaleY=1.2}__extends(b,c);b.prototype.setHouseType=function(b){console.log("houseType:::::",b);this.houseType=b;this.resetUpAndDownByType(b)};b.prototype.resetUpAndDownByType=function(b){switch(b){case HouseType.H0:this.initBtn("10000",
  409. "10005","houseRes");this.downImg.scaleY=1.2;break;case HouseType.H1:this.initBtn("10010","10015","houseRes");this.downImg.scaleY=1.2;break;case HouseType.H2:this.initBtn("10020","10025","houseRes");this.downImg.scaleY=1.2;break;case HouseType.H3:this.initBtn("10030","10035","houseRes");this.downImg.scaleY=1.3;break;case HouseType.H4:this.initBtn("10040","10045","houseRes"),this.downImg.scaleY=1.2}};return b}(ImgBtn);House.prototype.__class__="House";
  410. var RoleState=function(){function c(){}c.FLY=0;c.RUN=1;c.STAND=2;c.DIE=3;c.FLYANDDIE=4;return c}();RoleState.prototype.__class__="RoleState";var RoleType=function(){function c(){}c.PT=0;c.BIG=1;c.QUN=2;c.DOG=3;c.BUS=4;return c}();RoleType.prototype.__class__="RoleType";
  411. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},BaseBitmap=function(c){function b(b){c.call(this);this._img=b;this.initImg()}__extends(b,c);b.prototype.initImg=function(){this.addChild(this._img)};return b}(egret.Sprite);BaseBitmap.prototype.__class__="BaseBitmap";
  412. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},BaseMc=function(c){function b(b){c.call(this);this.__currentFrame=0;this.__frameRate=24;this.__frameTime=1E3/24;this.__endFrame=this.__startFrame=this.__currentTime=0;this.__imgArr=b;this.initMc()}__extends(b,c);b.prototype.initMc=function(){for(var b=0;b<this.__imgArr.length;b++){var a=this.__imgArr[b];0==b&&this.addChild(a)}};b.prototype.play=
  413. function(b){"undefined"===typeof b&&(b=!1);b||(this.__startFrame=0,this.__endFrame=this.__imgArr.length-1);this.__currentTime=0;egret.Ticker.getInstance().register(this.loop,this)};b.prototype.loop=function(b){this.__currentTime+=b;this.__currentTime>this.__frameTime&&(this.__currentTime=0,this.playImg())};b.prototype.playImg=function(){this.__imgArr[this.__currentFrame].parent&&this.removeChild(this.__imgArr[this.__currentFrame]);this.__currentFrame<this.__endFrame?this.__currentFrame++:this.__currentFrame=
  414. this.__startFrame;this.addChild(this.__imgArr[this.__currentFrame])};b.prototype.stop=function(){egret.Ticker.getInstance().unregister(this.loop,this)};b.prototype.replay=function(){this.gotoAndStop(0);this.play()};b.prototype.gotoAndStop=function(b){this.stop();this.__imgArr[this.__currentFrame].parent&&this.removeChild(this.__imgArr[this.__currentFrame]);this.__currentFrame=b;this.__currentTime=0;this.addChild(this.__imgArr[this.__currentFrame])};b.prototype.gotoAndPlay=function(b){this.gotoAndStop(b);
  415. this.play()};b.prototype.playPart=function(b,a){this.__startFrame=b;this.__endFrame=a;this.gotoAndStop(b);this.play(!0)};b.prototype.setFrameTime=function(b){this.__frameTime=b};b.prototype.setFrameRate=function(b){this.__frameRate=b;this.__frameTime=1E3/this.__frameRate};return b}(egret.Sprite);BaseMc.prototype.__class__="BaseMc";
  416. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},BgTxt=function(c){function b(){c.call(this);this.init()}__extends(b,c);b.prototype.init=function(){this.bg=ResourceUtils.createBitmapByName("btnbj");this.addChild(this.bg);this.txt=new egret.TextField;this.txt.x=15;this.txt.y=15;this.txt.size=20;this.txt.textColor=0;this.addChild(this.txt)};b.prototype.updateTxt=function(b){this.bg.width=
  417. 310;this.bg.height=70;this.txt.width=295;this.txt.height=50;this.txt.text=b};return b}(egret.Sprite);BgTxt.prototype.__class__="BgTxt";
  418. var GKManager=function(){function c(){this.colseGKNumber=0;this.hasClickLeftArrow=this.hasClickDown1=this.hasClickDown=!1;this.buyCurrent=this.needNum=0;this.isBuyColor=!0;this.hasShow=!1;if(null!=c._instance)throw Error("singleton");}c.instance=function(){return null==this._instance?this._instance=new c:this._instance};c.prototype.initGKManager=function(){this.gameLayer.home.addBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.showItemLayer,this);this.gameLayer.gk1.addBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,
  419. this.showItemLayer,this);this.gameLayer.gk2.addBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.showItemLayer,this);this.itemLayer.buyView.buyBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.buyResult,this);this.itemLayer.buyView.closeBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.closeBuyItem,this);this.itemLayer.buyHouseView.closeBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.closeBuyHouse,this);this.initGK()};c.prototype.initGK=function(){var b=RES.getRes("gkList"),c=b.gk1List;
  420. this.gk1js=b.gk1Need.js;this.gk1n1=b.gk1Need.n1;this.gk1n2=b.gk1Need.n2;this.gk1Add=b.gk1Need.add;this.initGKList(this.gameLayer.gk1.gkData,c,this.gk1js,this.gk1n1,this.gk1n2,this.gk1Add);this.gameLayer.gk1.setGKData();c=b.gk2List;this.gk2js=b.gk2Need.js;this.gk2n1=b.gk2Need.n1;this.gk2n2=b.gk2Need.n2;this.gk2Add=b.gk2Need.add;this.initGKList(this.gameLayer.gk2.gkData,c,this.gk2js,this.gk2n1,this.gk2n2,this.gk2Add);this.gameLayer.gk2.setGKData();c=b.gk3List;this.gk3js=b.gk3Need.js;this.gk3n1=b.gk3Need.n1;
  421. this.gk3n2=b.gk3Need.n2;this.gk3Add=b.gk3Need.add;this.initGKList(this.gameLayer.gk3.gkData,c,this.gk3js,this.gk3n1,this.gk3n2,this.gk3Add);this.gameLayer.gk3.setGKData();c=b.gk4List;this.gk4js=b.gk4Need.js;this.gk4n1=b.gk4Need.n1;this.gk4n2=b.gk4Need.n2;this.gk4Add=b.gk4Need.add;this.initGKList(this.gameLayer.gk4.gkData,c,this.gk4js,this.gk4n1,this.gk4n2,this.gk4Add);this.gameLayer.gk4.setGKData()};c.prototype.initGKList=function(b,c,a,e,l,n){for(l=0;l<c.length;l++){var g=new AGK;g.id=c[l].tid;g.need=
  422. c[l].need;g.add=c[l].add;b.list.push(g)}if(100>c.length)for(l=100-c.length,c=c.length+1,g=0;g<l;g++){var f=new AGK;f.id=c;var h=a*Math.pow(e,c);f.need=Math.floor(h);f.add=c*n;b.list.push(f);c++}a=new AGK;a.id=101;a.need=1E13;a.add=1;b.list.push(a)};c.prototype.restart=function(){this.gameLayer.gk1.restart();this.gameLayer.gk2.restart();this.gameLayer.gk3.restart();this.gameLayer.gk4.restart();this.itemLayer.restart()};c.prototype.closeBuyItem=function(b){this.itemLayer.visible=!1;TaskManager.instance().currentTaskIndex==
  423. TaskManager.instance().ydArr[1]?this.hasClickDown||(this.gameLayer.closeDownArrow(),this.hasClickDown=!0):TaskManager.instance().currentTaskIndex!=TaskManager.instance().ydArr[2]||this.hasClickDown1||(this.gameLayer.closeDownArrow1(),this.hasClickDown1=!0)};c.prototype.closeBuyHouse=function(b){this.itemLayer.visible=!1;TaskManager.instance().currentTaskIndex!=TaskManager.instance().ydArr[0]||this.hasClickLeftArrow||(this.gameLayer.closeLeftArrow(),this.hasClickLeftArrow=!0);this.itemLayer.buyHouseView.needTxt.textColor=
  424. 0;this.itemLayer.buyHouseView.shanState=!0};c.prototype.showItemLayer=function(b){this.hasShow=!0;this.gameLayer.downArrow.visible=!1;this.gameLayer.upArrow.visible=!1;this.buyCurrent=DataManager.instance().currentTotal;this.itemLayer.buyView.currentLb.textColor=0;this.isBuyColor=!0;b&&(this.clickGKType=b.target.parent.type,this.needNum=b.target.parent.gkData.currentNeeds,this.buyIcon=b.target.parent.gkData.itemIcon,this.buyTitle=b.target.parent.gkData.title,this.buyDesc=b.target.parent.gkData.desc);
  425. this.needNum=Math.floor(this.needNum);this.buyCurrent=Math.floor(this.buyCurrent);this.buyTargetS=GKConsts.GK_TargetTxt+NumUtils.numToString(this.needNum)+"\u5b50\u5b59";this.buyCurrentS=GKConsts.GK_CurrentTxt+NumUtils.numToString(this.buyCurrent)+"\u5b50\u5b59";switch(this.clickGKType){case GKType.HOME:this.showBuyHouse();break;case GKType.GK1:this.itemLayer.buyView.updateView(this.buyIcon,this.buyTitle,this.buyTargetS,this.buyCurrentS,this.buyDesc);this.itemLayer.showBuyView();this.itemLayer.visible=
  426. !0;break;case GKType.GK2:this.itemLayer.buyView.updateView(this.buyIcon,this.buyTitle,this.buyTargetS,this.buyCurrentS,this.buyDesc);this.itemLayer.showBuyView();this.itemLayer.visible=!0;break;case GKType.GK3:this.itemLayer.buyView.updateView(this.buyIcon,this.buyTitle,this.buyTargetS,this.buyCurrentS,this.buyDesc);this.itemLayer.showBuyView();this.itemLayer.visible=!0;break;case GKType.GK4:this.itemLayer.buyView.updateView(this.buyIcon,this.buyTitle,this.buyTargetS,this.buyCurrentS,this.buyDesc),
  427. this.itemLayer.showBuyView(),this.itemLayer.visible=!0}};c.prototype.buyResult=function(b){this.buyCurrent>=this.needNum?(DataManager.instance().currentTotal-=this.needNum,this.gameLayerAddItem(),this.showItemLayer(null)):this.isBuyColor?(this.itemLayer.buyView.currentLb.textColor=16711680,this.isBuyColor=!1):(this.itemLayer.buyView.currentLb.textColor=0,this.isBuyColor=!0);this.colseGKNumber+=1};c.prototype.gameLayerAddItem=function(){var b,c;switch(this.clickGKType){case GKConsts.GK1:b=ResourceUtils.createBitmapFromSheet(GKConsts.GK1_Icon,
  428. "gkRes");b=new BaseBitmap(b);c=this.gameLayer.gk1.gkData.currentIndex+1;this.needNum=this.gameLayer.gk1.gkData.list[c].need;this.gameLayer.gk1.addItem(b,this.needNum);break;case GKConsts.GK2:b=ResourceUtils.createBitmapFromSheet(GKConsts.GK2_Icon,"gkRes");b=new BaseBitmap(b);c=this.gameLayer.gk2.gkData.currentIndex+1;this.needNum=this.gameLayer.gk2.gkData.list[c].need;this.gameLayer.gk2.addItem(b,this.needNum);break;case GKConsts.GK3:b=ResourceUtils.createBitmapFromSheet(GKConsts.GK3_Icon,"gkRes");
  429. b=new BaseBitmap(b);c=this.gameLayer.gk3.gkData.currentIndex+1;this.needNum=this.gameLayer.gk3.gkData.list[c].need;this.gameLayer.gk3.addItem(b,this.needNum);break;case GKConsts.GK4:b=ResourceUtils.createBitmapFromSheet(GKConsts.GK4_Icon,"gkRes"),b=new BaseBitmap(b),c=this.gameLayer.gk4.gkData.currentIndex+1,this.needNum=this.gameLayer.gk4.gkData.list[c].need,this.gameLayer.gk4.addItem(b,this.needNum)}};c.prototype.showBuyHouse=function(){this.itemLayer.visible=!0;this.itemLayer.showBuyHouseView()};
  430. return c}();GKManager.prototype.__class__="GKManager";
  431. var SoundManager=function(){function c(){this.soundState=!0;if(null!=c._instance)throw Error("singleton");}c.instance=function(){return null==this._instance?this._instance=new c:this._instance};c.prototype.init=function(){this.clickSound=RES.getRes("clickSound");this.bjSound=RES.getRes("bjSound");this.gameTitle.soundBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.soundBtnClick,this)};c.prototype.restart=function(){this.playBj()};c.prototype.stop=function(){};c.prototype.soundBtnClick=function(){this.soundState=
  432. !this.soundState;this.playBj()};c.prototype.playBj=function(){this.soundState?this.bjSound.play(!0):this.bjSound.pause()};c.prototype.playHouseClick=function(){};return c}();SoundManager.prototype.__class__="SoundManager";
  433. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},Role=function(c){function b(b,a){c.call(this);this.isInHome=!0;this.freeCurrentCount=this.freeState=this.bornDelay=this.bornCurrentCount=this.bornState=this.roleLifeState=0;this.freeTargetCount=20;this.dieCurrentCount=this.dieState=this.freeDelay=0;this.dieDelay=100;this.runTime=this.stantTime=2E3;this.randomStepX=8;this.randomStepY=
  434. 4;this.ptrdX=8;this.ptrdY=5;this.bigrdX=8;this.bigrdY=4;this.qunrdX=6;this.qunrdY=4;this.dogrdX=6;this.dogrdY=4;this.busrdX=6;this.busrdY=4;this.bcY=this.bcX=0;this.roleType=b;this.roleState=a;this.initFace(b)}__extends(b,c);b.prototype.initFace=function(b){this.bitmapArr=[];b=RoleFactory.getInstance().getRoleImgArrByType(b);for(var a=0;a<b.length;a++){var c=ResourceUtils.createBitmapFromSheet(b[a],"roleRes");this.bitmapArr.push(c)}this.face=new BaseMc(this.bitmapArr);this.face.setFrameRate(12);this.alpha=
  435. 0;this.addChild(this.face);this.selfTimer=new egret.Timer(100,0);this.selfTimer.addEventListener(egret.TimerEvent.TIMER,this.updateRoleBySelf,this)};b.prototype.update=function(b,a,c,l){this.x=b.x;this.y=b.y;this.currentPos=this.bornPos=b;this.targetPos=a;this.moveRect=c;this.stepX=(this.targetPos.x-this.bornPos.x)/10;this.stepY=(this.targetPos.y-this.bornPos.y)/10;this.roleType=l;this.resetBC();this.initBorn();this.selfTimer.start()};b.prototype.updateRoleBySelf=function(b){switch(this.roleLifeState){case 0:this.playBorn(b);
  436. break;case 1:this.playFree(b);break;case 2:this.playDie(b)}};b.prototype.playBorn=function(b){10<=this.bornCurrentCount?this.roleState!=RoleState.FLYANDDIE?(this.alpha=1,this.initFree()):this.dispose():(this.bornDelay=0,1>=this.alpha&&(this.alpha+=0.1),this.x+=this.stepX,this.y+=this.stepY,this.bornCurrentCount++)};b.prototype.playFree=function(b){this.freeCurrentCount>=this.freeTargetCount?(this.selfTimer.stop(),this.resetFree()):(this.x+=this.randomStepX,this.y+=this.randomStepY,this.hitMoveRect(),
  437. this.freeCurrentCount++)};b.prototype.playDie=function(b){10<=this.dieCurrentCount?this.dispose():(this.face.rotation-=36,this.alpha-=0.1,this.y+=12,this.dieCurrentCount++)};b.prototype.initBorn=function(){this.bornDelay=this.bornCurrentCount=this.roleLifeState=0;this.setFaceRun()};b.prototype.initFree=function(){this.roleLifeState=1;this.freeDelay=this.freeCurrentCount=0;this.randomDir();this.setFaceRun()};b.prototype.resetFree=function(){this.roleLifeState=1;this.freeDelay=this.freeCurrentCount=
  438. 0;this.randomDir();this.setFaceStand();egret.setTimeout(this.restartTicker,this,this.stantTime)};b.prototype.restartTicker=function(){this.setFaceRun();this.selfTimer.start()};b.prototype.initDie=function(){this.roleLifeState=2;this.dieDelay=this.dieCurrentCount=0;this.setFaceDie();this.face.anchorX=0.5;this.face.anchorY=0.5};b.prototype.autoSelf=function(){this.freeCurrentCount>=this.freeTargetCount?this.initFree():(this.x+=this.randomStepX,this.y+=this.randomStepY,this.hitMoveRect())};b.prototype.hitMoveRect=
  439. function(){0>this.x&&(this.isInHome?this.dispose():this.randomStepX=-this.randomStepX);640<this.x&&(this.isInHome?this.dispose():this.randomStepX=-this.randomStepX);this.y<this.moveRect.y&&(this.randomStepY=-this.randomStepY);this.y>this.moveRect.y+this.moveRect.height-this.face.height&&(this.isInHome?this.initDie():this.randomStepY=-this.randomStepY)};b.prototype.setFaceRun=function(){this.face.playPart(0,this.bitmapArr.length-2)};b.prototype.setFaceStand=function(){this.face.gotoAndStop(0)};b.prototype.setFaceDie=
  440. function(){this.face.gotoAndStop(this.bitmapArr.length-1);this.face.anchorX=0.5;this.face.anchorY=0.5};b.prototype.fly=function(){this.face.playPart(0,this.bitmapArr.length-2)};b.prototype.setFaceFlyAndDie=function(){this.face.playPart(0,this.bitmapArr.length-2)};b.prototype.resetBC=function(){switch(this.roleType){case RoleType.PT:this.bcX=this.ptrdX;this.bcY=this.ptrdY;break;case RoleType.BIG:this.bcX=this.bigrdX;this.bcY=this.bigrdY;break;case RoleType.QUN:this.bcX=this.qunrdX;this.bcY=this.qunrdY;
  441. break;case RoleType.BUS:this.bcX=this.busrdX;this.bcY=this.busrdY;break;case RoleType.DOG:this.bcX=this.dogrdX,this.bcY=this.dogrdY}};b.prototype.randomDir=function(){var b=Math.random(),a=Math.random();this.randomStepX=0.5<b?Math.floor(Math.random()*this.bcX):-Math.floor(Math.random()*this.bcX);this.randomStepY=0.5<a?Math.floor(Math.random()*this.bcY):-Math.floor(Math.random()*this.bcY);this.stantTime=Math.floor(3E3*Math.random());this.runTime=2E3*Math.random();this.freeTargetCount=Math.floor(this.runTime/
  442. 100)};b.prototype.dispose=function(){this.face.gotoAndStop(0);this.face.rotation=0;this.face.anchorX=0;this.alpha=this.y=this.x=this.face.anchorY=0;RoleManager.instance().recycle(this);this.selfTimer.stop();this.selfTimer.reset()};b.prototype.pointDistance=function(b,a){return Math.sqrt((b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y))};return b}(egret.Sprite);Role.prototype.__class__="Role";
  443. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},AlphaTxt=function(c){function b(){c.call(this);this._startAlpha=1;this._endAlpha=0;this._times=5;this._runTime=0;this.size=25}__extends(b,c);b.prototype.update=function(){this.alpha=0;egret.Ticker.getInstance().register(this.loop,this)};b.prototype.loop=function(b){this._runTime+=b;30<this._runTime&&(this._runTime=0,this.alpha+=0.1,
  444. this.size+=1,this.x-=1,this.y-=6,1<=this.alpha&&(egret.Ticker.getInstance().unregister(this.loop,this),egret.Ticker.getInstance().register(this.loop2,this)))};b.prototype.loop2=function(b){this._runTime+=b;30<this._runTime&&(this.alpha-=0.1,this.y-=6,0>=this.alpha&&(egret.Ticker.getInstance().unregister(this.loop2,this),this.dispose()))};b.prototype.dispose=function(){this.parent&&(this.size=25,GameLayer.recycleTxt(this),this.parent.removeChild(this))};return b}(egret.TextField);
  445. AlphaTxt.prototype.__class__="AlphaTxt";
  446. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},ArrowBtn=function(c){function b(b){c.call(this);this.upState=!1;this.arrow="downArrow1"==b||"downArrow"==b?ResourceUtils.createBitmapByName("downArrow"):ResourceUtils.createBitmapByName(b);this.lefta=b;this.addChild(this.arrow);this.dTimer=new egret.Timer(200,5E4);this.dTimer.addEventListener(egret.TimerEvent.TIMER,this.play,this);this.dTimer.start();
  447. "upArrow"==b?(this.bgTxt=new BgTxt,this.bgTxt.updateTxt("\u5c0f\u5c0f\u7684\u8305\u5c4b\u6210\u5c31\u4e86\u591a\u5c11\u751f\u547d\uff0c\u70b9\u51fb\u8305\u5c4b\u5f00\u59cbOOXX\u521b\u9020\u5c0f\u751f\u547d\u5427"),this.bgTxt.x=-110,this.bgTxt.y=-190,this.addChild(this.bgTxt)):"downArrow"==b?(this.bgTxt=new BgTxt,this.bgTxt.updateTxt("\u636e\u8bf4\u53e4\u4eba\u90fd\u5f88\u559c\u6b22\u201c\u91ce\u6218\u201d\u54e6,\u5efa\u9020\u4e00\u4e2a\u8349\u4e1b\u5c31\u4f1a\u81ea\u52a8\u751f\u4ea7\u513f\u5b59\u3002"),
  448. this.bgTxt.x=-320,this.bgTxt.y=175,this.addChild(this.bgTxt)):"leftArrow"==b?(this.bgTxt=new BgTxt,this.bgTxt.updateTxt("\u623f\u5c4b\u6f02\u4eae\u4e86\uff0c\u624d\u80fd\u4e3a\u66f4\u597d\u7e41\u884d\u5b50\u5b59\u521b\u9020\u6761\u4ef6\uff0c\u70b9\u51fb\u5347\u7ea7\u5427\u3002"),this.bgTxt.x=-100,this.bgTxt.y=-90,this.addChild(this.bgTxt)):"downArrow1"==b&&(this.bgTxt=new BgTxt,this.bgTxt.updateTxt("\u7ec3\u4f1a\u4e5d\u9633\u795e\u529f\uff0c\u6211\u5c31\u662f\u4e1c\u65b9\u4e0d\u8d25,\u513f\u5b59\u904d\u5929\u4e0b\u554a\uff0c\u7ec3\u7ec3\u7ec3\uff01\uff01\uff01\u3002"),
  449. this.bgTxt.x=-320,this.bgTxt.y=175,this.addChild(this.bgTxt))}__extends(b,c);b.prototype.play=function(b){"leftArrow"==this.lefta?this.upState?(this.arrow.x+=15,this.upState=!1):(this.arrow.x-=15,this.upState=!0):this.upState?(this.arrow.y+=15,this.upState=!1):(this.arrow.y-=15,this.upState=!0)};return b}(egret.Sprite);ArrowBtn.prototype.__class__="ArrowBtn";
  450. var ShareUtils=function(){function c(){}c.moreGame=function(){var b=window.navigator.userAgent;-1!=b.indexOf("EgretRuntime")&&-1!=b.indexOf("yoyo")?location.href="u9time://gamelist":window.open("http://m.2144.cn/h5","_self")};c.shareToWeChat=function(){window.WeixinApi&&WeixinApi.ready(function(b){var d=new WeixinShareInfo;d.title=c.shareTitle;d.desc=c.shareDesc;d.link=c.doUrl();d.imgUrl=c.shareImgUrl;b.shareToFriend(d);b.shareToTimeline(d)})};c.doUrl=function(){var b=c.findLocationProperty("uId");
  451. c.findLocationProperty("chn");b=window.location.href;return c.shareUrl=b};c.shareToU9=function(){var b=location.href,b=encodeURIComponent(b),d=c.shareDesc,a=c.getUid(),e="u9time://share?uid="+a+"&game_url="+b+"&a=123&msg="+d;a||(e="u9time://share?&game_url="+b+"&a=123&msg="+d);location.href=e};c.setShareInfo=function(b,d,a){c.shareTitle=b;c.shareDesc=d;c.shareImgUrl=a;c.shareToWeChat()};c.isInWeChat=function(){return!!window.WeixinJSBridge};c.findLocationProperty=function(b){var c=
  452. location.search;if(""==c)return null;var c=c.slice(1),c=c.split("&"),a=c.length;console.log("searchArr",c);for(var e=0;e<a;e++){var l=c[e].split("=");if(l[0]==b)return l[1]}return null};c.getUid=function(){return c.findLocationProperty("uid")};c.cm=function(b){var d=c.findLocationProperty("uId"),a=new egret.URLLoader;a.addEventListener(egret.Event.COMPLETE,function(){console.log("cmuid::",d);console.log("cm:::::"+a.data)},this);a.load(new egret.URLRequest("http://ygys.egret-labs.org/api.php?mod=Main&do=sendData&uId="+
  453. d+"&num="+b))};c.getUserGoal=function(){c.chn=c.findLocationProperty("chn");c.chn||(c.chn="360");c.loadUrl+=c.chn;this.doUrl();console.log("shareUrl::::",c.shareUrl);var b=c.findLocationProperty("uId"),d=new egret.URLLoader;d.addEventListener(egret.Event.COMPLETE,function(){var a=JSON.parse(d.data);console.log("getUid",b);console.log("getUserGoal::::"+a);c.lszg&&(c.lszg=a.mNum);c.help&&(c.help=a.help);console.log("lszg,help",c.lszg,c.help);TaskManager.instance().setFXJC()},this);d.load(new egret.URLRequest("http://ygys.egret-labs.org/api.php?mod=Main&do=getUser&uId="+
  454. b))};c.loadGame=function(){c.chn=c.findLocationProperty("chn");c.chn||(c.chn="360");console.log("shareUrl::::",c.shareUrl);var b=c.findLocationProperty("uId"),d=new egret.URLLoader;d.addEventListener(egret.Event.COMPLETE,function(){console.log("\u53d1\u9001\u8bf7\u6c42\u6210\u529f")},this);d.load(new egret.URLRequest("http://statistics.egret-labs.org/ygys.php?uId="+b+"&chn=qingyingyong&down=1"));c.loadUrl="http";window.gotoUrl(c.loadUrl)};c.lszg=0;c.help=0;c.loadUrl=
  455. "http";return c}();ShareUtils.prototype.__class__="ShareUtils";
  456. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},GameLayer=function(c){function b(){c.call(this);this.numGK=4;this.clickNum=0;this.isLeft=!0;this.init()}__extends(b,c);b.prototype.init=function(){this.initData();this.initGK();this.initArrow();this.initTipsView()};b.prototype.initData=function(){};b.prototype.initTipsView=function(){};b.prototype.initArrow=function(){this.upArrow=new ArrowBtn("upArrow");
  457. this.upArrow.x=260;this.upArrow.y=275;this.addChild(this.upArrow);this.downArrow=new ArrowBtn("downArrow");this.downArrow.x=492;this.downArrow.y=340;this.downArrow.visible=!1;this.addChild(this.downArrow);this.downArrow1=new ArrowBtn("downArrow1");this.downArrow1.x=492;this.downArrow1.y=530;this.downArrow1.visible=!1;this.addChild(this.downArrow1);this.leftArrow=new ArrowBtn("leftArrow");this.leftArrow.x=340;this.leftArrow.y=195;this.leftArrow.visible=!1;this.addChild(this.leftArrow)};b.prototype.initGK=
  458. function(){this.gk1=new GKView("50005_png",!0);this.gk1.y=459;this.gk1.setTitleTip("\u8349\u4e1bX","1",0.6);this.gk1.setGKDisplay(GKType.GK1,GKConsts.GK1_Icon,GKConsts.GK1_Title,GKConsts.GK1_Desc);this.gk1.type=GKType.GK1;this.gk1.addBtn.visible=!1;this.addChild(this.gk1);this.gk2=new GKView("50010_png");this.gk2.y=649;this.gk2.setTitleTip("\u4e5d\u9633\u795e\u529fX","1",0.6);this.gk2.setGKDisplay(GKType.GK2,GKConsts.GK2_Icon,GKConsts.GK2_Title,GKConsts.GK2_Desc);this.gk2.type=GKType.GK2;this.gk2.addBtn.visible=
  459. !1;this.addChild(this.gk2);this.gk3=new GKView("50015_png");this.gk3.y=839;this.gk3.setTitleTip("\u795e\u65cf\u6c34\u6676X","1",0.6);this.gk3.setGKDisplay(GKType.GK3,GKConsts.GK3_Icon,GKConsts.GK3_Title,GKConsts.GK3_Desc);this.gk3.type=GKType.GK3;this.addChild(this.gk3);this.gk4=new GKView("50020_png");this.gk4.y=1029;this.gk4.setTitleTip("\u514b\u9686\u4eba\u88c5\u7f6eX","1",0.6);this.gk4.setGKDisplay(GKType.GK4,GKConsts.GK4_Icon,GKConsts.GK4_Title,GKConsts.GK4_Desc);this.gk4.type=GKType.GK4;this.home=
  460. new GKView("50000_png",!1);this.home.type=GKType.HOME;this.home.touchEnabled=!0;this.home.addEventListener(egret.TouchEvent.TOUCH_END,this.homeEnd,this);this.home.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.homeBegin,this);this.home.addEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.homeEnd,this);this.addChild(this.home);this.house=new House;this.house.x=300;this.house.y=210;this.house.addEventListener(egret.TouchEvent.TOUCH_TAP,this.houseClick,this);this.tp=new egret.Point;this.bp=
  461. new egret.Point(260,175);this.homeRect=new egret.Rectangle(0,200,640,250);this.addChild(this.house);this.stageRoleNum=new egret.TextField;this.stageRoleNum.x=100;this.stageRoleNum.y=100;this.stageRoleNum.size=20;this.ptRoleNum=new egret.TextField;this.ptRoleNum.x=100;this.ptRoleNum.y=130;this.stageRoleNum.size=20;this.bigRoleNum=new egret.TextField;this.bigRoleNum.x=100;this.bigRoleNum.y=160;this.bigRoleNum.size=20};b.prototype.randomRoleTargetPoint=function(){if(this.isLeft){var b=300*Math.random();
  462. this.isLeft=!1}else b=300*Math.random()+300,this.isLeft=!0;var a=180*Math.random()+200;this.tp.x=b;this.tp.y=a;return this.tp};b.prototype.homeBegin=function(b){this.house.touchEnabled&&120<b.localX&&450>b.localX&&120<b.localY&&340>b.localY&&(this.houseClick(null),this.house.touchBegin(null))};b.prototype.homeEnd=function(b){this.house.touchEnabled&&this.house.touchEnd(null)};b.prototype.houseClick=function(b){this.clickNum++;5==this.clickNum&&(this.upArrow.visible=!1,TaskManager.instance().startTask());
  463. RoleManager.instance().addRoleToStage();SoundManager.instance().playHouseClick();b=HouseManager.instance().getAddNumByClick();DataManager.instance().addByClickHouse(b);this.playAlphaTxt(b)};b.prototype.playAlphaTxt=function(c){var a;a=0==b.alphaTxtPool.length?new AlphaTxt:b.alphaTxtPool.pop();a.text="+"+c;a.alpha=1;a.x=268;a.y=178;this.addChild(a);a.update()};b.recycleTxt=function(c){b.alphaTxtPool.push(c)};b.prototype.showDownArrow=function(){this.updateTipsView("\u867d\u7136\u6761\u4ef6\u8270\u82e6\uff0c\n\u4f46\u4e0d\u5f71\u54cd\u6211\u6fc0\u60c5\u7684\u5fc3\u54e6\uff01\n\n\u5929\u82cd\u82cd\uff0c\n\u91ce\u832b\u832b\u3002\n\u98ce\u5439\u8349\u4f4e\uff0c\n\u767d\u82b1\u82b1\u3002",
  464. "\u5f00\u59cb\u5efa\u9020",2);GKManager.instance().hasClickDown?TaskManager.instance().goTaskFromPause():(this.gk1.addBtn.visible=!0,this.downArrow.visible=!0,this.house.touchEnabled=!1)};b.prototype.closeDownArrow=function(){this.downArrow.visible=!1;this.downArrow.dTimer.stop();TaskManager.instance().currentTaskIndex==TaskManager.instance().ydArr[1]&&(this.house.touchEnabled=!0,TaskManager.instance().goTaskFromPause())};b.prototype.showDownArrow1=function(){GKManager.instance().hasClickDown1?TaskManager.instance().goTaskFromPause():
  465. (this.gk2.addBtn.visible=!0,this.downArrow1.visible=!0,this.house.touchEnabled=!1)};b.prototype.closeDownArrow1=function(){this.downArrow1.visible=!1;this.downArrow1.dTimer.stop();TaskManager.instance().currentTaskIndex==TaskManager.instance().ydArr[2]&&(this.house.touchEnabled=!0,TaskManager.instance().goTaskFromPause())};b.prototype.showLeftArrow=function(){this.updateTipsView("\u54e5\u4ece\u524d\u4e00\u76f4\u4e0d\u660e\u767d\uff0c\u4e3a\u5565\u53e4\u4eba\u7ba1\u8001\u5a46\u53eb\u5927\u623f\u3001\u4e8c\u623f\u3001\u4e09\u623f...\n\n\u5982\u4eca\u771f\u7684\u61c2\u4e86\uff0c\u5176\u5b9e\u6211\u4eec\u662f\u4e00\u623f\u4e00\u59bb\u5236\u3002\n\n\u65e0\u623f\u5c31\u65e0\u59bb\uff0c\u591a\u623f\u5c31\u591a\u59bb\u3002\u53e4\u4eba\u8bda\u4e0d\u6211\u6b3a\u4e5f...",
  466. "\u8305\u5c4b\u53d8\u8c6a\u5b85",1);GKManager.instance().hasClickLeftArrow?TaskManager.instance().goTaskFromPause():(this.leftArrow.visible=!0,this.house.touchEnabled=!1)};b.prototype.closeLeftArrow=function(){this.leftArrow.visible=!1;this.leftArrow.dTimer.stop();TaskManager.instance().currentTaskIndex==TaskManager.instance().ydArr[0]&&(this.house.touchEnabled=!0,TaskManager.instance().goTaskFromPause())};b.prototype.updateTipsView=function(b,a,c){GameContent.me.tipsView.visible=!0;GameContent.me.tipsView.updateTxtAndBtn(b,
  467. a,c)};b.prototype.youhua=function(){this.gk3.visible=this.y+this.gk3.y+80>Consts.Game_Height?!1:!0;this.gk3.addBtn.visible=!1};b.alphaTxtPool=[];return b}(egret.Sprite);GameLayer.prototype.__class__="GameLayer";
  468. var DataManager=function(){function c(){this.allGKAdd=this.gk4Add=this.gk3Add=this.gk2Add=this.gk1Add=this.currentTotal=0;this.jc=1;this.fxJc=0;if(null!=c._instance)throw Error("singleton");}c.instance=function(){return null==this._instance?this._instance=new c:this._instance};c.prototype.restart=function(){this.stopAutoAdd();this.currentTotal=this.jc=this.allGKAdd=this.gk4Add=this.gk3Add=this.gk2Add=this.gk1Add=0;this.gameTitle.updateSonTxt(this.currentTotal);this.gameTitle.updateDCL(this.allGKAdd);
  469. this.gameTitle.updateJC(this.jc);TaskManager.instance().updateDcl(this.allGKAdd);this.updateJC(this.fxJc,!0)};c.prototype.updateGKData=function(b){switch(b[0]){case GKConsts.GK1:this.gk1Add=b[1];break;case GKConsts.GK2:this.gk2Add=b[1];break;case GKConsts.GK3:this.gk3Add=b[1];break;case GKConsts.GK4:this.gk4Add=b[1]}this.allGKAdd=this.gk1Add+this.gk2Add+this.gk3Add+this.gk4Add;b=TaskManager.instance().fxjs*ShareUtils.help;this.allGKAdd=this.allGKAdd*b+this.allGKAdd+this.allGKAdd*(this.jc-1);this.gameTitle.updateDCL(this.allGKAdd);
  470. TaskManager.instance().updateDcl(this.allGKAdd)};c.prototype.updateJC=function(b,c){"undefined"===typeof c&&(c=!1);this.jc=c?this.fxJc:b+this.fxJc;this.allGKAdd=this.gk1Add+this.gk2Add+this.gk3Add+this.gk4Add;this.allGKAdd*=this.jc;this.gameTitle.updateDCL(this.allGKAdd);this.gameTitle.updateJC(this.jc);TaskManager.instance().updateDcl(this.allGKAdd)};c.prototype.addByClickHouse=function(b){this.currentTotal+=b;TaskManager.instance().updateCurrentNum(b)};c.prototype.startAutoAdd=function(){egret.Ticker.getInstance().register(this.autoAdd,
  471. this)};c.prototype.stopAutoAdd=function(){egret.Ticker.getInstance().unregister(this.autoAdd,this)};c.prototype.autoAdd=function(b){this.currentTotal+=b/1E3*this.allGKAdd;this.gameTitle.updateSonTxt(this.currentTotal);!0==GameContent.me.itemLayer.buyView.visible&&(b=Math.floor(this.currentTotal),GKManager.instance().buyCurrent=b,GameContent.me.itemLayer.buyView.currentLb.text=GKConsts.GK_CurrentTxt+NumUtils.numToString(b)+"\u5b50\u5b59")};return c}();DataManager.prototype.__class__="DataManager";
  472. var RoleFactory=function(){function c(){if(null!=c._instance)throw Error("singleton");}c.getInstance=function(){return null==this._instance?this._instance=new c:this._instance};c.getRole=function(b,c){return new Role(b,c)};c.prototype.getRoleImgArrByType=function(b){var c=[];switch(b){case RoleType.PT:c=["30002_1","30002_2","30002_3","30002_4","30001_1"];break;case RoleType.BIG:c=["30003_1","30003_2","30001_1"];break;case RoleType.QUN:c=["30100_1","30100_2","30100_3"];break;case RoleType.DOG:c=["30200_1",
  473. "30200_2","30200_3"];break;case RoleType.BUS:c=["30300_1","30300_2","30300_3"]}return c};return c}();RoleFactory.prototype.__class__="RoleFactory";
  474. var RoleManager=function(){function c(){this.stageRolePool=[];this.ptRolePool=[];this.bigRolePool=[];this.qunRolePool=[];this.busRolePool=[];this.dogRolePool=[];this.houseLv=this.totalLv=0;if(null!=c._instance)throw Error("singleton");}c.instance=function(){return null==this._instance?this._instance=new c:this._instance};c.prototype.restart=function(){this.stopAutoTimer();this.autoTimer.reset();this.houseLv=this.totalLv=0};c.prototype.startAutoTimer=function(b){"undefined"===typeof b&&(b=!1);if(b)for(;this.stageRolePool[0];)this.recycle(this.stageRolePool[0]);
  475. this.autoTimer||(this.autoTimer=new egret.Timer(500,0),this.autoTimer.addEventListener(egret.TimerEvent.TIMER,this.autoCreateRole,this));this.autoTimer.reset();this.autoTimer.start()};c.prototype.autoCreateRole=function(b){0<DataManager.instance().allGKAdd&&this.addRoleToStage()};c.prototype.addRoleToStage=function(){this.setRoleTypeByHouseLv();this.setRoleStateByTotal();var b=this.getRoleByTypeAndState(this.randomRoleType,this.randomRoleState);this.gameLayer.randomRoleTargetPoint();this.resetRole(b);
  476. b.update(this.gameLayer.bp,this.gameLayer.tp,this.gameLayer.homeRect,b.roleType);if(this.gameLayer.contains(b))throw Error("what the fuck");this.gameLayer.addChild(b);this.stageRolePool.push(b)};c.prototype.resetRole=function(b){b.face.gotoAndStop(0);b.face.rotation=0;b.face.anchorX=0;b.face.anchorY=0;b.x=0;b.y=0;b.alpha=0};c.prototype.recycle=function(b){var c=this.stageRolePool.indexOf(b);if(0<=c)switch(b.parent&&this.gameLayer.removeChild(b),this.stageRolePool.splice(c,1),b.roleType){case RoleType.PT:this.ptRolePool.push(b);
  477. break;case RoleType.BIG:this.bigRolePool.push(b);break;case RoleType.QUN:this.qunRolePool.push(b);break;case RoleType.BUS:this.busRolePool.push(b);break;case RoleType.DOG:this.dogRolePool.push(b)}this.gameLayer.stageRoleNum.text=this.stageRolePool.length.toString();this.gameLayer.bigRoleNum.text=this.bigRolePool.length.toString();this.gameLayer.ptRoleNum.text=this.ptRolePool.length.toString()};c.prototype.stopAutoTimer=function(){this.autoTimer.stop()};c.prototype.getRoleByTypeAndState=function(b,
  478. c){switch(b){case RoleType.PT:return this.getRoleFromPool(this.ptRolePool,b,c);case RoleType.BIG:return this.getRoleFromPool(this.bigRolePool,b,c);case RoleType.QUN:return this.getRoleFromPool(this.qunRolePool,b,c);case RoleType.BUS:return this.getRoleFromPool(this.busRolePool,b,c);case RoleType.DOG:return this.getRoleFromPool(this.dogRolePool,b,c)}};c.prototype.getRoleFromPool=function(b,c,a){return 0<b.length?(b=b.pop(),b.roleState=a,b):this.createRole(c,a)};c.prototype.createRole=function(b,c){return RoleFactory.getRole(b,
  479. c)};c.prototype.setTotalLv=function(b){this.totalLv=1E9<b?10:1E8<b?9:1E7<b?8:1E6<b?7:1E5<b?6:1E4<b?5:1E3<b?4:100<b?3:10<b?2:1<b?1:0};c.prototype.setRoleStateByTotal=function(){var b=Math.random(),c=this.stageRolePool.length;this.randomRoleState=15<c?RoleState.FLYANDDIE:10<c?0.2<b?RoleState.FLY:RoleState.FLYANDDIE:6<c?0.3<b?RoleState.FLY:RoleState.FLYANDDIE:RoleState.FLY};c.prototype.setRoleTypeByHouseLv=function(){var b=Math.random();switch(this.houseLv){case HouseType.H0:this.randomRoleType=0.7<
  480. b?RoleType.BIG:RoleType.PT;break;case HouseType.H1:this.randomRoleType=0.9<b?RoleType.QUN:0.6<b?RoleType.BIG:RoleType.PT;break;case HouseType.H2:this.randomRoleType=0.9<b?RoleType.DOG:0.6<b?RoleType.QUN:0.45<b?RoleType.BIG:RoleType.PT;break;case HouseType.H3:this.randomRoleType=0.9<b?RoleType.DOG:0.5<b?RoleType.QUN:0.35<b?RoleType.BIG:RoleType.PT;break;case HouseType.H4:this.randomRoleType=0.9<b?RoleType.BUS:0.8<b?RoleType.DOG:0.4<b?RoleType.QUN:0.3<b?RoleType.BIG:RoleType.PT}};return c}();
  481. RoleManager.prototype.__class__="RoleManager";
  482. var HouseManager=function(){function c(){this.houseLv=HouseType.H0;if(null!=c._instance)throw Error("singleton");}c.instance=function(){return null==this._instance?this._instance=new c:this._instance};c.prototype.restart=function(){this.houseLv=0;this.setHouseLv(0)};c.prototype.setHouseLv=function(b){this.houseLv=b;RoleManager.instance().houseLv=b;this.house.setHouseType(b)};c.prototype.getAddNumByClick=function(){var b;switch(this.houseLv){case HouseType.H0:b=this.h0;break;case HouseType.H1:b=this.h1;
  483. break;case HouseType.H2:b=this.h2;break;case HouseType.H3:b=this.h3;break;case HouseType.H4:b=this.h4}return b};return c}();HouseManager.prototype.__class__="HouseManager";
  484. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},HouseIcon=function(c){function b(){c.call(this);this.index=0;this.isTS=this.isOwn=!1;this.touchEnabled=!0}__extends(b,c);b.prototype.updateIcon=function(b,a,c){"undefined"===typeof a&&(a=!1);"undefined"===typeof c&&(c=!1);this.maskBj=ResourceUtils.createBitmapByName("mask");this.maskBj.width=72;this.maskBj.height=60;this.maskBj.x=-1;
  485. this.maskBj.y=-1;this.maskBj.alpha=0.9;this.addChild(this.maskBj);this.isTS=a;this.isOwn=c;this.removeChildren();a?(this.icon=ResourceUtils.createBitmapFromSheet(b,"houseRes"),b=70/this.icon.width,this.icon.scaleX=b,b=58/this.icon.height,this.icon.scaleY=b,this.addChild(this.icon)):this.isOwn?(this.icon=ResourceUtils.createBitmapFromSheet(b,"houseRes"),b=70/this.icon.width,this.icon.scaleX=b,b=58/this.icon.height,this.icon.scaleY=b,this.addChild(this.icon),this.sIcon=ResourceUtils.createBitmapFromSheet("40080",
  486. "btnRes"),this.sIcon.scaleX=70/this.sIcon.width,this.sIcon.scaleY=58/this.sIcon.height,this.addChild(this.sIcon)):(this.icon=ResourceUtils.createBitmapFromSheet("40075","btnRes"),b=70/this.icon.width,this.icon.scaleX=b,b=58/this.icon.height,this.icon.scaleY=b,this.addChild(this.icon))};return b}(egret.Sprite);HouseIcon.prototype.__class__="HouseIcon";
  487. var TaskConsts=function(){function c(){}c.CH="\u6700\u7ec8\u79f0\u53f7:";c.JSCH="\u89e3\u9501\u79f0\u53f7\uff1a";c.JXYX="\u7ee7\u7eed\u6e38\u620f";c.FXBJXYX="\u5206\u4eab\u5e76\u7ee7\u7eed";c.ZLYC="\u518d\u6765\u4e00\u6b21";c.QZ="\u6c4232\u4e2a\u8d5e";c.LS="\u5386\u53f2\u6700\u9ad8\uff1a";c.SM="\u6bcf\u9080\u8bf7\u4e00\u4e2a\u5c0f\u4f19\u4f34\u52a0\u5165\uff0c\u4eba\u53e3\u7e41\u6b96\u901f\u5ea6\u589e\u52a0\u4e00\u500d\u54df\uff01";return c}();TaskConsts.prototype.__class__="TaskConsts";
  488. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},BorderTxt=function(c){function b(b,a,e,l){c.call(this);this.width=b;this.height=a;this.borderColor=e;this.borderSize=l;this.init()}__extends(b,c);b.prototype.init=function(){this.drawLine();this.txt=new egret.TextField;this.txt.width=this.width-2*this.borderSize-10;this.txt.x=this.borderSize+5;this.txt.height=this.height-2*this.borderSize-
  489. 10;this.txt.y=this.borderSize+8;this.addChild(this.txt)};b.prototype.drawLine=function(){this.topLine=ResourceUtils.createBitmapByName("mask");this.topLine.width=this.width;this.topLine.height=this.borderSize;this.addChild(this.topLine);this.rightLine=ResourceUtils.createBitmapByName("mask");this.rightLine.width=this.borderSize;this.rightLine.height=this.height;this.rightLine.x=this.width;this.addChild(this.rightLine);this.bottomLine=ResourceUtils.createBitmapByName("mask");this.bottomLine.width=
  490. this.width;this.bottomLine.height=this.borderSize;this.bottomLine.y=this.height;this.addChild(this.bottomLine);this.leftLine=ResourceUtils.createBitmapByName("mask");this.leftLine.width=this.borderSize;this.leftLine.height=this.height;this.addChild(this.leftLine)};Object.defineProperty(b.prototype,"textColor",{set:function(b){this.txt.textColor=b},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"size",{set:function(b){this.txt.size=b;this.txt.lineSpacing=12},enumerable:!0,configurable:!0});
  491. Object.defineProperty(b.prototype,"textAlign",{set:function(b){this.txt.lineSpacing=15;this.txt.textAlign=b},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"verticalAlign",{set:function(b){this.txt.verticalAlign=b},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"text",{set:function(b){this.txt.text=b},enumerable:!0,configurable:!0});return b}(egret.Sprite);BorderTxt.prototype.__class__="BorderTxt";
  492. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},LastArrow=function(c){function b(b){c.call(this);this.upState=!1;this.arrow=ResourceUtils.createBitmapByName(b);this.addChild(this.arrow);this.dTimer=new egret.Timer(200,5E4);this.dTimer.addEventListener(egret.TimerEvent.TIMER,this.play,this);this.dTimer.start()}__extends(b,c);b.prototype.play=function(b){this.upState?(this.arrow.y+=
  493. 10,this.upState=!1):(this.arrow.y-=10,this.upState=!0)};return b}(egret.Sprite);LastArrow.prototype.__class__="LastArrow";
  494. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},TxtBtn=function(c){function b(b,a,e){c.call(this);this.txt=b;this.upColor=a;this.downColor=e;this.init()}__extends(b,c);b.prototype.init=function(){this.tipsBaseView=new TipsBaseView;this.tipsBaseView.drawBorder(155,55,16777215,1);this.addChild(this.tipsBaseView);this.lb=new egret.TextField;this.lb.width=155;this.lb.height=55;this.lb.size=
  495. 24;this.lb.text=this.txt;this.lb.textColor=0;this.lb.textAlign="center";this.lb.y=15;this.addChild(this.lb);this.touchEnabled=!0;this.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.touchBegin,this);this.addEventListener(egret.TouchEvent.TOUCH_END,this.touchEnd,this);this.addEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.touchEnd,this)};b.prototype.touchBegin=function(b){this.scaleY=this.scaleX=0.9};b.prototype.touchEnd=function(b){this.scaleY=this.scaleX=1};b.prototype.updateState=
  496. function(b){this.graphics.clear();this.graphics.beginFill(b,1);this.graphics.drawRect(0,0,this.lb.width+30,this.lb.height+20);this.graphics.endFill()};return b}(egret.Sprite);TxtBtn.prototype.__class__="TxtBtn";var Direction=function(){function c(){}c.CENTER="center";c.LEFT="left";c.RIGHT="right";c.TOP="top";c.BOTTOM="bottom";c.BOTH="both";c.HORIZONTAL="horizontal";c.VERTICAL="vertical";return c}();Direction.prototype.__class__="Direction";
  497. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},BuyHouseView=function(c){function b(){c.call(this);this.shanState=!0;this.init()}__extends(b,c);b.prototype.init=function(){this.line=ResourceUtils.createBitmapByName("mask");this.line.width=Consts.Game_Width-100;this.line.height=4;this.line.x=25;this.line.y=90;this.addChild(this.line);this.needLb=new egret.TextField;this.needLb.x=20;
  498. this.needLb.y=120;this.needLb.size=20;this.needLb.text="\u9700\u8981\u732e\u796d\uff1a";this.needLb.textColor=0;this.addChild(this.needLb);this.needTxt=new egret.TextField;this.needTxt.x=130;this.needTxt.y=120;this.needTxt.size=20;this.needTxt.textColor=0;this.addChild(this.needTxt);this.currentLb=new egret.TextField;this.currentLb.x=20;this.currentLb.y=165;this.currentLb.size=20;this.currentLb.text="\u4e0b\u7ea7\uff1a";this.currentLb.textColor=0;this.addChild(this.currentLb);this.currenttTxt=new egret.TextField;
  499. this.currenttTxt.x=130;this.currenttTxt.y=165;this.currenttTxt.size=20;this.currenttTxt.textColor=0;this.addChild(this.currenttTxt);this.desTxt=new egret.TextField;this.desTxt.x=20;this.desTxt.y=205;this.desTxt.lineSpacing=12;this.desTxt.size=20;this.desTxt.width=Consts.Game_Width-100;this.desTxt.height=100;this.desTxt.textColor=0;this.desTxt.text="\u4eba\u7c7b\u6587\u660e\u59cb\u4e8e\u8349\u4e1b\u3002";this.addChild(this.desTxt);this.buyBtn=new TxtBtn("\u7acb\u523b\u732e\u796d",8947848,3355443);
  500. this.buyBtn.x=177;this.buyBtn.y=265;this.buyBtn.touchEnabled=!0;this.buyBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.buyClick,this);this.addChild(this.buyBtn);this.closeBtn=new ImgBtn("40040_1","40040_2","btnRes");this.closeBtn.x=Consts.Game_Width-60;this.closeBtn.y=10;this.addChild(this.closeBtn);this.initIcon();this.drawBorder(Consts.Game_Width-50,380,15658734)};b.prototype.initIcon=function(){this.houseRes=RES.getRes("house");var b=this.houseRes.houseType[0];this.icon0=new HouseIcon;this.icon0.x=
  501. 15;this.icon0.y=20;this.icon0.title=b.name;this.icon0.desc=b.desc;this.icon0.add=b.add;this.icon0.need=b.need;this.icon0.jc=b.jc;this.icon0.index=b.type;HouseManager.instance().h0=b.add;this.icon0.updateIcon("10000",!1,!0);this.icon0.addEventListener(egret.TouchEvent.TOUCH_TAP,this.iconClick,this);this.addChild(this.icon0);b=this.houseRes.houseType[1];this.icon1=new HouseIcon;this.icon1.x=115;this.icon1.y=20;this.icon1.title=b.name;this.icon1.desc=b.desc;this.icon1.add=b.add;this.icon1.need=b.need;
  502. this.icon1.jc=b.jc;this.icon1.index=b.type;HouseManager.instance().h1=b.add;this.icon1.updateIcon("10010",!0,!1);this.tsIcon=this.currentIcon=this.icon1;this.updateView(this.currentIcon.need,this.currentIcon.title,this.currentIcon.desc);this.icon1.addEventListener(egret.TouchEvent.TOUCH_TAP,this.iconClick,this);this.addChild(this.icon1);b=this.houseRes.houseType[2];this.icon2=new HouseIcon;this.icon2.x=215;this.icon2.y=20;this.icon2.title=b.name;this.icon2.desc=b.desc;this.icon2.add=b.add;this.icon2.need=
  503. b.need;this.icon2.jc=b.jc;this.icon2.index=b.type;HouseManager.instance().h2=b.add;this.icon2.updateIcon("10010",!1,!1);this.icon2.addEventListener(egret.TouchEvent.TOUCH_TAP,this.iconClick,this);this.addChild(this.icon2);b=this.houseRes.houseType[3];this.icon3=new HouseIcon;this.icon3.x=315;this.icon3.y=20;this.icon3.title=b.name;this.icon3.desc=b.desc;this.icon3.add=b.add;this.icon3.need=b.need;this.icon3.jc=b.jc;this.icon3.index=b.type;HouseManager.instance().h3=b.add;this.icon3.updateIcon("10010",
  504. !1,!1);this.icon3.addEventListener(egret.TouchEvent.TOUCH_TAP,this.iconClick,this);this.addChild(this.icon3);b=this.houseRes.houseType[4];this.icon4=new HouseIcon;this.icon4.x=415;this.icon4.y=20;this.icon4.title=b.name;this.icon4.desc=b.desc;this.icon4.add=b.add;this.icon4.need=b.need;this.icon4.jc=b.jc;this.icon4.index=b.type;HouseManager.instance().h4=b.add;this.icon4.updateIcon("10010",!1,!1);this.icon4.addEventListener(egret.TouchEvent.TOUCH_TAP,this.iconClick,this);this.addChild(this.icon4)};
  505. b.prototype.resetIcon=function(){this.icon0.updateIcon("10000",!1,!0);this.icon1.updateIcon("10010",!0,!1);this.icon2.updateIcon("10010",!1,!1);this.icon3.updateIcon("10010",!1,!1);this.icon4.updateIcon("10010",!1,!1);this.tsIcon=this.currentIcon=this.icon1;this.updateView(this.currentIcon.need,this.currentIcon.title,this.currentIcon.desc)};b.prototype.iconClick=function(b){console.log("houseIconClick");this.currentIcon=b.target;switch(b.target){case this.icon0:this.updateView(this.icon0.need,this.icon0.title,
  506. this.icon0.desc);break;case this.icon1:this.updateView(b.target.need,b.target.title,b.target.desc);break;case this.icon2:this.icon2.isOwn?this.updateView(b.target.need,b.target.title,b.target.desc):this.tsIcon==this.icon2?this.updateView(b.target.need,b.target.title,b.target.desc):this.updateViewNull();break;case this.icon3:this.icon3.isOwn?this.updateView(b.target.need,b.target.title,b.target.desc):this.tsIcon==this.icon3?this.updateView(b.target.need,b.target.title,b.target.desc):this.updateViewNull();
  507. break;case this.icon4:this.icon4.isOwn?this.updateView(b.target.need,b.target.title,b.target.desc):this.tsIcon==this.icon4?this.updateView(b.target.need,b.target.title,b.target.desc):this.updateViewNull()}};b.prototype.updateViewNull=function(){this.updateView("?","?????","???????????")};b.prototype.updateView=function(b,a,c){this.needTxt.text="?"==b?"?":NumUtils.numToString(b);this.currenttTxt.text=a;this.desTxt.text=c};b.prototype.updateTxtByIcon=function(b){};b.prototype.buyClick=function(b){this.tsIcon&&
  508. this.currentIcon.index==this.tsIcon.index&&(DataManager.instance().currentTotal>this.tsIcon.need?(DataManager.instance().currentTotal=DataManager.instance().currentTotal-this.tsIcon.need,HouseManager.instance().setHouseLv(this.tsIcon.index),DataManager.instance().updateJC(this.tsIcon.jc),this["icon"+this.tsIcon.index].updateIcon(HouseType["H"+this.tsIcon.index+"_ICON"],!1,!0),4>this.tsIcon.index?(this.tsIcon=this["icon"+(this.tsIcon.index+1)],this.updateView(this.tsIcon.need,this.tsIcon.title,this.tsIcon.desc),
  509. this.tsIcon.updateIcon(HouseType["H"+this.tsIcon.index+"_ICON"],!0,!1),this.currentIcon=this.tsIcon):this.tsIcon=null):this.shanState?(this.needTxt.textColor=16711680,this.shanState=!1):(this.needTxt.textColor=0,this.shanState=!0))};return b}(TipsBaseView);BuyHouseView.prototype.__class__="BuyHouseView";
  510. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},BuyView=function(c){function b(){c.call(this);this.init()}__extends(b,c);b.prototype.init=function(){this.icon=new egret.Bitmap;this.icon.x=10;this.icon.y=-55;this.addChild(this.icon);this.lb=new egret.TextField;this.lb.x=125;this.lb.y=30;this.lb.size=20;this.lb.textColor=0;this.lb.text="\u8349\u4e1b";this.addChild(this.lb);this.line=
  511. ResourceUtils.createBitmapByName("mask");this.line.width=Consts.Game_Width-100;this.line.height=4;this.line.x=25;this.line.y=60;this.addChild(this.line);this.needLb=new egret.TextField;this.needLb.x=20;this.needLb.y=90;this.needLb.size=20;this.needLb.text="\u9700\u8981\u5b50\u5b59\uff1a";this.needLb.textColor=0;this.addChild(this.needLb);this.currentLb=new egret.TextField;this.currentLb.x=20;this.currentLb.y=135;this.currentLb.size=20;this.currentLb.text="\u5f53\u524d\u5b50\u5b59\uff1a";this.currentLb.textColor=
  512. 0;this.addChild(this.currentLb);this.desTxt=new egret.TextField;this.desTxt.x=20;this.desTxt.y=180;this.desTxt.size=20;this.desTxt.width=340;this.desTxt.height=80;this.desTxt.text="\u4eba\u7c7b\u6587\u660e\u59cb\u4e8e\u8349\u4e1b\u3002";this.desTxt.textColor=0;this.addChild(this.desTxt);this.buyBtn=new TxtBtn("\u7acb\u523b\u732e\u796d",8947848,3355443);console.log(Consts.Game_Width-100-155);this.buyBtn.x=177;this.buyBtn.y=245;this.addChild(this.buyBtn);this.closeBtn=new ImgBtn("40040_1","40040_2",
  513. "btnRes");this.closeBtn.x=Consts.Game_Width-60;this.closeBtn.y=10;this.addChild(this.closeBtn);this.drawBorder(Consts.Game_Width-50,310,15658734)};b.prototype.updateView=function(b,a,c,l,n){this.icon.texture=ResourceUtils.getTextureFromSheet(b,"gkRes");this.lb.text=a;this.needLb.text=c;this.currentLb.text=l;this.desTxt.text=n};return b}(TipsBaseView);BuyView.prototype.__class__="BuyView";
  514. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},TaskFailView=function(c){function b(){c.call(this);this.init()}__extends(b,c);b.prototype.init=function(){this.tiyanX1=ResourceUtils.createBitmapByName("tyx");this.tiyanX1.x=110;this.tiyanX1.y=448;this.addChild(this.tiyanX1);this.tiyanX2=ResourceUtils.createBitmapByName("tyx");this.tiyanX2.x=400;this.tiyanX2.y=445;this.addChild(this.tiyanX2);
  515. this.titleTxt=new egret.TextField;this.titleTxt.textColor=0;this.titleTxt.width=520;this.titleTxt.y=23;this.titleTxt.text="\u5931 \u8d25";this.titleTxt.textAlign="center";this.addChild(this.titleTxt);this.titleLb=new egret.TextField;this.titleLb.x=20;this.titleLb.y=80;this.titleLb.textColor=0;this.titleLb.size=20;this.titleLb.text=TaskConsts.CH;this.lsLb=new egret.TextField;this.lsLb.y=80;this.lsLb.x=35;this.lsLb.text=TaskConsts.LS;this.lsLb.textColor=0;this.lsLb.size=20;this.addChild(this.lsLb);
  516. this.smTxt=new egret.TextField;this.smTxt.x=33;this.smTxt.y=130;this.smTxt.textColor=0;this.smTxt.size=20;this.smTxt.width=480;this.smTxt.height=40;this.smTxt.text=TaskConsts.SM;this.addChild(this.smTxt);this.restartBtn=new TxtBtn(TaskConsts.ZLYC,8947848,3355443);this.restartBtn.x=40;this.restartBtn.y=180;this.restartBtn.touchEnabled=!0;this.addChild(this.restartBtn);this.qzBtn=new TxtBtn("\u5206\u4eab\u670b\u53cb\u5708",8947848,3355443);this.qzBtn.x=Consts.Game_Width-100-151;this.qzBtn.y=180;this.qzBtn.touchEnabled=
  517. !0;this.addChild(this.qzBtn);this.icon=new egret.Bitmap;this.icon.x=25;this.icon.y=265;this.icon.width=100;this.icon.height=100;this.addChild(this.icon);this.descTxt=new BorderTxt(330,120,5592405,1);this.descTxt.x=150;this.descTxt.y=255;this.descTxt.textColor=0;this.descTxt.size=20;this.addChild(this.descTxt);this.drawBorder(Consts.Game_Width-50,370,15658734);this.bp.height=450;this.setChildIndex(this.tiyanX1,0);this.setChildIndex(this.tiyanX2,0);this.tiyanK=ResourceUtils.createBitmapByName("tyk");
  518. this.tiyanK.y=470;this.addChild(this.tiyanK);this.tiyanW=ResourceUtils.createBitmapByName("tyw");this.tiyanW.x=190;this.tiyanW.y=497;this.addChild(this.tiyanW);this.andrb=new TxtBtn("2144\u6e38\u620f",8947848,3355443);this.andrb.x=190;this.andrb.y=541;this.andrb.touchEnabled=!0;this.addChild(this.andrb);this.arrow=new LastArrow("jiantou");this.arrow.x=235;this.arrow.y=390;this.addChild(this.arrow)};b.prototype.updateTxt=function(b,a,c){this.titleLb.text=TaskConsts.CH+b;var l;switch(TaskManager.instance().currentTask.index){case 1:l=
  519. 0+20*Math.random();break;case 2:l=20+20*Math.random();break;case 3:l=40+20*Math.random();break;case 4:l=60+20*Math.random();break;case 5:l=80+20*Math.random();break;default:l=100*Math.random()}l=Math.floor(l);a=NumUtils.numToString(a);this.shareTxts="\u5df2\u7ecf\u7e41\u6b96\u4e86"+a+"\u4e2a\u5b50\u5b59\uff0c\u6210\u4e3a\u4e86"+b+"\uff0c\u51fb\u8d25\u4e86\u5168\u7403"+l+"%\u7684\u4eba";this.shareTxt="\u5df2\u7ecf\u7e41\u6b96\u4e86"+a+"\u4e2a\u5b50\u5b59\uff0c\u6210\u4e3a\u4e86"+b+"\uff0c\u51fb\u8d25\u4e86\u5168\u7403"+
  520. l+"%\u7684\u4eba";this.descTxt.text="\u751f\u5b69\u5b50\u7d2f\u4e86\uff0c\u73a9\u70b9\u522b\u7684\u4f11\u606f\u4e0b\u54c8\uff01";this.icon.texture=ResourceUtils.getTextureFromSheet(c,"taskIconRes")};b.prototype.updateLS=function(b){this.lsLb.text=TaskConsts.LS+b+" \u5b50\u5b59"};return b}(TipsBaseView);TaskFailView.prototype.__class__="TaskFailView";
  521. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},TaskFinishView=function(c){function b(){c.call(this);this.init()}__extends(b,c);b.prototype.init=function(){this.titleTxt=new egret.TextField;this.titleTxt.textColor=0;this.titleTxt.width=520;this.titleTxt.y=25;this.titleTxt.text="\u76ee\u6807\u8fbe\u6210";this.titleTxt.textAlign="center";this.addChild(this.titleTxt);this.targetTxt=
  522. new egret.TextField;this.targetTxt.x=50;this.targetTxt.y=75;this.targetTxt.size=20;this.targetTxt.textColor=0;this.addChild(this.targetTxt);this.icon=new egret.Bitmap;this.icon.x=20;this.icon.y=120;this.icon.width=100;this.icon.height=100;this.addChild(this.icon);this.desc=new BorderTxt(330,120,0,1);this.desc.x=140;this.desc.y=115;this.desc.size=20;this.desc.textColor=0;this.addChild(this.desc);this.chTxt=new egret.TextField;this.chTxt.width=420;this.chTxt.size=20;this.chTxt.textColor=0;this.chTxt.y=
  523. 260;this.chTxt.x=50;this.addChild(this.chTxt);this.btn=new TxtBtn("\u7ee7\u7eed\u6e38\u620f",0,0);this.btn.x=190;this.btn.y=290;this.addChild(this.btn);this.drawBorder(520,100,0,1);this.bp.height=365};b.prototype.updateTxt=function(b,a,c,l){this.chTxt.text="\u83b7\u5f97\u79f0\u53f7\uff1a"+b;this.desc.text=a;this.icon.texture=ResourceUtils.getTextureFromSheet(c,"taskIconRes");this.targetTxt.text="\u65b0\u7684\u76ee\u6807\uff1a \u7e41\u6b96 "+l+" \u5b50\u5b59"};return b}(TipsBaseView);
  524. TaskFinishView.prototype.__class__="TaskFinishView";
  525. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},TaskStartView=function(c){function b(){c.call(this);this.init()}__extends(b,c);b.prototype.init=function(){this.titleTxt=new egret.TextField;this.titleTxt.textColor=0;this.titleTxt.width=520;this.titleTxt.y=25;this.titleTxt.text="\u5f00\u64b8\u5427\uff01\u5fb7\u739b\u897f\u4e9a";this.titleTxt.textAlign="center";this.addChild(this.titleTxt);
  526. this.icon=new egret.Bitmap;this.icon.x=20;this.icon.y=80;this.icon.width=100;this.icon.height=100;this.addChild(this.icon);this.desc=new BorderTxt(330,120,0,1);this.desc.x=140;this.desc.y=85;this.desc.size=20;this.desc.textColor=0;this.addChild(this.desc);this.targetTxt=new egret.TextField;this.targetTxt.x=50;this.targetTxt.y=235;this.targetTxt.size=20;this.targetTxt.textColor=0;this.addChild(this.targetTxt);this.btn=new TxtBtn("\u53d1\u5c04",0,0);this.btn.x=190;this.btn.y=285;this.addChild(this.btn);
  527. this.drawBorder(520,100,0,1);this.bp.height=365};b.prototype.updateTxt=function(b,a,c){this.targetTxt.text="\u76ee\u6807\uff1a \u7e41\u6b96 "+b+" \u5b50\u5b59";this.desc.text=a;this.icon.texture=ResourceUtils.getTextureFromSheet(c,"taskIconRes")};return b}(TipsBaseView);TaskStartView.prototype.__class__="TaskStartView";
  528. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},TaskView=function(c){function b(){c.call(this);this.init()}__extends(b,c);b.prototype.init=function(){this.bg=ResourceUtils.createBitmapByName("taskbj");this.bg.width=530;this.bg.y=-60;this.bg.height=200;this.addChild(this.bg);this.icon=new egret.Bitmap;this.icon.y=-145;this.icon.x=-48;this.addChild(this.icon);this.txt=new egret.TextField;
  529. this.txt.textColor=0;this.txt.x=200;this.txt.y=-25;this.txt.textAlign="left";this.txt.lineSpacing=10;this.txt.size=22;this.txt.height=100;this.txt.width=320;this.addChild(this.txt);this.txt2=new egret.TextField;this.txt2.textColor=0;this.txt2.x=200;this.txt2.y=45;this.txt2.textAlign="left";this.txt2.size=28;this.txt2.text="\u76ee\u6807\uff1a";this.addChild(this.txt2);this.touchEnabled=!0;this.targetTxt=new egret.TextField;this.targetTxt.textColor=16711680;this.targetTxt.x=275;this.targetTxt.y=45;
  530. this.targetTxt.size=28;this.addChild(this.targetTxt)};b.prototype.update=function(b,a,c){this.touchEnabled=!1;this.icon.texture=ResourceUtils.getTextureFromSheet(b,"taskIconRes");this.txt.text=a;this.targetTxt.text=c;egret.setTimeout(this.setTouchAble,this,2E3)};b.prototype.setTouchAble=function(){this.touchEnabled=!0};return b}(egret.Sprite);TaskView.prototype.__class__="TaskView";
  531. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},ItemLayer=function(c){function b(){c.call(this);this.init();this.touchEnabled=!0}__extends(b,c);b.prototype.init=function(){this.width=Consts.Game_Width;this.height=Consts.Game_Height;this.maskBj=ResourceUtils.createBitmapByName("mask");this.maskBj.width=this.width;this.maskBj.height=this.height+230;this.maskBj.alpha=0.7;this.maskBj.visible=
  532. !1;this.addChild(this.maskBj);this.buyView=new BuyView;this.buyView.x=25;this.buyView.y=300;this.buyView.visible=!1;this.addChild(this.buyView);this.buyHouseView=new BuyHouseView;this.buyHouseView.x=25;this.buyHouseView.y=300;this.buyHouseView.visible=!1;this.addChild(this.buyHouseView)};b.prototype.drawBJ=function(){this.graphics.clear()};b.prototype.updateTxt=function(b,a,c,l,n){this.drawBJ();this.maskBj.visible=!0;this.buyHouseView.visible=!1;this.buyView.visible=!0;this.buyView.icon.texture=ResourceUtils.getTextureFromSheet(b);
  533. this.buyView.lb.text=a;this.buyView.needLb.text=c;this.buyView.currentLb.text=l;this.buyView.desTxt.text=n};b.prototype.showBuyHouseView=function(){this.visible=!0;this.maskBj.visible=!0;this.buyHouseView.visible=!0;this.buyView.visible=!1};b.prototype.showBuyView=function(){this.visible=!0;this.maskBj.visible=!0;this.buyHouseView.visible=!1;this.buyView.visible=!0};b.prototype.closeView=function(){this.visible=!1;this.maskBj.visible=!1};b.prototype.restart=function(){this.buyHouseView.resetIcon()};
  534. return b}(egret.Sprite);ItemLayer.prototype.__class__="ItemLayer";
  535. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},MCLayer=function(c){function b(){c.call(this);this.s=this.pt=0;this.ss=!0;this.st=0;this.stepTime=10;this.stepDif=this.stepCurrentTime=0;this.init();b.me=this}__extends(b,c);b.prototype.init=function(){this.targetTxt=new egret.TextField;this.addChild(this.targetTxt);this.timeTxt=new egret.TextField;this.addChild(this.timeTxt)};b.prototype.updateTxt=
  536. function(b,a){this.visible=!0;this.targetTxt.text="\u65f6\u95f4\uff1a"+a.toString();this.timeTxt.text="\u76ee\u6807\uff1a"+b.toString();this.play()};b.prototype.play=function(){this.targetTxt.textColor=5592405;this.targetTxt.size=20;this.targetTxt.alpha=0;this.targetTxt.x=150;this.targetTxt.y=240;this.timeTxt.textColor=5592405;this.timeTxt.size=20;this.timeTxt.alpha=0;this.timeTxt.x=280;this.timeTxt.y=240;egret.Ticker.getInstance().register(this.playing1,this)};b.prototype.playing1=function(b){this.pt+=
  537. b;30<this.pt&&(this.pt=0,this.targetTxt.size+=2,this.targetTxt.alpha+=0.1,this.targetTxt.x-=10,this.timeTxt.size+=2,this.timeTxt.alpha+=0.1,this.timeTxt.x+=5,1<=this.targetTxt.alpha&&(this.pt=0,egret.Ticker.getInstance().unregister(this.playing1,this),egret.Ticker.getInstance().register(this.playing2,this)))};b.prototype.playing2=function(b){this.st+=b;100<this.st&&(this.st=0,this.ss?(this.timeTxt.textColor=16777215,this.targetTxt.textColor=16777215,this.ss=!1):(this.timeTxt.textColor=5592405,this.targetTxt.textColor=
  538. 5592405,this.ss=!0),this.s+=1,10<=this.s&&(egret.Ticker.getInstance().unregister(this.playing2,this),this.timeTxt.textColor=16777215,this.targetTxt.textColor=16777215,this.ss=!1,this.st=this.s=0,this.stepX1=100/this.stepTime,this.stepY1=220/this.stepTime,this.stepX2=70/this.stepTime,egret.Ticker.getInstance().register(this.playing3,this)))};b.prototype.playing3=function(b){this.stepDif+=b;60<this.stepDif&&(this.stepDif=0,this.stepCurrentTime+=1,this.targetTxt.x-=this.stepX1,this.targetTxt.y-=this.stepY1,
  539. this.timeTxt.y-=this.stepY1,this.timeTxt.x+=this.stepX2,this.targetTxt.size-=2,this.timeTxt.size-=2,this.stepCurrentTime>=this.stepTime&&(this.stepDif=this.stepCurrentTime=0,egret.Ticker.getInstance().unregister(this.playing3,this),this.stop()))};b.prototype.stop=function(){this.visible=!1;GameContent.me.gameTitle.ssTargetTxt();TaskManager.instance().currentTaskIndex==TaskManager.instance().ydArr[0]?(GameContent.me.gameLayer.house.touchEnabled=!1,GameContent.me.gameLayer.showLeftArrow()):TaskManager.instance().currentTaskIndex==
  540. TaskManager.instance().ydArr[1]?(GameContent.me.gameLayer.house.touchEnabled=!1,GameContent.me.gameLayer.showDownArrow()):TaskManager.instance().currentTaskIndex==TaskManager.instance().ydArr[2]?(GameContent.me.gameLayer.house.touchEnabled=!1,GameContent.me.gameLayer.showDownArrow1()):(TaskManager.instance().goTaskFromPause(),GameContent.me.gameLayer.house.touchEnabled=!0)};return b}(egret.Sprite);MCLayer.prototype.__class__="MCLayer";
  541. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},TaskLayer=function(c){function b(){c.call(this);this.init();this.touchEnabled=!0}__extends(b,c);b.prototype.init=function(){this.width=Consts.Game_Width;this.height=Consts.Game_Height;this.maskBj=ResourceUtils.createBitmapByName("mask");this.maskBj.width=this.width;this.maskBj.height=this.height+230;this.maskBj.alpha=0.5;this.maskBj.visible=
  542. !1;this.addChild(this.maskBj);this.taskView=new TaskView;this.taskView.x=20;this.taskView.y=320;this.addChild(this.taskView);this.taskFailView=new TaskFailView;this.taskFailView.x=25;this.taskFailView.y=105;this.taskFailView.visible=!1;this.addChild(this.taskFailView);this.showTimer1=new egret.Timer(100,10);this.showTimer1.addEventListener(egret.TimerEvent.TIMER,this.playShow,this)};b.prototype.playShow=function(b){this.alpha+=0.1;1<=this.alpha&&(this.showTimer1.stop(),this.showTimer1.reset(),this.alpha=
  543. 1)};b.prototype.showStartView=function(b,a,c){this.showTimer1.stop();this.showTimer1.reset();this.visible=!0;this.maskBj.visible=!0;this.alpha=0;this.taskView.visible=!0;this.taskFailView.visible=!1;this.taskView.update(c,a,b);this.showTimer1.start()};b.prototype.showFinishTxt=function(b,a,c,l){this.showTimer1.stop();this.showTimer1.reset();this.visible=!0;this.maskBj.visible=!0;this.alpha=0;this.taskView.update(c,a,l);this.showTimer1.start()};b.prototype.showFailTxt=function(b,a,c){this.showTimer1.stop();
  544. this.showTimer1.reset();this.visible=!0;this.maskBj.visible=!0;this.alpha=0;this.taskView.visible=!1;this.taskFailView.visible=!0;this.taskFailView.updateTxt(b,a,c);this.showTimer1.start()};b.prototype.restart=function(){this.showTimer1.stop();this.showTimer1.reset();this.visible=this.maskBj.visible=!1;this.alpha=0;this.taskFailView.visible=!1};return b}(egret.Sprite);TaskLayer.prototype.__class__="TaskLayer";
  545. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},ScrollView=function(c){function b(){c.call(this);this._downContainerY=this._downContainerX=0;this._deltaTime=200;this.direction=Direction.VERTICAL;this.touchEnabled=!0;this._containerY=this._containerX=0;this.mask=new egret.Rectangle(0,0,100,100);b.srollView=this}__extends(b,c);b.prototype._onAddToStage=function(){c.prototype._onAddToStage.call(this);
  546. this.addListeners()};b.prototype._onRemoveFromStage=function(){c.prototype._onRemoveFromStage.call(this);this.removeListeners()};Object.defineProperty(b.prototype,"width",{set:function(b){this._viewWidth=this._explicitWidth=b;this.mask.width=b},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"height",{set:function(b){this._viewHeight=this._explicitHeight=b;this.mask.height=b},enumerable:!0,configurable:!0});b.prototype.setContainer=function(b,a,c){this._container&&this._container.parent&&
  547. this._container.parent.removeChild(this._container);this._container=b;this._initWidth=a;this._initHeight=c;this._containerY=this._containerX=0;if(null!=this._container.parent)if(this._container.parent!=this)this._container.parent.removeChild(this._container);else return;this.addChildAt(this._container,0)};b.prototype.mouseDown=function(b){this.touchEnabled&&null!=this._container&&(this._isMoved=!1,egret.MainContext.instance.stage.addEventListener(egret.TouchEvent.TOUCH_END,this.mouseUp,this),egret.MainContext.instance.stage.addEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,
  548. this.mouseUp,this),egret.MainContext.instance.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.mouseMove,this),egret.Tween.removeTweens(this._container),this._downContainerX=this._container.x,this._downContainerY=this._container.y,this._containerX=this._container.x,this._containerY=this._container.y,this._downPX=b.stageX,this._downPY=b.stageY,this._downTime=egret.getTimer())};b.prototype.mouseUp=function(b){console.log("this._containerY1::::",this._containerY);egret.MainContext.instance.stage.removeEventListener(egret.TouchEvent.TOUCH_END,
  549. this.mouseUp,this);egret.MainContext.instance.stage.removeEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.mouseUp,this);egret.MainContext.instance.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.mouseMove,this);var a=egret.getTimer();if(!(800>a-this._downTime))if(a-this._downTime>this._deltaTime)this._backToPosition();else{var c=b.stageX-this._downPX;b=b.stageY-this._downPY;a=2*Math.floor(this._deltaTime/(a-this._downTime));if(this.direction==Direction.BOTH||this.direction==Direction.HORIZONTAL)this._containerX+=
  550. c*a;if(this.direction==Direction.BOTH||this.direction==Direction.VERTICAL)this._containerY+=b*a;c=Math.max(100*a,100);c=Math.min(c,300);this.fixBoundary();a=egret.Tween.get(this._container,{onChange:this.moveList,onChangeObj:this});a.to({x:this._containerX,y:this._containerY},c);a.call(this._backToPosition,this);console.log("this._containerY::::",this._containerY)}};b.prototype.mouseMove=function(b){var a=b.stageX-this._downPX;b=b.stageY-this._downPY;if(this.direction==Direction.BOTH||this.direction==
  551. Direction.HORIZONTAL)this._containerX=this._downContainerX+a;if(this.direction==Direction.BOTH||this.direction==Direction.VERTICAL)this._containerY=this._downContainerY+b;this.fixBoundary();this._container.x=this._containerX;this._container.y=this._containerY;this.moveList()};b.prototype._backToPosition=function(){var b=!1;0<this._containerX?(b=!0,this._containerX=0):this._containerX<this._viewWidth-this._initWidth&&(b=!0,this._containerX=this._viewWidth>=this._initWidth?0:this._viewWidth-this._initWidth);
  552. 0<this._containerY?(b=!0,this._containerY=0):this._containerY<this._viewHeight-this._initHeight&&(b=!0,this._containerY=this._viewHeight>=this._initHeight?0:this._viewHeight-this._initHeight);b&&egret.Tween.get(this._container,{onChange:this.moveList,onChangeObj:this}).to({x:this._containerX,y:this._containerY},200)};b.prototype.fixBoundary=function(b){"undefined"===typeof b&&(b=0);0<this._containerX+b?this._containerX=0:this._containerX<this._viewWidth-this._initWidth+b&&(this._containerX=this._viewWidth>=
  553. this._initWidth?0:this._viewWidth-this._initWidth);0<this._containerY+b?this._containerY=0:this._containerY<this._viewHeight-this._initHeight+b&&(this._containerY=this._viewHeight>=this._initHeight?0:this._viewHeight-this._initHeight)};b.prototype.moveList=function(){this._container.youhua()};b.prototype.addListeners=function(){this.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.mouseDown,this)};b.prototype.removeListeners=function(){this.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.mouseDown,
  554. this);egret.MainContext.instance.stage.removeEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.mouseUp,this);egret.MainContext.instance.stage.removeEventListener(egret.TouchEvent.TOUCH_END,this.mouseUp,this);egret.MainContext.instance.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.mouseMove,this)};return b}(egret.DisplayObjectContainer);ScrollView.prototype.__class__="ScrollView";
  555. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},TipsView=function(c){function b(){c.call(this);this.init()}__extends(b,c);b.prototype.init=function(){this.width=Consts.Game_Width;this.height=Consts.Game_Height;this.maskBj=ResourceUtils.createBitmapByName("mask");this.maskBj.width=this.width;this.maskBj.height=this.height+230;this.maskBj.alpha=0.7;this.addChild(this.maskBj);this.tipsBJ=
  556. new TipsBaseView;this.tipsBJ.drawBorder(Consts.Game_Width-50,370,15658734);this.tipsBJ.bp.height=500;this.tipsBJ.bp.width=370;this.tipsBJ.x=103;this.tipsBJ.y=75;this.addChild(this.tipsBJ);this.yxsm=new egret.TextField;this.yxsm.textColor=16711680;this.yxsm.x=133;this.yxsm.y=115;this.yxsm.size=22;this.yxsm.text="\u6e38\u620f\u8bf4\u660e";this.addChild(this.yxsm);this.txt=new egret.TextField;this.txt.textColor=0;this.txt.width=300;this.txt.x=133;this.txt.textAlign="left";this.txt.y=165;this.txt.size=
  557. 22;this.txt.lineSpacing=15;this.txt.text="\u70b9\u51fb\u8305\u5c4b\u5373\u53ef\u751f\u4ea7\u5b50\u5b59\uff0c\n\n\u751f\u4ea7\u66f4\u591a\u7684\u5b50\u5b59\u5360\u9886\u5168\u6751\u3001\u5168\u4e61\u3001\u5168\u53bf......\u76f4\u5230\u5236\u9738\u5168\u4e16\u754c\n\n\u7ed9\u6211\u4e00\u95f4\u8305\u5c4b\uff0c\u5c31\u80fd\u521b\u9020\u4e00\u4e2a\u6c11\u65cf\uff01";this.addChild(this.txt);this.jjb=new egret.TextField;this.jjb.text="\u8fdb\u51fb\u5427\uff01";this.jjb.size=25;this.jjb.y=450;this.jjb.x=
  558. 247;this.jjb.textColor=0;this.addChild(this.jjb);this.btn=new TxtBtn("\u5f00\u59cb\u751f\u4ea7",8947848,3355443);this.btn.x=205;this.btn.y=490;this.btn.touchEnabled=!0;this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.closeMe,this);this.addChild(this.btn)};b.prototype.closeMe=function(b){this.visible=!1;this.txt.text="";this.removeChild(this.btn);this.btn=null};b.prototype.updateTxtAndBtn=function(b,a,c,l){"undefined"===typeof l&&(l=!1);l?(this.yxsm.visible=!0,this.jjb.visible=!0):(1==c?(this.yxsm.visible=
  559. !1,this.jjb.visible=!1,this.txt.text=b,this.txt.width=300,this.txt.x=133,this.txt.textAlign="left",this.txt.y=130,this.txt.size=22,this.txt.lineSpacing=20):2==c&&(this.yxsm.visible=!1,this.jjb.visible=!1,this.txt.text=b,this.txt.width=300,this.txt.x=133,this.txt.textAlign="left",this.txt.y=130,this.txt.size=22,this.txt.lineSpacing=20),this.btn=new TxtBtn(a,8947848,3355443),this.btn.x=205,this.btn.y=490,this.btn.touchEnabled=!0,this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.closeMe,this),
  560. this.addChild(this.btn))};return b}(TipsBaseView);TipsView.prototype.__class__="TipsView";
  561. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},GameContent=function(c){function b(){c.call(this);this.hasRestart=!1;this.init();b.me=this}__extends(b,c);b.prototype.init=function(){this.gameLayer=new GameLayer;this.scroller=new ScrollView;this.scroller.width=Consts.Game_Width;this.scroller.height=Consts.Game_Height;this.scroller.setContainer(this.gameLayer,Consts.Game_Width,this.gameLayer.height);
  562. this.scroller._onAddToStage();this.scroller.y=80;this.scroller.visible=!1;this.addChild(this.scroller);this.gameTitle=new TopView;this.gameTitle.visible=!1;this.addChild(this.gameTitle);this.itemLayer=new ItemLayer;this.itemLayer.visible=!1;this.addChild(this.itemLayer);this.taskLayer=new TaskLayer;this.taskLayer.visible=!1;this.addChild(this.taskLayer);this.mcLayer=new MCLayer;this.mcLayer.width=Consts.Game_Width;this.mcLayer.height=500;this.addChild(this.mcLayer);this.tipsView=new TipsView;this.addChild(this.tipsView);
  563. this.yd=new BaseBitmap(ResourceUtils.createBitmapByName("yindao"));this.yd.touchEnabled=!0;this.yd.addEventListener(egret.TouchEvent.TOUCH_TAP,this.closeYD,this);this.addChild(this.yd);this.registManager()};b.prototype.registManager=function(){GKManager.instance().itemLayer=this.itemLayer;GKManager.instance().gameLayer=this.gameLayer;RoleManager.instance().gameLayer=this.gameLayer;DataManager.instance().gameTitle=this.gameTitle;HouseManager.instance().house=this.gameLayer.house;TaskManager.instance().taskLayer=
  564. this.taskLayer;TaskManager.instance().gameTitle=this.gameTitle;SoundManager.instance().gameTitle=this.gameTitle;TaskManager.instance().initTaskManager();GKManager.instance().initGKManager();SoundManager.instance().init();this.scroller.height=egret.MainContext.instance.stage.stageHeight-80;Consts.Game_Height=egret.MainContext.instance.stage.stageHeight};b.prototype.startGame=function(b){"undefined"===typeof b&&(b=!1);RoleManager.instance().startAutoTimer(b);DataManager.instance().startAutoAdd()};b.prototype.startTask=
  565. function(){TaskManager.instance().startTask()};b.prototype.stopGame=function(){RoleManager.instance().stopAutoTimer();DataManager.instance().stopAutoAdd()};b.prototype.restart=function(){GKManager.instance().restart();RoleManager.instance().restart();HouseManager.instance().restart();DataManager.instance().restart();TaskManager.instance().restart();this.startGame(!0);TaskManager.instance().startTask();this.hasRestart=!0};b.prototype.closeYD=function(b){this.gameTitle.visible=!0;this.scroller.visible=
  566. !0;this.gameLayer.youhua();this.yd.parent&&this.removeChild(this.yd);this.startGame();SoundManager.instance().playBj()};return b}(egret.Sprite);GameContent.prototype.__class__="GameContent";
  567. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},CloudMask=function(c){function b(){c.call(this);this.goLeft=!0;this.step=2;this.init()}__extends(b,c);b.prototype.init=function(){this.cloud1=ResourceUtils.createBitmapByName("40085_png");this.cloud1.x=0;this.cloud1.y=0;this.cloud1.height=180;this.addChild(this.cloud1);this.cloud2=ResourceUtils.createBitmapByName("40085_png");this.cloud2.x=
  568. 640;this.cloud2.y=0;this.cloud2.height=180;this.addChild(this.cloud2);this.startWave()};b.prototype.startWave=function(){egret.Ticker.getInstance().register(this.wave,this)};b.prototype.wave=function(b){-640==this.cloud1.x?this.goLeft=!1:0==this.cloud1.x&&(this.goLeft=!0);this.goLeft?(this.cloud1.x-=this.step,this.cloud2.x-=this.step):(this.cloud1.x=0,this.cloud2.x=640)};b.prototype.dispose=function(){egret.Ticker.getInstance().register(this.wave,this)};return b}(egret.Sprite);
  569. CloudMask.prototype.__class__="CloudMask";
  570. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},LoadingUI=function(c){function b(){c.call(this);this.createView()}__extends(b,c);b.instance=function(){return null==b._instance?b._instance=new b:b._instance};b.prototype.addToStage=function(){egret.MainContext.instance.stage.addChild(this)};b.prototype.removeFromStage=function(){egret.MainContext.instance.stage.removeChild(this)};b.prototype.createView=
  571. function(){var b=new egret.Bitmap;b.texture=RES.getRes("egretLogo");b.scaleX=570/b.width;b.scaleY=1050/b.height;this.addChild(b);this.textField=new egret.TextField;this.addChild(this.textField);this.textField.size=26;this.textField.textColor=0;this.textField.x=0;this.textField.y=680;this.textField.textAlign=egret.HorizontalAlign.CENTER;this.textField.width=570;this.textField.height=100};b.prototype.playOverMovie=function(){this.textField.alpha=0;this.textField.text="Powered by Egret Engine";var b=
  572. egret.Tween.get(this.textField);b.to({alpha:1},1200);b.wait(400);b.to({alpha:0},700);b.call(this.allOver,this)};b.prototype.allOver=function(){Consts.GameApp.onLoadingAllOver()};b.prototype.onProgress=function(b,a){this.textField.text="\u6e38\u620f\u52a0\u8f7d\u4e2d..."+Math.ceil(b/a*100).toString()+"%"};return b}(egret.Sprite);LoadingUI.prototype.__class__="LoadingUI";
  573. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},ShareContainer=function(c){function b(b,a,e){c.call(this);this._shareTipLabel=new egret.TextField;this._shareContent=new egret.TextField;this._shareImg=new egret.Bitmap;var l=this;RES.getResByUrl("resource/assets/arrow.png",function(a){console.log(this);l._shareImg.texture=a},this)}__extends(b,c);b.prototype.showShareView=function(b){this.width=
  574. Consts.Game_Width;this.height=Consts.Game_Height;this.graphics.clear();this.graphics.beginFill(5592405,0.5);this.graphics.drawRect(0,0,this.width,this.height);this.graphics.endFill();this.touchEnabled=!0;this._shareImg.x=this.width-150;this._shareImg.y=0;this.addChild(this._shareImg);this._shareTipLabel.text="\u5206\u4eab\u5230\u670b\u53cb\u5708";this._shareTipLabel.y=60;this._shareTipLabel.x=200;this._shareTipLabel.size=25;this.addChild(this._shareTipLabel);this._shareContent.text=b;this._shareContent.x=
  575. 50;this._shareContent.y=250;this._shareContent.size=25;ShareUtils.shareToWeChat();this.addEventListener(egret.TouchEvent.TOUCH_TAP,this.removeShareContainer,this)};b.prototype.removeShareContainer=function(b){this.parent&&this.parent.removeChild(this)};return b}(egret.Sprite);ShareContainer.prototype.__class__="ShareContainer";
  576. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},GameApp=function(c){function b(){c.call(this);this.shareContainer=new ShareContainer;Consts.GameApp=this;this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this);ShareUtils.setShareInfo(Consts.title,Consts.desc,Consts.iconLink)}__extends(b,c);b.prototype.onAddToStage=function(b){Consts.Game_Width=570;Consts.Game_Height=
  577. 800;Consts.GamePoxY=0;this.shareContainer=new ShareContainer;RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigComplete,this);RES.loadConfig("resource/resource.json","resource/")};b.prototype.onConfigComplete=function(b){RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigComplete,this);RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this);RES.addEventListener(RES.ResourceEvent.GROUP_PROGRESS,this.onResourceProgress,this);RES.loadGroup("loading")};
  578. b.prototype.onLoadingAllOver=function(){this.stage.removeChild(this.loadingView);this.createGameScene()};b.prototype.onResourceLoadComplete=function(b){"preload"==b.groupName?(RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this),RES.removeEventListener(RES.ResourceEvent.GROUP_PROGRESS,this.onResourceProgress,this),this.loadingView.playOverMovie()):"loading"==b.groupName&&(this.loadingView=new LoadingUI,this.stage.addChild(this.loadingView),RES.loadGroup("preload"))};
  579. b.prototype.onResourceProgress=function(b){if("preload"==b.groupName)this.loadingView.onProgress(b.itemsLoaded,b.itemsTotal)};b.prototype.createGameScene=function(){this.gameContent=new GameContent;this.addChild(this.gameContent);ShareUtils.getUserGoal()};b.prototype.createBitmapByName=function(b){var a=new egret.Bitmap;b=RES.getRes(b);a.texture=b;return a};b.prototype.startAnimation=function(b){};b.prototype.shareGame=function(b){Consts.title="\u611a\u516c\u79fb\u5c71";Consts.desc=b;console.log("share:::",
  580. Consts.title,Consts.desc);ShareUtils.setShareInfo(Consts.title,Consts.desc,Consts.iconLink);ShareUtils.isInWeChat()&&(this.shareContainer.showShareView(Consts.desc),this.addChild(this.shareContainer))};b.prototype.moreGameBtnClick=function(){ShareUtils.moreGame()};return b}(egret.DisplayObjectContainer);GameApp.prototype.__class__="GameApp";
  581. var __extends=this.__extends||function(c,b){function d(){this.constructor=c}for(var a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);d.prototype=b.prototype;c.prototype=new d},GKView=function(c){function b(b,a){"undefined"===typeof a&&(a=!0);c.call(this);this.isSetMask=this.isShowTitle=!0;this.dcl=this.gkIndex=0;this.itemArr=[];this.roleArr=[];this.isShowTitle=this.isSetMask=a;this.initData();this.initView(b)}__extends(b,c);b.prototype.initData=function(){this.add=this.num=0;this.gkData=new GK};b.prototype.initView=
  582. function(b){this.bgImg=ResourceUtils.createBitmapByName(b);this.addChild(this.bgImg);this.isSetMask&&(this.titleTips=new TitleTips,this.titleTips.visible=!1,this.addChild(this.titleTips),this.cloudMask=new CloudMask,this.addChild(this.cloudMask));this.addBtn=new ImgBtn("40035_1","40035_2","btnRes");this.addBtn.x=530;this.addBtn.y=this.isSetMask?90:230;this.addChild(this.addBtn)};b.prototype.setTitleTip=function(b,a,c){this.titleTips.updateLb(b,a,c)};b.prototype.updateTitleTip=function(b,a){this.titleTips.updateTxt(b,
  583. a)};b.prototype.removeMask=function(){this.titleTips.visible=!0;this.cloudMask.visible=!1;this.tp=new egret.Point(270,55);this.bp=new egret.Point(260,65);this.homeRect=new egret.Rectangle(0,50,640,115)};b.prototype.updateData=function(){DataManager.instance().updateGKData([this.gkData.type,this.gkData.ADD]);this.titleTips.updateTxt(this.gkData.itemNum,this.gkData.ADD)};b.prototype.addItem=function(b,a){0==this.itemArr.length&&this.removeMask();9>this.itemArr.length&&(b.x=85*this.itemArr.length+5,
  584. b.y=35,this.addChild(b),this.itemArr.push(b));this.gkIndex++;this.gkData.currentIndex++;this.gkData.currentNeeds=this.gkData.list[this.gkIndex].need;this.gkData.itemNum=this.gkIndex;this.resetRole()};b.prototype.resetRole=function(){1==this.itemArr.length?this.addARole():5==this.itemArr.length?this.addARole():8==this.itemArr.length&&this.addARole();this.setChildIndex(this.addBtn,this.numChildren-1);this.gkData.ADD=this.gkData.list[this.gkIndex].add;this.titleTips.leftTxt.text=this.gkData.itemNum.toString();
  585. this.updateData()};b.prototype.addARole=function(){var b=RoleManager.instance().createRole(RoleType.PT,RoleState.FLY);b.update(this.bp,this.tp,this.homeRect,b.roleType);b.isInHome=!1;this.roleArr.push(b);this.addChild(b)};b.prototype.setGKDisplay=function(b,a,c,l){this.gkData.type=b;this.gkData.itemIcon=a;this.gkData.title=c;this.gkData.desc=l};b.prototype.setGKData=function(){this.gkData.currentNeeds=this.gkData.list[0].need};b.prototype.restart=function(){this.isSetMask&&(this.cloudMask.visible=
  586. !0);this.gkIndex=0;this.gkData.currentIndex=0;this.gkData.currentNeeds=this.gkData.list[0].need;this.gkData.itemNum=0;this.gkData.ADD=this.gkData.list[0].add;for(this.updateData();this.itemArr[0];)this.removeChild(this.itemArr[0]),this.itemArr.shift();for(;this.roleArr[0];)this.removeChild(this.roleArr[0]),this.roleArr.shift()};return b}(egret.Sprite);GKView.prototype.__class__="GKView";var Task=function(){return function(){}}();Task.prototype.__class__="Task";