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=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]=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]=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;r0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]e+t.width)&&(s=!0),(nr+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.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<>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<>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=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;o0){for(var t=this.CharaNode.children[0].y,e=1;e=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<>3]&1<<(7&i)&&(n|=1<=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"]);