index.92cfe.js 30 KB

1
  1. window.__require=function t(e,r,n){function a(i,c){if(!r[i]){if(!e[i]){var s=i.split("/");if(s=s[s.length-1],!e[s]){var h="function"==typeof __require&&__require;if(!c&&h)return h(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+i+"'")}i=s}var l=r[i]={exports:{}};e[i][0].call(l.exports,function(t){return a(e[i][1][t]||t)},l,l.exports,t,e,r,n)}return r[i].exports}for(var o="function"==typeof __require&&__require,i=0;i<n.length;i++)a(n[i]);return a}({CCGIFTest:[function(t,e,r){"use strict";cc._RF.push(e,"95292FzWddAUopOS5LSKBKW","CCGIFTest");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__decorate||function(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},i=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(a,o){function i(t){try{s(n.next(t))}catch(e){o(e)}}function c(t){try{s(n.throw(t))}catch(e){o(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(i,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(t){return function(e){return s([t,e])}}function s(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=e.call(t,i)}catch(c){o=[6,c],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(r,"__esModule",{value:!0}),r.CCGIFTest=void 0;var s=t("./CCGIF"),h=cc._decorator,l=h.ccclass,u=(h.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){return i(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return cc.find("Canvas/loading").active=!0,cc.find("Canvas/btnPlay").active=!1,[4,Promise.all(this.node.children.map(function(t){return t.getComponent(s.default).preload()}))];case 1:return t.sent(),cc.find("Canvas/loading").active=!1,cc.find("Canvas/btnPlay").active=!0,console.debug("preload success"),this.playAll(),[2]}})})},e.prototype.playAll=function(){this.node.children.forEach(function(t){return t.getComponent(s.default).play()})},o([l],e)}(cc.Component));r.CCGIFTest=u,cc._RF.pop()},{"./CCGIF":"CCGIF"}],CCGIF:[function(t,e,r){"use strict";cc._RF.push(e,"c0ff5NcIN5BPITgP1IQiCbP","CCGIF");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__decorate||function(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},i=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(a,o){function i(t){try{s(n.next(t))}catch(e){o(e)}}function c(t){try{s(n.throw(t))}catch(e){o(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(i,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(t){return function(e){return s([t,e])}}function s(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=e.call(t,i)}catch(c){o=[6,c],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(r,"__esModule",{value:!0});var s=t("./GIF"),h=cc._decorator,l=h.ccclass,u=h.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.delays=[],e.frames=[],e.path="",e.frameIdx=0,e}return a(e,t),e.prototype.start=function(){this.sp=this.node.addComponent(cc.Sprite),this.node.active=!1},e.prototype.preload=function(){return i(this,void 0,void 0,function(){var t=this;return c(this,function(){return s.GIFCache.getInstance(),[2,new Promise(function(e,r){cc.loader.loadRes(t.path,function(n,a){if(n)r(n);else{var o=a._nativeAsset.spriteFrames[0]._originalSize;t.node.setContentSize(o),t.delays=a._nativeAsset.delays.map(function(t){return t/100}),t.frames=a._nativeAsset.spriteFrames,e()}})})]})})},e.prototype.play=function(t,e){var r=this;if(void 0===t&&(t=!1),void 0===e&&(e=!1),e||this.stop(),this.frames.length){if(this.frameIdx>=this.frames.length&&(this.frameIdx=0,!t))return void(this.node.active=!1);this.node.active=!0,this.sp.spriteFrame=this.frames[this.frameIdx],this.scheduleOnce(function(){r.play(t,!0)},this.delays[this.frameIdx]),this.frameIdx++}},e.prototype.stop=function(){this.frameIdx=0,this.unscheduleAllCallbacks(),this.node.active=!1},o([u(cc.String)],e.prototype,"path",void 0),o([l],e)}(cc.Component);r.default=f,cc._RF.pop()},{"./GIF":"GIF"}],CharaCollision:[function(t,e,r){"use strict";cc._RF.push(e,"386bfnjbPFF+7lE/2Si+qWw","CharaCollision");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__decorate||function(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i};Object.defineProperty(r,"__esModule",{value:!0});var i=t("./GameManager"),c=cc._decorator,s=c.ccclass,h=(c.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.CharaNumber=0,e.returnNumber=!1,e.getNumberTime=0,e.bianjieX=0,e.testEndDJS=0,e.endOne=0,e}return a(e,t),e.prototype.start=function(){this.bianjieX=360-this.node.width/2},e.prototype.update=function(t){var e=this;if(this.node.x<-this.bianjieX&&(this.node.x=-this.bianjieX),this.node.x>this.bianjieX&&(this.node.x=this.bianjieX),this.returnNumber&&(this.scheduleOnce(function(){e.getNumberTime=0},.25),this.returnNumber=!1),"CharaNode"==this.node.parent.name&&(this.testEndDJS+=t),this.node.y+this.node.width/2>cc.find("Canvas/LineNode").children[0].y&&0==this.endOne&&this.testEndDJS>3){for(var r=0;r<cc.find("Canvas/CharaNode").children.length;r++)cc.find("Canvas/CharaNode").children[r].removeComponent(cc.PhysicsCircleCollider),cc.find("Canvas/CharaNode").children[r].removeComponent(cc.RigidBody);this.node.color=cc.Color.RED,cc.tween(this.node).to(.3,{opacity:0}).to(.3,{opacity:255}).union().repeat(3).call(function(){i.default.Instance.end(),cc.find("Canvas/LineNode").children[0].active=!1}).start(),this.endOne++}},e.prototype.getNumber=function(){var t=this.getNumberTime;return this.getNumberTime++,this.returnNumber=!0,t},e.prototype.onBeginContact=function(t,e,r){var n=this;if("Chara"==r.node.group){if(e.node.y<r.node.y)return;e.node.parent=cc.find("Canvas/CharaNode"),null!=e.node.getComponent(cc.RigidBody)&&(e.node.getComponent(cc.RigidBody).angularVelocity=0);var a=this.CharaNumber,o=r.node.getComponent("CharaCollision").CharaNumber;a==o&&a<i.default.Instance.AllChara.length-1&&o<i.default.Instance.AllChara.length-1&&0==e.node.getComponent("CharaCollision").getNumber()&&(r.node.getComponent(cc.PhysicsCircleCollider).radius=0,r.node.getComponent(cc.PhysicsCircleCollider).apply(),this.node.getComponent(cc.PhysicsCircleCollider).radius=0,this.node.getComponent(cc.PhysicsCircleCollider).apply(),cc.tween(e.node).to(.1,{position:r.node.position}).call(function(){try{i.default.Instance.CharaNumberRec[n.CharaNumber]=i.default.Instance.CharaNumberRec[n.CharaNumber]-2,i.default.Instance.CharaNumberRec[n.CharaNumber+1]++,i.default.Instance.score+=n.CharaNumber+1,i.default.Instance.createLevelUpChara(n.CharaNumber+1,r.node.position),r.node.active=!1,e.node.active=!1,r.node.destroy(),e.node.destroy(),i.default.Instance.updateCharaNumber()}catch(t){}}).start())}},o([s],e)}(cc.Component));r.default=h,cc._RF.pop()},{"./GameManager":"GameManager"}],GIF:[function(t,e,r){"use strict";cc._RF.push(e,"c63d8V3c2NPzYNB3sN3b21c","GIF");var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(a,o){function i(t){try{s(n.next(t))}catch(e){o(e)}}function c(t){try{s(n.throw(t))}catch(e){o(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(i,c)}s((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(t){return function(e){return s([t,e])}}function s(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=e.call(t,i)}catch(c){o=[6,c],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(r,"__esModule",{value:!0}),r.GIFCache=r.GIF=r.FileHead=r.FileType=void 0;var o,i=t("./LZW");(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.PNG=1]="PNG",t[t.JPG=2]="JPG",t[t.GIF=3]="GIF",t[t.WEBP=4]="WEBP"})(o=r.FileType||(r.FileType={}));var c=function(){function t(){}return t.IMAGE_PNG="89504e47",t.IMAGE_JPG="ffd8ff",t.IMAGE_GIF="474946",t.RIFF="52494646",t.WEBP_RIFF=t.RIFF,t.WEBP_WEBP="57454250",t}();r.FileHead=c;var s=function(){function t(){this._offset=0,this._info={header:"",frames:[],comment:""},this._delays=[],this._spriteFrames=[],this._canvas=null,this._context=null,this.id="GIF",this.async=!0}return Object.defineProperty(t.prototype,"buffer",{get:function(){return this._buffer},set:function(t){this.clear(),this._buffer=t,this._view=new Uint8Array(t)},enumerable:!1,configurable:!0}),t.prototype.handle=function(t,e){this.buffer=t,this.getHeader(),this.getScrDesc(),this.getTexture(),0==this._spriteFrames.length?e(new Error("gif\u52a0\u8f7d\u5931\u8d25,\u5e27\u957f\u5ea6\u4e3a0")):e(null,{delays:this._delays,spriteFrames:this._spriteFrames,length:this._info.frames.length})},t.detectFormat=function(t){return-1!=t.indexOf(c.IMAGE_GIF)?o.GIF:-1!=t.indexOf(c.IMAGE_PNG)?o.PNG:-1!=t.indexOf(c.IMAGE_JPG)?o.JPG:-1!=t.indexOf(c.WEBP_RIFF)&&-1!=t.indexOf(c.WEBP_WEBP)?o.WEBP:o.UNKNOWN},t.bytes2HexString=function(t){for(var e="",r=0;r<t.length;r++){var n,a=t[r];1==(n=a<0?(255+a+1).toString(16):a.toString(16)).length&&(n="0"+n),e+=n}return e},t.prototype.getTexture=function(){for(var t=0,e=0,r=this._info.frames;e<r.length;e++){var n=r[e];this.decodeFrame2Texture(n,t++)}},t.prototype.getSpriteFrame=function(t){return this._spriteFrames[t]?this._spriteFrames[t]:this.decodeFrame2Texture(this._info.frames[t],t)},t.prototype.decodeFrame=function(t){var e=this,r=this._context.getImageData(t.img.x,t.img.y,t.img.w,t.img.h);return t.img.m?this._tab=t.img.colorTab:this._tab=this._info.colorTab,i.default.decode(t.img.srcBuf,t.img.codeSize).forEach(function(n,a){r.data[4*a]=e._tab[3*n],r.data[4*a+1]=e._tab[3*n+1],r.data[4*a+2]=e._tab[3*n+2],r.data[4*a+3]=255,t.ctrl.t&&n==t.ctrl.tranIndex&&(r.data[4*a+3]=0)}),r},t.prototype.mergeFrames=function(t,e){var r=e;if(t)for(var n=0;n<r.data.length;n+=4)0==r.data[n+3]&&(r.data[n]=this._lastData.data[n],r.data[n+1]=this._lastData.data[n+1],r.data[n+2]=this._lastData.data[n+2],r.data[n+3]=this._lastData.data[n+3]);return r},t.prototype.dataUrl2SpriteFrame=function(t){var e=new cc.Texture2D,r=new cc.SpriteFrame,n=new Image;return n.src=t,e.initWithElement(n),r.setTexture(e),r},t.prototype.date2SpriteFrame=function(t,e,r){var n=new cc.RenderTexture,a=new cc.SpriteFrame;return n.initWithData(t.data,cc.Texture2D.PixelFormat.RGBA8888,e,r),a.setTexture(n),a},t.prototype.putImageDataJSB=function(t,e,r,n){var a=this,o=function(){for(var n=0;n<t.height;n++)for(var o=0;o<t.width;o++){var i=4*n*t.width+4*o,c=4*(n+r)*a._lastData.width+4*(o+e);0!=t.data[i+3]&&(a._lastData.data[c]=t.data[i],a._lastData.data[c+1]=t.data[i+1],a._lastData.data[c+2]=t.data[i+2],a._lastData.data[c+3]=t.data[i+3])}},i=function(){for(var n=0;n<a._lastData.height;n++)for(var o=0;o<a._lastData.width;o++){var i=4*n*a._lastData.width+4*o,c=4*(n-r)*t.width+4*(o-e),s=!1;(o<e||o>e+t.width)&&(s=!0),(n<r||n>r+t.height)&&(s=!0),s?(a._lastData.data[i+0]=0,a._lastData.data[i+1]=0,a._lastData.data[i+2]=0,a._lastData.data[i+3]=0):(a._lastData.data[i+0]=t.data[c+0],a._lastData.data[i+1]=t.data[c+1],a._lastData.data[i+2]=t.data[c+2],a._lastData.data[i+3]=t.data[c+3])}};4==t.data[0]&&0==t.data[1]&&0==t.data[2]&&0==t.data[3]||(1==n.ctrl.disp||0==n.ctrl.disp?o():2==n.ctrl.disp?i():function(){for(var e=0,r=0;r<t.height;r+=2){for(var n=0,a=0;a<t.width;a++){var o=4*r*t.width+4*a;0==t.data[o+3]&&n++}if(n/t.width>.1&&e++,e/(t.height/2)>.6)return!0}return!1}()?i():o())},t.prototype.putImageDataWeb=function(t,e){var r;if(1==e.ctrl.disp||0==e.ctrl.disp){this._context.putImageData(t,e.img.x,e.img.y,0,0,e.img.w,e.img.h);var n=this._context.getImageData(0,0,this._canvas.width,this._canvas.height),a=this._lastData;r=this.mergeFrames(a,n)}else this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._context.putImageData(t,e.img.x,e.img.y,0,0,e.img.w,e.img.h),r=this._context.getImageData(0,0,this._canvas.width,this._canvas.height);return this._context.putImageData(r,0,0),this._lastData=r,this._canvas.toDataURL()},t.prototype.decodeFrame2Texture=function(t,e){this._context||(this._canvas=document.createElement("canvas"),this._context=this._canvas.getContext("2d"),this._canvas.width=t.img.w,this._canvas.height=t.img.h);var r=this.decodeFrame(t);this._delays[e]=t.ctrl.delay;var n=this.putImageDataWeb(r,t);return this._spriteFrames[e]=this.dataUrl2SpriteFrame(n),this._spriteFrames[e]},t.prototype.read=function(t){return this._view.slice(this._offset,this._offset+=t)},t.prototype.getHeader=function(){var t=this;this._info.header="",this.read(6).forEach(function(e){t._info.header+=String.fromCharCode(e)})},t.prototype.getScrDesc=function(){var t=this.read(7);this._info.w=t[0]+(t[1]<<8),this._info.h=t[2]+(t[3]<<8),this._info.m=1&t[4]>>7,this._info.cr=7&t[4]>>4,this._info.s=1&t[4]>>3,this._info.pixel=7&t[4],this._info.bgColor=t[5],this._info.radio=t[6],this._info.m&&(this._info.colorTab=this.read(3*(2<<this._info.pixel))),this.decode()},t.prototype.decode=function(){var t=[],e=this.read(1);switch(e[0]){case 33:this.extension();break;case 44:for(e=this.read(9),this._frame.img={x:e[0]+(e[1]<<8),y:e[2]+(e[3]<<8),w:e[4]+(e[5]<<8),h:e[6]+(e[7]<<8),colorTab:0},this._frame.img.m=1&e[8]>>7,this._frame.img.i=1&e[8]>>6,this._frame.img.s=1&e[8]>>5,this._frame.img.r=3&e[8]>>3,this._frame.img.pixel=7&e[8],this._frame.img.m&&(this._frame.img.colorTab=this.read(3*(2<<this._frame.img.pixel))),this._frame.img.codeSize=this.read(1)[0],t=[];;){if(!(e=this.read(1))[0]){this._frame.img.srcBuf=t,this.decode();break}this.read(e[0]).forEach(function(e){t.push(e)})}}},t.prototype.extension=function(){var t=this,e=this.read(1);switch(e[0]){case 255:if(11!=this.read(1)[0])throw new Error("\u89e3\u6790\u51fa\u9519");for(this._info.appVersion="",this.read(11).forEach(function(e){t._info.appVersion+=String.fromCharCode(e)});;){if(!(e=this.read(1))[0]){this.decode();break}this.read(e[0])}break;case 249:if(4!=this.read(1)[0])throw new Error("\u89e3\u6790\u51fa\u9519");if(e=this.read(4),this._frame={},this._frame.ctrl={disp:7&e[0]>>2,i:1&e[0]>>1,t:1&e[0],delay:e[1]+(e[2]<<8),tranIndex:e[3]},this._info.frames.push(this._frame),0!=this.read(1)[0])throw new Error("\u89e3\u6790\u51fa\u9519");this.decode();break;case 254:(e=this.read(1))[0]&&(this.read(e[0]).forEach(function(e){t._info.comment+=String.fromCharCode(e)}),0==this.read(1)[0]&&this.decode())}},t.prototype.clear=function(){this._tab=null,this._view=null,this._frame=null,this._offset=0,this._info={header:"",frames:[],comment:""},this._lastData=null,this._delays=[],this._spriteFrames=[],this._canvas=null,this._context=null},t}();r.GIF=s;var h=function(){function t(){this.gifFrameMap={}}return t.getInstance=function(){var e=this;return t.instance||(cc.macro.ALLOW_IMAGE_BITMAP=!0,t.instance=new t,cc.assetManager.parser.register(".gif",function(t,r,o){return n(e,void 0,void 0,function(){var e,r;return a(this,function(n){switch(n.label){case 0:return e=new s,[4,t.arrayBuffer()];case 1:return r=n.sent(),e.handle(r,o),[2]}})})})),t.instance},t.prototype.preloadGif=function(t){try{t.words&&t.words.forEach(function(t){-1!=t.indexOf(".gif")&&cc.loader.load(t.img,function(){})}),t.classes&&t.classes.forEach(function(t){-1!=t.indexOf(".gif")&&cc.loader.load(t.img,function(){})})}catch(e){cc.log(e)}},t.prototype.addItemFrame=function(t,e){if(1==this.has(t)){var r=this.get(t);r.referenceCount++,r.frameData=e}else{var n={referenceCount:0,type:o.GIF,frame:{}};this.gifFrameMap[t]=n}},t.prototype.addItemType=function(t,e){if(this.has(t))this.get(t).type=e;else{var r={referenceCount:0,type:e,frame:null};this.gifFrameMap[t]=r}},t.prototype.add=function(t,e){this.has(t)||(this.gifFrameMap[t]=e)},t.prototype.get=function(t){return this.gifFrameMap[t]},t.prototype.has=function(t){return null!=this.gifFrameMap[t]},t.prototype.hasFrame=function(t){var e=this.get(t);return null!=e&&null!=e.frameData},t.prototype.relase=function(t){this.has(t)&&(this.gifFrameMap[t]=void 0,cc.loader.release(t))},t.prototype.releaseAll=function(){for(var t in this.gifFrameMap)cc.loader.release(t);this.gifFrameMap={}},t.instance=null,t}();r.GIFCache=h,cc._RF.pop()},{"./LZW":"LZW"}],GameManager:[function(t,e,r){"use strict";cc._RF.push(e,"b26a3p5lhJKi57tT2uOhvHa","GameManager");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__decorate||function(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i};Object.defineProperty(r,"__esModule",{value:!0});var i=t("./lib/gif/CCGIF"),c=cc._decorator,s=c.ccclass,h=c.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.CharaNode=null,e.TargetCharaNode=null,e.CharaPre=null,e.lineNode=null,e.scoreLabel=null,e.GifNode=null,e.CharaNumber=null,e.CharaNumberList=null,e.TargetChara=null,e.AllChara=[],e.score=0,e.endOne=0,e.CharaHeigth=0,e.CharaSize=1.5,e.CharaNumberRec=[],e}var r;return a(e,t),r=e,e.prototype.onLoad=function(){cc.view.enableAutoFullScreen(!1),null!=r.Instance&&r.Instance.destroy(),r.Instance=this,cc.director.getPhysicsManager().enabled=!0},e.prototype.start=function(){var t=this;for(var e in this.GifNode.getComponent(i.default).preload().then(function(){return t.GifNode.getComponent(i.default).play(!0)}),cc.tween(this.lineNode.children[0]).to(.3,{opacity:255}).to(.3,{opacity:0}).union().repeatForever().start(),this.lineNode.children[0].active=!1,this.AllChara)if(Object.prototype.hasOwnProperty.call(this.AllChara,e)){var r=this.AllChara[e],n=cc.instantiate(this.CharaNumber);n.setParent(this.CharaNumberList),n.children[0].getComponent(cc.Sprite).spriteFrame=r,this.CharaNumberRec[e]=0}this.updateCharaNumber(),this.createOneChara(0,cc.v2(0,550))},e.prototype.update=function(){r.Instance.CharaHeigth=r.Instance.findHighestChara(),this.scoreLabel.string=this.score.toString(),this.checkRedLineAlert()},e.prototype.createOneChara=function(t,e){var r=this;for(var n in this.TargetCharaNode.children)if(Object.prototype.hasOwnProperty.call(this.TargetCharaNode.children,n)){var a=this.TargetCharaNode.children[n];a.position.y>=500&&a.destroy()}var o=cc.instantiate(this.CharaPre);o.setParent(this.TargetCharaNode),o.getComponent(cc.Sprite).spriteFrame=this.AllChara[t],o.getComponent("CharaCollision").CharaNumber=t,o.setPosition(e),o.setScale(0),o.getComponent(cc.RigidBody).type=cc.RigidBodyType.Static,o.getComponent(cc.PhysicsCircleCollider).radius=0,o.setContentSize(this.resizeChara(o.getContentSize(),t)),o.getComponent(cc.PhysicsCircleCollider).apply(),cc.tween(o).to(.5,{scale:1},{easing:"backOut"}).call(function(){r.TargetChara=o}).start()},e.prototype.createLevelUpChara=function(t,e){var r=cc.instantiate(this.CharaPre);r.parent=this.CharaNode,r.getComponent(cc.Sprite).spriteFrame=this.AllChara[t],r.getComponent("CharaCollision").CharaNumber=t,r.position=e,r.scale=0,r.getComponent(cc.RigidBody).linearVelocity=cc.v2(0,-100),r.getComponent(cc.PhysicsCircleCollider).radius=r.height/2,r.setContentSize(this.resizeChara(r.getContentSize(),t)),r.getComponent(cc.PhysicsCircleCollider).apply(),cc.tween(r).to(.5,{scale:1},{easing:"backOut"}).call(function(){null!=r.getComponent(cc.PhysicsCircleCollider)&&(r.getComponent(cc.PhysicsCircleCollider).radius!=r.height/2&&(r.getComponent(cc.PhysicsCircleCollider).radius=r.height/2),r.getComponent(cc.RigidBody).type!=cc.RigidBodyType.Dynamic&&(r.getComponent(cc.RigidBody).type=cc.RigidBodyType.Dynamic),r.getComponent(cc.PhysicsCircleCollider).apply())}).start()},e.prototype.randomOneChara=function(){for(var t=[],e=0;e<.5*r.Instance.AllChara.length;e++){t.push(e);for(var n=0;n<r.Instance.CharaNumberRec[e];n++)t.push(e),t.push(e)}r.Instance.createOneChara(t[Math.floor(Math.random()*t.length)],cc.v2(0,550))},e.prototype.resizeChara=function(t,e){return new cc.Size(t.width*this.CharaSize*Math.pow((e+1)/this.AllChara.length,.8),t.height*this.CharaSize*Math.pow((e+1)/this.AllChara.length,.8))},e.prototype.updateCharaNumber=function(){for(var t in this.CharaNumberRec)if(Object.prototype.hasOwnProperty.call(this.CharaNumberRec,t)){var e=this.CharaNumberRec[t];console.log(this.CharaNumberList.children[t].children[1].getComponent(cc.Label).string),this.CharaNumberList.children[t].children[1].getComponent(cc.Label).string=e.toString()}},e.prototype.checkRedLineAlert=function(){this.lineNode.children[0].y-r.Instance.CharaHeigth<200&&this.lineNode.children[0].y-r.Instance.CharaHeigth>=0&&(this.lineNode.children[0].active=!0),this.lineNode.children[0].y-r.Instance.CharaHeigth>200&&(this.lineNode.children[0].active=!1)},e.prototype.end=function(){var t=this;if(0==this.endOne){for(var e=0,n=function(n){setTimeout(function(){r.Instance.score+=t.CharaNode.children[n].getComponent("CharaCollision").CharaNumber+1,t.CharaNode.children[n].active=!1},100*++e)},a=this.CharaNode.children.length-1;a>=0;a--)n(a);this.TargetCharaNode.active=!0;for(var o=0;o<this.TargetCharaNode.children.length;o++)this.TargetCharaNode.children[o].active=!1;this.endOne++}},e.prototype.findHighestChara=function(){if(this.CharaNode.children.length>0){for(var t=this.CharaNode.children[0].y,e=1;e<this.CharaNode.children.length;e++){var r=this.CharaNode.children[e].y+this.CharaNode.children[e].width/2;t<r&&(t=r)}return t}return 0},e.Instance=null,o([h(cc.Node)],e.prototype,"CharaNode",void 0),o([h(cc.Node)],e.prototype,"TargetCharaNode",void 0),o([h(cc.Prefab)],e.prototype,"CharaPre",void 0),o([h(cc.Node)],e.prototype,"lineNode",void 0),o([h(cc.Label)],e.prototype,"scoreLabel",void 0),o([h(cc.Node)],e.prototype,"GifNode",void 0),o([h(cc.Prefab)],e.prototype,"CharaNumber",void 0),o([h(cc.Node)],e.prototype,"CharaNumberList",void 0),o([h(cc.SpriteFrame)],e.prototype,"AllChara",void 0),r=o([s],e)}(cc.Component);r.default=l,cc._RF.pop()},{"./lib/gif/CCGIF":"CCGIF"}],InputController:[function(t,e,r){"use strict";cc._RF.push(e,"3ef8bIfTQ5O0JtKUpHBr2z8","InputController");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__decorate||function(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i};Object.defineProperty(r,"__esModule",{value:!0});var i=t("./GameManager"),c=cc._decorator,s=c.ccclass,h=(c.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.touchNum=0,e}return a(e,t),e.prototype.start=function(){this.openTouch()},e.prototype.openTouch=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.onTouchStart,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.onTouchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this.onTouchEnd,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.onTouchEnd,this)},e.prototype.onTouchStart=function(t){if(null!=i.default.Instance.TargetChara){this.touchNum=1;var e=this.node.convertToNodeSpaceAR(t.getLocation()).x,r=i.default.Instance.TargetChara.y;cc.tween(i.default.Instance.TargetChara).to(.1,{position:cc.v3(e,r,0)}).start()}},e.prototype.onTouchMove=function(t){null!=i.default.Instance.TargetChara&&(this.touchNum=1,i.default.Instance.TargetChara.x=this.node.convertToNodeSpaceAR(t.getLocation()).x)},e.prototype.onTouchEnd=function(){null!=i.default.Instance.TargetChara&&1==this.touchNum&&(this.touchNum=0,i.default.Instance.CharaNumberRec[i.default.Instance.TargetChara.getComponent("CharaCollision").CharaNumber]++,i.default.Instance.updateCharaNumber(),i.default.Instance.TargetChara.getComponent(cc.PhysicsCircleCollider).radius=i.default.Instance.TargetChara.height/2,i.default.Instance.TargetChara.getComponent(cc.PhysicsCircleCollider).apply(),i.default.Instance.TargetChara.getComponent(cc.RigidBody).type=cc.RigidBodyType.Dynamic,i.default.Instance.TargetChara.getComponent(cc.RigidBody).linearVelocity=cc.v2(0,-800),i.default.Instance.TargetChara=null,this.scheduleOnce(function(){i.default.Instance.randomOneChara()},.5))},o([s],e)}(cc.Component));r.default=h,cc._RF.pop()},{"./GameManager":"GameManager"}],LZW:[function(t,e,r){"use strict";cc._RF.push(e,"5cab8dReeBFuaCLXz0Dd68F","LZW"),Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function t(){}return t.decode=function(t,e){var r=1<<e,n=r+1,a=e+1,o=[],i=0;function c(){var t;for(o=[],a=e+1,t=0;t<r;t++)o[t]=[t];o[r]=[],o[n]=null}function s(e){var r,n=0;for(r=0;r<e;r++)t[i>>3]&1<<(7&i)&&(n|=1<<r),i++;return n}return function(){for(var t,e,i=[];;)if(e=t,(t=s(a))!=r){if(t==n)break;if(t<o.length)e!==r&&o.push(o[e].concat(o[t][0]));else{if(t!==o.length)throw new Error("LZW\u89e3\u6790\u51fa\u9519");o.push(o[e].concat(o[e][0]))}i.push.apply(i,o[t]),o.length===1<<a&&a<12&&a++}else c();return i}()},t}();r.default=n,cc._RF.pop()},{}],Stage:[function(t,e,r){"use strict";cc._RF.push(e,"a7591ishutAI7NwkBVOzxNY","Stage");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__decorate||function(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i};Object.defineProperty(r,"__esModule",{value:!0}),r.Stage=void 0;var i=cc._decorator,c=i.ccclass,s=i.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stage=null,e}return a(e,t),e.prototype.start=function(){this.getComponent(cc.Sprite).spriteFrame=new cc.SpriteFrame(stage,new cc.Rect(0,0,720,1280))},o([s(cc.Texture2D)],e.prototype,"stage",void 0),o([c],e)}(cc.Component);r.Stage=h,cc._RF.pop()},{}]},{},["CharaCollision","GameManager","InputController","Stage","CCGIF","CCGIFTest","GIF","LZW"]);