Commit 5f7dcabf authored by Friends233's avatar Friends233

fix刷新道具时机

parent 995852ef
......@@ -142,9 +142,9 @@ export default class GameScene extends cc.Component {
{
level: 1,
/** 目标数量 */
num: 10,
num: 4,
/** 倒计时 */
cds: 1,
cds: 50,
},
{
level: 1,
......@@ -216,6 +216,7 @@ export default class GameScene extends cc.Component {
this.isGameOver = false
this.isStartGame = false
this.speedMultiplier = 1
this.clipTarget = null
this.setClipState(CLIP_STATE.DEFAULT)
this.clip.y = -41
cc.find('clipMask/clipWrp', this.node).angle = 0
......@@ -257,12 +258,12 @@ export default class GameScene extends cc.Component {
}
this.clipTarget.getComponent('propMove').die(() => {
this.clipTarget = null
})
}
// 场面上没有剩余加分道具,刷新道具舞台
if (this.surplusStar == 0) {
this.refreshStageProps()
}
})
}
break;
case CLIP_STATE.PLAY:
case CLIP_STATE.STOP:
......
window.__require=function t(e,n,o){function i(a,c){if(!n[a]){if(!e[a]){var s=a.split("/");if(s=s[s.length-1],!e[s]){var p="function"==typeof __require&&__require;if(!c&&p)return p(s,!0);if(r)return r(s,!0);throw new Error("Cannot find module '"+a+"'")}a=s}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){return i(e[a][1][t]||t)},l,l.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof __require&&__require,a=0;a<o.length;a++)i(o[a]);return i}({BitText:[function(t,e,n){"use strict";cc._RF.push(e,"bd5deybNDBOc5i/9P2WUtAA","BitText");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var a=cc._decorator.menu,c=cc._decorator,s=c.ccclass,p=c.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._gap=0,e._text="",e.texture=null,e}return i(e,t),Object.defineProperty(e.prototype,"w",{get:function(){return this._w},set:function(t){this._w=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gap",{get:function(){return this._gap},set:function(t){this._gap=t,this.permutation()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){var e=this;this._text=t,this.node.destroyAllChildren(),this.node.removeAllChildren(),t.split("").forEach(function(t){var n=e.atlas.getChildByName(t);if(!n)return console.warn("\u6ca1\u914d\u7f6e "+t+" \u8fd9\u4e2a\u5b57\u7b26");var o=cc.instantiate(n);o.anchorX=0,e.node.addChild(o)}),this.permutation()},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this.atlas=cc.instantiate(this.texture)},e.prototype.start=function(){},e.prototype.permutation=function(){var t=this.gap,e=0;this.node.children.forEach(function(n){n.anchorX=0,n.x=e,e+=n.width+t}),this.w=e;var n=e/2;this.node.children.forEach(function(t){return t.x-=n})},r([p],e.prototype,"_gap",void 0),r([p],e.prototype,"gap",null),r([p],e.prototype,"_text",void 0),r([p],e.prototype,"text",null),r([p(cc.Prefab)],e.prototype,"texture",void 0),r([s,a("\u81ea\u5b9a\u4e49\u7ec4\u4ef6/\u4f4d\u56fe\u5b57")],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],ClipAni:[function(t,e,n){"use strict";cc._RF.push(e,"b257deNLElEQ7owjaUlEj0T","ClipAni");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var a=t("./Config/GameConfig"),c=cc._decorator,s=c.ccclass,p=(c.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.eventAniEnd=null,e.eventCollEnt=null,e}return i(e,t),e.prototype.start=function(){this.eventAniEnd=new cc.Event.EventCustom(a.CUSTOM_EVENT.CLIP_ANI_END,!0),this.eventCollEnt=new cc.Event.EventCustom(a.CUSTOM_EVENT.CLIP_COLLISION,!0)},e.prototype.onCollisionEnter=function(t){this.eventCollEnt.detail={other:t},cc.find("Canvas").dispatchEvent(this.eventCollEnt)},e.prototype.onAnimCompleted=function(t){this.eventAniEnd.detail={state:t},cc.find("Canvas").dispatchEvent(this.eventAniEnd)},r([s],e)}(cc.Component));n.default=p,cc._RF.pop()},{"./Config/GameConfig":"GameConfig"}],FitSprite:[function(t,e,n){"use strict";cc._RF.push(e,"55f2b6YY2VNsp2pvVM/3ZOl","FitSprite");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0}),n.FitSpriteType=void 0;var a,c=cc._decorator.ccclass,s=cc._decorator.property,p=cc._decorator.menu;(function(t){t[t.Horizontal=0]="Horizontal",t[t.Vertical=1]="Vertical"})(a=n.FitSpriteType||(n.FitSpriteType={}));var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._fitSpriteType=a.Vertical,e.maxWidth=0,e.maxHeight=0,e}return i(e,t),Object.defineProperty(e.prototype,"fitSpriteType",{get:function(){return this._fitSpriteType},set:function(t){this._fitSpriteType=t,this.updateSpriteSize()},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this.node.on(cc.Node.EventType.SIZE_CHANGED,this.updateSpriteSize,this)},e.prototype.setTexture=function(t){this.node.getComponent(cc.Sprite).spriteFrame=t,this.updateSpriteSize()},e.prototype.updateSpriteSize=function(){var t=this.node.getComponent(cc.Sprite).spriteFrame.getTexture();this.fitSpriteType===a.Horizontal?(this.node.height=t.height/t.width*this.maxWidth,this.node.width=this.maxWidth):(this.node.width=t.width/t.height*this.maxHeight,this.node.height=this.maxHeight)},r([s({type:cc.Enum(a),tooltip:"\u7c7b\u578b"})],e.prototype,"_fitSpriteType",void 0),r([s("\u6700\u5927\u5bbd\u5ea6")],e.prototype,"maxWidth",void 0),r([s("\u6700\u5927\u9ad8\u5ea6")],e.prototype,"maxHeight",void 0),r([s({type:cc.Enum(a),tooltip:"\u7c7b\u578b"})],e.prototype,"fitSpriteType",null),r([c,p("\u6e32\u67d3\u7ec4\u4ef6/FitSprite")],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],GameConfig:[function(t,e,n){"use strict";cc._RF.push(e,"2197dXlmixCibGa45Vyz3hP","GameConfig"),Object.defineProperty(n,"__esModule",{value:!0}),n.Config=n.GameColors=n.CUSTOM_EVENT=void 0,n.CUSTOM_EVENT={CLIP_ANI_END:"CLIP_ANI_END",CLIP_COLLISION:"CLIP_COLLISION",GAME_OVER:"GAME_OVER",NEXT_LEVEL:"NEXT_LEVEL",PASS_LEVEL:"PASS_LEVEL",GAME_START:"GAME_START",GAME_INIT:"GAME_INIT",GAME_DESTROY:"GAME_DESTROY"},n.GameColors=[["#EC5F33","#E52800","#CA1D00"],["#FF9400","#FF6C00","#EC5F33","#E52800","#CA1D00"],["#FFD34A","#FFC300","#FFB637","#FF9400","#FF6C00","#EC5F33","#E52800","#CA1D00"]],n.Config={maxLong:644,rotationSpeed:1,playSpeed:350,normalPropSpeed:250,bestPropSpeed:500,bestPropsNum:3,propsNum:2,countDowns:[30,30,30],LevelInfo:[{level:1,num:10,cds:30},{level:1,num:5,cds:30},{level:1,num:8,cds:30}],defaultColor:"#FF6C00",propsMap:[[1,0,0,1,1,1,1,0,1,1,1,1],[1,0,0,1,1,1,1,1,1,0,1,1]]},cc._RF.pop()},{}],GameScene:[function(t,e,n){"use strict";cc._RF.push(e,"5798dhpwtNHQq2OXS4At/jG","GameScene");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},a=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},c=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var o=Array(t),i=0;for(e=0;e<n;e++)for(var r=arguments[e],a=0,c=r.length;a<c;a++,i++)o[i]=r[a];return o};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./Components/Svga/Svga"),p=t("./Components/Svga/SvgaEvent"),l=t("./Config/GameConfig"),u=t("./exportEvent"),h=t("./utils"),f=cc._decorator,d=f.ccclass,v=f.property,y={DEFAULT:"clipAni",PLAY:"clipPlay",STOP:"clipStop",GAME_OVER:"gameOver"},g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.procItem=null,e.propItem=[],e.bsetPropItem=null,e.actLevel=0,e.levelObjectives=0,e.actLevelInfo=null,e.starNum=0,e.countDown=0,e.isGameOver=!1,e.isStartGame=!1,e.clip=null,e.clipState=y.STOP,e.clipSpeed=l.Config.normalPropSpeed,e.clipTarget=null,e.surplusStar=l.Config.bestPropsNum,e.gameConfig=r({},l.Config),e.speedMultiplier=1,e}return i(e,t),e.prototype.onLoad=function(){cc.director.getCollisionManager().enabled=!0},e.prototype.start=function(){this.clip=cc.find("clipMask/clipWrp/clip",this.node),this.addNodeEvent()},e.prototype.addNodeEvent=function(){var t,e=this;cc.find("gameBtn",this.node).on(cc.Node.EventType.TOUCH_END,this.playGame,this),this.node.on(l.CUSTOM_EVENT.CLIP_ANI_END,this.onAnimCompleted,this),this.node.on(l.CUSTOM_EVENT.CLIP_COLLISION,this.onCollEnter,this),u.default.on(l.CUSTOM_EVENT.NEXT_LEVEL,this.nextLevel,this),u.default.on(l.CUSTOM_EVENT.GAME_START,this.startGame,this),u.default.on(l.CUSTOM_EVENT.GAME_INIT,function(t){var n=t.detail,o=void 0===n?{}:n;e.resetConfig(o),e.refreshLevelInfo(),e.refreshStageProps()},this),u.default.on(l.CUSTOM_EVENT.GAME_DESTROY,function(){e.node.destroy()},this);var n=null===(t=null===window||void 0===window?void 0:window.location)||void 0===t?void 0:t.href,o=h.getUrlParam("testPanel"),i=cc.find("test",this.node);if(i.active=o,o&&((null==n?void 0:n.includes("duibadev"))||(null==n?void 0:n.includes("duibatest")))||n.includes("localhost")){var r={next:"nextLevel",refreshProp:"refreshStageProps",start:"testStartGame",init:"testInit",addSpeed:"addSpeeds"};i.children.forEach(function(t){var n=null==e?void 0:e[r[t.name]];t.on(cc.Node.EventType.TOUCH_END,n,e)})}},e.prototype.testStartGame=function(){console.log("\u6d4b\u8bd5"),u.default.fire(l.CUSTOM_EVENT.GAME_START)},e.prototype.testInit=function(){console.log("\u6d4b\u8bd5\u521d\u59cb\u5316"),u.default.fire(l.CUSTOM_EVENT.GAME_INIT,{LevelInfo:[{level:1,num:10,cds:1},{level:1,num:5,cds:30},{level:1,num:8,cds:30}]})},e.prototype.addSpeeds=function(){this.speedMultiplier+=1,cc.find("clipMask/clipWrp",this.node).getComponent(cc.Animation).getAnimationState("clipRation").speed+=1},e.prototype.startGame=function(t){var e=this;t.detail,this.startGameCountAni(function(){e.isStartGame=!0,cc.find("clipMask/clipWrp",e.node).getComponent(cc.Animation).play(),e.schedule(e.startCd,1)})},e.prototype.startGameCountAni=function(t){var e=cc.find("countDown/cd",this.node),n=cc.find("countDown/cdBg",this.node);e.parent.active=!0,n.opacity=150,e.on(p.SvgaEvent.END_FRAME,function(){null==t||t(),e.parent.active=!1}),e.getComponent(s.default).play(0)},e.prototype.resetConfig=function(t){void 0===t&&(t={}),this.gameConfig=r(r({},l.Config),t),this.clipSpeed=this.gameConfig.normalPropSpeed,this.surplusStar=this.gameConfig.bestPropsNum,this.clip.getChildByName("line").height=this.gameConfig.maxLong,cc.find("clipMask/clipWrp",this.node).getComponent(cc.Animation).getAnimationState("clipRation").speed=this.gameConfig.rotationSpeed,this.isGameOver=!1,this.isStartGame=!1,this.speedMultiplier=1,this.setClipState(y.DEFAULT),this.clip.y=-41,cc.find("clipMask/clipWrp",this.node).angle=0},e.prototype.onCollEnter=function(t){var e=t.detail.other;this.clipTarget=e.node,this.clipSpeed=1==e.tag?this.gameConfig.bestPropSpeed:this.gameConfig.normalPropSpeed,this.setClipState(y.STOP)},e.prototype.setClipState=function(t,e){var n=this,o=cc.find("clipMask/clipWrp",this.node).getComponent(cc.Animation),i=cc.find("clipMask/clipWrp/clip",this.node).getComponent(cc.Animation),r=cc.find("clipMask/clipWrp/default",this.node);switch(this.clipState=t,t){case y.DEFAULT:o.resume(),r.active=!0,this.clip.active=!1,this.clipTarget&&(1==this.clipTarget.getComponent(cc.Collider).tag&&this.setStarProc(),this.clipTarget.getComponent("propMove").die(function(){n.clipTarget=null})),0==this.surplusStar&&this.refreshStageProps();break;case y.PLAY:case y.STOP:o.pause(),this.clip.active=!0,r.active=!1,i.play(t);break;case y.GAME_OVER:o.stop(),i.stop()}null==e||e()},e.prototype.playGame=function(){!this.isGameOver&&this.isStartGame&&this.setClipState(y.PLAY)},e.prototype.gameOver=function(){this.isGameOver=!0,this.setClipState(y.GAME_OVER),this.unschedule(this.startCd),u.default.fire(l.CUSTOM_EVENT.GAME_OVER,r(r({},this.gameConfig.LevelInfo[this.actLevel]),{score:this.starNum,level:this.actLevel}))},e.prototype.setLable=function(t,e){cc.find(t,this.node).getComponent(cc.Label).string=e+""},e.prototype.startCd=function(){var t=this.countDown-1||0;if(!t||t<=0)return this.setLable("cdIcon/cd","0s"),this.gameOver(),void this.unschedule(this.startCd);this.countDown=t,this.setLable("cdIcon/cd",this.countDown+"s")},e.prototype.onDestroy=function(){this.unschedule(this.startCd)},e.prototype.refreshLevelInfo=function(t){void 0===t&&(t=0),this.isGameOver=!1,this.actLevel=t,this.starNum=0,this.actLevelInfo=this.gameConfig.LevelInfo[t],this.levelObjectives=this.actLevelInfo.num,this.countDown=this.actLevelInfo.cds||0,this.setLable("levelName","\u7b2c"+h.numToChinese(t+1)+"\u5173"),this.setLable("starIcon/starProc",this.starNum+"/"+this.levelObjectives),this.updateGameProc(),this.unschedule(this.startCd),this.setLable("cdIcon/cd",this.countDown+"s")},e.prototype.setStarProc=function(){var t=cc.find("procBg/proc",this.node),e=this.starNum;if(this.surplusStar--,!(e>=this.levelObjectives)){var n=cc.instantiate(this.procItem),o=(null===l.GameColors||void 0===l.GameColors?void 0:l.GameColors[this.actLevel])||[];n.color=cc.color(o[e]||this.gameConfig.defaultColor),n.setParent(t),this.starNum++,this.setLable("starIcon/starProc",this.starNum+"/"+this.levelObjectives),this.starNum>=this.levelObjectives&&(this.unschedule(this.startCd),u.default.fire(l.CUSTOM_EVENT.PASS_LEVEL,r(r({},this.gameConfig.LevelInfo[this.actLevel]),{score:this.starNum,level:this.actLevel})))}},e.prototype.nextLevel=function(){var t=this.actLevel+1;this.unschedule(this.startCd),t>=this.gameConfig.LevelInfo.length?this.gameOver():(this.refreshLevelInfo(t),this.refreshStageProps(),this.schedule(this.startCd,1))},e.prototype.updateGameProc=function(){var t=this.node.getChildByName("procBg"),e=t.getChildByName("proc"),n=this.levelObjectives;e.removeAllChildren(),t.width=39*n+12+1*(n-1),e.width=39*n+1*(n-1),t.x=-t.width/2},e.prototype.refreshStageProps=function(){this.surplusStar=this.gameConfig.bestPropsNum;for(var t=cc.find("gameStage",this.node),e=t.children,n=Math.floor(h.randomNum(0,this.gameConfig.propsMap.length)),o=c(this.gameConfig.propsMap[n]),i=0;i<this.gameConfig.bestPropsNum;i++){for(var r=Math.floor(h.randomNum(0,o.length));1!==o[r%o.length];)r++;o[r%o.length]=2}var a=[];for(i=0;i<this.gameConfig.propsNum;i++)a.push.apply(a,this.propItem);var s=o.filter(function(t){return 1==t}).length;for(a=h.getRandomArrayElements(a,s),i=0;i<e.length;i++){var p=e[i],l=o[i],u=h.randomNum(0,90).toFixed(2),f=null;if(p.removeAllChildren(),1==l){var d=cc.instantiate(a.pop());f=cc.instantiate(d)}else{if(2!=l)continue;f=cc.instantiate(this.bsetPropItem)}f&&(f.angle=u>45?u-90:u,f.setParent(p))}t.getComponent(cc.Layout).horizontalDirection=h.getProbability(50)?cc.Layout.HorizontalDirection.LEFT_TO_RIGHT:cc.Layout.HorizontalDirection.RIGHT_TO_LEFT},e.prototype.update=function(t){var e;if(!this.isGameOver&&this.isStartGame){var n=this.gameConfig.maxLong-41;if(this.clipState==y.PLAY){if(this.clip.y<=-n)return void this.setClipState(y.STOP);this.clip.y-=t*this.gameConfig.playSpeed*this.speedMultiplier}if(this.clipState==y.STOP){if(this.clip.y>=-41)return this.clipSpeed=this.gameConfig.normalPropSpeed,void this.setClipState(y.DEFAULT);if(this.clip.y+=t*this.clipSpeed*this.speedMultiplier,this.clipTarget&&(null===(e=this.clipTarget)||void 0===e?void 0:e.parent)){var o=this.clip.convertToWorldSpaceAR(cc.v2(0,-133)),i=this.clipTarget.parent.convertToWorldSpaceAR(cc.v2(0,0));this.clipTarget.setPosition(o.x-i.x,o.y-i.y)}}}},a([v({type:cc.Prefab,displayName:"\u5355\u683c\u8fdb\u5ea6\u6761"})],e.prototype,"procItem",void 0),a([v({type:[cc.Prefab],displayName:"\u821e\u53f0\u9053\u5177"})],e.prototype,"propItem",void 0),a([v({type:cc.Prefab,displayName:"\u52a0\u5206\u9053\u5177"})],e.prototype,"bsetPropItem",void 0),a([d],e)}(cc.Component);n.default=g,cc._RF.pop()},{"./Components/Svga/Svga":"Svga","./Components/Svga/SvgaEvent":"SvgaEvent","./Config/GameConfig":"GameConfig","./exportEvent":"exportEvent","./utils":"utils"}],ImgFixedSize:[function(t,e,n){"use strict";cc._RF.push(e,"3ea067CJuhGxJmUsuZZ1Xje","ImgFixedSize");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=a.property,p=a.menu,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._fixedSize=1,e}return i(e,t),Object.defineProperty(e.prototype,"fixedSize",{get:function(){return this._fixedSize},set:function(t){this._fixedSize=t,this.onSizeChanged()},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this._fixedSize=this.fixedSize,this.node.on(cc.Node.EventType.SIZE_CHANGED,this.onSizeChanged,this),this.onSizeChanged()},e.prototype.onSizeChanged=function(){var t=this.node.width,e=this.node.height,n=Math.max(t,e);this.node.scale=this.fixedSize/n},r([s({type:cc.Integer,tooltip:"\u56fa\u5b9a\u5c3a\u5bf8"})],e.prototype,"fixedSize",null),r([s({type:cc.Integer,tooltip:"\u56fa\u5b9a\u5c3a\u5bf8"})],e.prototype,"_fixedSize",void 0),r([c,p("framework/ImgFixedSize")],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],Matrix:[function(t,e,n){"use strict";cc._RF.push(e,"ac135di5uZFfaPtJI9vcajQ","Matrix"),Object.defineProperty(n,"__esModule",{value:!0}),n.Matrix=void 0;var o=Math.PI,i=o>>1,r=o+i,a=o/180,c=180/o;function s(t){switch(t){case i:case-r:return 0;case o:case-o:return-1;case r:case-i:return 0;default:return Math.cos(t)}}function p(t){switch(t){case i:case-r:return 1;case o:case-o:return 0;case r:case-i:return-1;default:return Math.sin(t)}}var l=function(){function t(t,e,n,o,i,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=1),void 0===i&&(i=0),void 0===r&&(r=0),this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this.array=null,this.prepend=function(t){var e=this,n=t.a,o=t.b,i=t.c,r=t.d,a=t.tx,c=t.ty,s=e.a,p=e.c,l=e.tx;return e.a=n*s+i*e.b,e.b=o*s+r*e.b,e.c=n*p+i*e.d,e.d=o*p+r*e.d,e.tx=n*l+i*e.ty+a,e.ty=o*l+r*e.ty+c,this};var a=this;a.a=t,a.b=e,a.c=n,a.d=o,a.tx=i,a.ty=r}return t.prototype.clone=function(){var e=this;return new t(e.a,e.b,e.c,e.d,e.tx,e.ty)},t.prototype.copy=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},t.prototype.transformVec2=function(t,e,n){void 0===n&&(n=null);var o=this;return n||(n=new cc.Vec2),n.x=t*o.a+e*o.c+o.tx,n.y=t*o.b+e*o.d+o.ty,n},t.prototype.transformVec2Inverse=function(t,e,n){void 0===n&&(n=null),n||(n=new cc.Vec2);var o=1/(this.a*this.d+this.c*-this.b);return n.x=this.d*o*t+-this.c*o*e+(this.ty*this.c-this.tx*this.d)*o,n.y=this.a*o*e+-this.b*o*t+(-this.ty*this.a+this.tx*this.b)*o,n},t.prototype.setFrom=function(t){var e=this;e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.tx=t.tx,e.ty=t.ty},t.prototype.identity=function(){var t=this;t.a=t.d=1,t.b=t.c=t.tx=t.ty=0},t.prototype.invert=function(){var t=this,e=t.a,n=t.b,o=t.c,i=t.d,r=t.tx,a=t.ty;if(0==n&&0==o)return 0==e||0==i?t.a=t.d=t.tx=t.ty=0:(e=t.a=1/e,i=t.d=1/i,t.tx=-e*r,t.ty=-i*a),t;var c=e*i-n*o;if(0==c)return t.identity(),t;c=1/c;var s=t.a=i*c;return n=t.b=-n*c,o=t.c=-o*c,i=t.d=e*c,t.tx=-(s*r+o*a),t.ty=-(n*r+i*a),t},t.prototype.createBox=function(t,e,n,o,i,r,c,l,u){var h=this;if(0!=i?r=c=i%360:(r%=360,c%=360),0==r&&0==c)h.a=n,h.b=h.c=0,h.d=o;else{c*=a;var f=s(r*=a),d=p(r);r==c?(h.a=f*n,h.b=d*n):(h.a=s(c)*n,h.b=p(c)*n),h.c=-d*o,h.d=f*o}h.tx=t+l-(l*h.a+u*h.c),h.ty=e+u-(l*h.b+u*h.d)},t.prototype.append=function(t){var e=this.a,n=this.b,o=this.c,i=this.d;this.a=t.a*e+t.b*o,this.b=t.a*n+t.b*i,this.c=t.c*e+t.d*o,this.d=t.c*n+t.d*i,this.tx=t.tx*e+t.ty*o+this.tx,this.ty=t.tx*n+t.ty*i+this.ty},t.isEqual=function(t,e){return t.tx==e.tx&&t.ty==e.ty&&t.a==e.a&&t.b==e.b&&t.c==e.c&&t.d==e.d},t.prototype.concat=function(t){var e=this,n=e.a,o=e.b,i=e.c,r=e.d,a=e.tx,c=e.ty,s=t.a,p=t.b,l=t.c,u=t.d,h=t.tx,f=t.ty;e.a=n*s+o*l,e.b=n*p+o*u,e.c=i*s+r*l,e.d=i*p+r*u,e.tx=a*s+c*l+h,e.ty=a*p+c*u+f},t.prototype.rotate=function(t){var e=this,n=Math.sin(t),o=Math.cos(t),i=e.a,r=e.b,a=e.c,c=e.d,s=e.tx,p=e.ty;e.a=i*o-r*n,e.b=i*n+r*o,e.c=a*o-c*n,e.d=a*n+c*o,e.tx=s*o-p*n,e.ty=s*n+p*o},t.prototype.scale=function(t,e){var n=this;n.a*=t,n.d*=e,n.c*=t,n.b*=e,n.tx*=t,n.ty*=e},t.prototype.translate=function(t,e){this.tx+=t,this.ty+=e},t.prototype.set=function(t,e,n,o,i,r){return this.a=t,this.b=e,this.c=n,this.d=o,this.tx=i,this.ty=r,this},t.prototype.getRotation=function(){return Math.round(Math.atan2(this.b,this.a)*c)},t.prototype.toArray=function(t,e){void 0===t&&(t=!1),this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},t.prototype.decompose=function(){var t={rotation:0,skew:cc.v2(),scale:cc.v2(),position:cc.v2()},e=this.a,n=this.b,o=this.c,i=this.d,r=-Math.atan2(-o,i),a=Math.atan2(n,e),c=Math.abs(r+a);return c<1e-5||Math.abs(2*Math.PI-c)<1e-5?(t.rotation=a,e<0&&i>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=r,t.skew.y=a),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(o*o+i*i),t.position.x=this.tx,t.position.y=this.ty,t},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){},t}();n.Matrix=l,cc._RF.pop()},{}],SvgaEvent:[function(t,e,n){"use strict";cc._RF.push(e,"07040GmslJHs7J1pUxL6Kr7","SvgaEvent"),Object.defineProperty(n,"__esModule",{value:!0}),n.SvgaEvent=void 0,(n.SvgaEvent||(n.SvgaEvent={})).END_FRAME="end_frame",cc._RF.pop()},{}],SvgaTrack:[function(t,e,n){"use strict";cc._RF.push(e,"5eefe9b92lAU4GY+nBw9mG4","SvgaTrack"),Object.defineProperty(n,"__esModule",{value:!0}),n.SvgaTrack=void 0;var o=function(){function t(t,e){this.node=t,this.frames=e}return t.prototype.setValue=function(t){var e=this.node,n=this.frames,o=n[t=Math.round(cc.misc.clampf(t,0,n.length-1))],i=o.alpha,r=o.transform;if(o.maskPath,i<.05)e.opacity=0;else{e.opacity=255*i;var a=r.a,c=r.b,s=r.c,p=r.d,l=r.tx,u=r.ty,h=e._matrix,f=e._trs,d=h.m;d[0]=a,d[1]=c,d[4]=-s,d[5]=-p,d[6]=-d[6],d[7]=-d[7],f[0]=l,f[1]=u,e._renderFlag|=cc.RenderFlow.FLAG_WORLD_TRANSFORM}},t.prototype.resetValue=function(){this.node._renderFlag&=~cc.RenderFlow.FLAG_LOCAL_TRANSFORM,this.setValue(0)},t.prototype.destroy=function(){this.node=null},t}();n.SvgaTrack=o,cc._RF.pop()},{}],Svga:[function(t,e,n){"use strict";cc._RF.push(e,"7c5ffhlHDpBpoDQ8wfKN7pu","Svga");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function a(t){try{s(o.next(t))}catch(e){r(e)}}function c(t){try{s(o.throw(t))}catch(e){r(e)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}s((o=o.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(t){return function(e){return s([t,e])}}function s(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./SvgaTrack"),p=cc._decorator.executeInEditMode,l=cc._decorator.playOnFocus,u=t("./SvgaEvent"),h=t("./loadSvga"),f=cc._decorator.menu,d=cc._decorator.disallowMultiple,v=cc._decorator,y=v.ccclass,g=v.property,_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.edit_update=!1,e.aniNode=null,e._svga=null,e.tracks=[],e.isPlaying=!1,e.vmData=null,e.autoPlay=!0,e._loop=!1,e._totalFrames=0,e._frameTime=0,e._fps=0,e._curTime=0,e._curFrame=0,e}return i(e,t),e.prototype.onFocusInEditor=function(){this.edit_update=!0,this.play(0)},e.prototype.onLostFocusInEditor=function(){this.edit_update=!1},e.prototype.resetInEditor=function(){return a(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return[4,this._load()];case 1:return t.sent(),this.edit_update=!0,this.play(0),[2]}})})},e.prototype.onEnable=function(){this.play(0)},Object.defineProperty(e.prototype,"svga",{get:function(){return this._svga},set:function(t){var e=this;t!==this._svga&&(this._svga=t,this._load().then(function(){e.play(0)}))},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){return a(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return this.aniNode=this.node.getChildByName("aniNode"),this.aniNode||(this.aniNode=new cc.Node("aniNode"),this.aniNode.scaleY=-1,this.node.addChild(this.aniNode)),[4,this._load()];case 1:return t.sent(),this.autoPlay&&this.play(0),[2]}})})},e.prototype.start=function(){},e.prototype.play=function(t){void 0===t&&(t=0),this.curFrame=t,this.isPlaying=!0},e.prototype.stop=function(t){void 0===t&&(t=!1),t&&(this.curFrame=0),this.isPlaying=!1},Object.defineProperty(e.prototype,"loop",{get:function(){return this._loop},set:function(t){this._loop=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalTime",{get:function(){return this._totalFrames*(1/this.fps)||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalFrames",{get:function(){return this._totalFrames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fps",{get:function(){var t;return this._fps||(null===(t=this.vmData)||void 0===t?void 0:t.FPS)||0},set:function(t){this._fps=t,this._frameTime=1/t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"curTime",{get:function(){return this._curTime},set:function(t){this._curTime=t,this._curFrame=t*this.fps},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"curFrame",{get:function(){return this._curFrame},set:function(t){this._curFrame=t,this._curTime=t/this.fps},enumerable:!1,configurable:!0}),e.prototype.update=function(t){var e=this;this.isPlaying&&(this.curTime+=t,this._curFrame>this.totalFrames&&(this.node.emit(u.SvgaEvent.END_FRAME),this.loop?this.curTime=(this._curFrame-this.totalFrames)*this._frameTime:this.stop(!0)),this.tracks.forEach(function(t){t.setValue(e._curFrame)}))},e.prototype.onDestroy=function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].destroy();this.tracks=[]},e.prototype._load=function(){return a(this,void 0,void 0,function(){var t=this;return c(this,function(){return this.svga?(this.aniNode.removeAllChildren(!0),[2,new Promise(function(e){return a(t,void 0,void 0,function(){var t,n,o,i,r,p,l,u,f,d,v,y,g,_,m,b,S=this;return c(this,function(C){switch(C.label){case 0:return[4,h.loadSvga(this.svga)];case 1:for(d in(t=C.sent()).textures={},this.vmData=t,n=t.FPS,o=t.videoSize,i=t.images,r=t.sprites,p=t.textures,l=t.frames,this.fps||(this.fps=n),this._totalFrames=l,this.node.setContentSize(o.width,o.height),this.aniNode.setPosition(-o.width/2,o.height/2),u=[],f=function(t){var e=i[t];0!==e.indexOf("iVBO")&&0!==e.indexOf("/9j/2w")||(e="data:image/png;base64,"+e),u.push(new Promise(function(n){return a(S,void 0,void 0,function(){var o,i;return c(this,function(r){switch(r.label){case 0:return[4,h.createImage(e)];case 1:return o=r.sent(),(i=new cc.Texture2D).initWithElement(o),p[t]=new cc.SpriteFrame(i),n(),[2]}})})}))},i)f(d);return[4,Promise.all(u)];case 2:for(C.sent(),v=0;v<r.length;v++){if(y=r[v],g=y.imageKey,_=y.frames,!g)return[2];(m=new cc.Node(g)).setAnchorPoint(0,1),this.aniNode.addChild(m),m.addComponent(cc.Sprite).spriteFrame=p[g],(b=new s.SvgaTrack(m,_)).resetValue(),this.tracks.push(b)}return e(),[2]}})})})]):[2]})})},r([g(cc.Asset)],e.prototype,"_svga",void 0),r([g(cc.Asset)],e.prototype,"svga",null),r([g({tooltip:"\u662f\u5426\u81ea\u52a8\u64ad\u653e"})],e.prototype,"autoPlay",void 0),r([g],e.prototype,"_loop",void 0),r([g({tooltip:"\u662f\u5426\u5faa\u73af"})],e.prototype,"loop",null),r([g],e.prototype,"_fps",void 0),r([g],e.prototype,"fps",null),r([y,p,d,l,f("\u81ea\u5b9a\u4e49\u7ec4\u4ef6/Svga")],e)}(cc.Component);n.default=_,cc._RF.pop()},{"./SvgaEvent":"SvgaEvent","./SvgaTrack":"SvgaTrack","./loadSvga":"loadSvga"}],exportEvent:[function(t,e,n){"use strict";cc._RF.push(e,"d252b/Dmr1HLLC3k85LvdL5","exportEvent"),Object.defineProperty(n,"__esModule",{value:!0}),n.EventCenterClass=void 0;var o=function(t,e,n){this.type=t,this.target=e,this.detail=n,this.timeStamp=+new Date},i=function(){function t(){this._listeners={}}return t.prototype.on=function(t,e,n,o){for(var i,r=(i=this._listeners=this._listeners||{})[t]=i[t]||[],a=0,c=r.length;a<c;a++)if(r[a].listener===e)return;return r.push({listener:e,context:n,once:o}),this},t.prototype.off=function(t,e){var n;if(n=this._listeners=this._listeners||{},0==arguments.length)return n=null,this;var o=n&&n[t];if(o){if(1==arguments.length)return delete n[t],this;for(var i=0,r=o.length;i<r;i++){var a=o[i];if(a.listener===e){o.splice(i,1),0===o.length&&delete n[t];break}}}return this},t.prototype.fire=function(t,e){var n,i;"string"==typeof t?i=t:(n=t,i=t.type);var r=this._listeners;if(!r)return!1;var a=r[i];if(a){var c=a.slice(0);n=n||new o(i,this,e);for(var s=0;s<c.length;s++){var p=c[s];if(p.listener.call(p.context,n),p.once){var l=a.indexOf(p);l>-1&&a.splice(l,1)}}return 0==a.length&&delete r[i],!0}return!1},t}();n.EventCenterClass=i;var r=new i;cc.EventBus=r,n.default=r,cc._RF.pop()},{}],interface:[function(t,e,n){"use strict";cc._RF.push(e,"dbeb7x/ykZC14tBqxOW9gtp","interface"),Object.defineProperty(n,"__esModule",{value:!0}),cc._RF.pop()},{}],loadSvga:[function(t,e,n){"use strict";cc._RF.push(e,"d0e08EVP/pFhJXdUpznXvD+","loadSvga"),Object.defineProperty(n,"__esModule",{value:!0}),n.createImage=n.ImgCache=n.loadSvga=n.SvgaCache=void 0,n.SvgaCache={},cc.assetManager.downloader.register(".svga",function(t,e,n){cc.assetManager.downloader.downloadFile(t,{responseType:"arraybuffer"},n)}),n.loadSvga=function(t){return new Promise(function(e){var o="";t instanceof cc.Asset?(o=t._uuid,t=t._nativeAsset):o=t,n.SvgaCache[o]?e(n.SvgaCache[o]):SvgaParser.loadSvga(t,function(t){n.SvgaCache[o]=t,e(t)})})},n.ImgCache={},n.createImage=function(t){return new Promise(function(e){if(n.ImgCache[t])e(n.ImgCache[t]);else{var o=new Image;o.onload=function(){n.ImgCache[t]=o,e(o)},o.src=t}})},cc._RF.pop()},{}],propMove:[function(t,e,n){"use strict";cc._RF.push(e,"a4cebApRXhOpYXmhf5gIeC3","propMove");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function a(t){try{s(o.next(t))}catch(e){r(e)}}function c(t){try{s(o.throw(t))}catch(e){r(e)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}s((o=o.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(t){return function(e){return s([t,e])}}function s(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,p=s.ccclass,l=(s.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.die=function(t){return a(this,void 0,void 0,function(){var e,n=this;return c(this,function(o){switch(o.label){case 0:return(e=this.node.getComponent(cc.Animation))?(e.play(),e.on("finished",function(){return a(n,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:return[4,null==t?void 0:t()];case 1:return e.sent(),this.node.destroy(),[2]}})})},this),[3,3]):[3,1];case 1:return[4,null==t?void 0:t()];case 2:o.sent(),this.node.destroy(),o.label=3;case 3:return[2]}})})},r([p],e)}(cc.Component));n.default=l,cc._RF.pop()},{}],utils:[function(t,e,n){"use strict";cc._RF.push(e,"6aca3erpIVPLpMW4bJwDRR6","utils");var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function a(t){try{s(o.next(t))}catch(e){r(e)}}function c(t){try{s(o.throw(t))}catch(e){r(e)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}s((o=o.apply(t,e||[])).next())})},i=this&&this.__generator||function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(t){return function(e){return s([t,e])}}function s(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}},r=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var o=Array(t),i=0;for(e=0;e<n;e++)for(var r=arguments[e],a=0,c=r.length;a<c;a++,i++)o[i]=r[a];return o};function a(t,e){return Math.floor(Math.random()*(e-t))+t}Object.defineProperty(n,"__esModule",{value:!0}),n.getUrlParam=n.getProbability=n.getRandomArrayElements=n.randomNum=n.loadGameResources=n.numToChinese=n.set16ToRgb=void 0,n.set16ToRgb=function(t){if(t&&/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(t)){var e=t.toLowerCase().replace(/\#/g,""),n=e.length;if(3==n){for(var o="",i=0;i<n;i++)o+=e.slice(i,i+1).concat(e.slice(i,i+1));e=o}var r=[];for(i=0;i<6;i+=2){var a=e.slice(i,i+2);r.push(parseInt("0x"+a))}return r}},n.numToChinese=function(t){return["\u96f6","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341"][t]},n.loadGameResources=function(){return o(void 0,void 0,void 0,function(){return i(this,function(){return[2,new Promise(function(t){cc.resources.preloadDir("images",cc.SpriteFrame,function(e,n){console.log("111",n),t(n,e)})})]})})},n.randomNum=a,n.getRandomArrayElements=function(t,e){if(t.length<=e)return t;for(var n,o,i=t.slice(0),r=t.length,a=r-e;r-- >a;)n=i[o=(r+1)*Math.random()>>0],i[o]=i[r],i[r]=n;return i.slice(a)},n.getProbability=function(t){return r(Array(100-t).fill(!1),Array(t).fill(!0))[Math.floor(a(0,99))]},n.getUrlParam=function(t){var e=window.location.search,n=e.slice(1).match(new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"));return e.length?n&&n[2]:null},cc._RF.pop()},{}]},{},["ClipAni","BitText","FitSprite","Matrix","Svga","SvgaEvent","SvgaTrack","interface","loadSvga","GameConfig","GameScene","ImgFixedSize","exportEvent","propMove","utils"]);
\ No newline at end of file
window.__require=function t(e,n,o){function i(a,c){if(!n[a]){if(!e[a]){var s=a.split("/");if(s=s[s.length-1],!e[s]){var p="function"==typeof __require&&__require;if(!c&&p)return p(s,!0);if(r)return r(s,!0);throw new Error("Cannot find module '"+a+"'")}a=s}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){return i(e[a][1][t]||t)},l,l.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof __require&&__require,a=0;a<o.length;a++)i(o[a]);return i}({BitText:[function(t,e,n){"use strict";cc._RF.push(e,"bd5deybNDBOc5i/9P2WUtAA","BitText");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var a=cc._decorator.menu,c=cc._decorator,s=c.ccclass,p=c.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._gap=0,e._text="",e.texture=null,e}return i(e,t),Object.defineProperty(e.prototype,"w",{get:function(){return this._w},set:function(t){this._w=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gap",{get:function(){return this._gap},set:function(t){this._gap=t,this.permutation()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){var e=this;this._text=t,this.node.destroyAllChildren(),this.node.removeAllChildren(),t.split("").forEach(function(t){var n=e.atlas.getChildByName(t);if(!n)return console.warn("\u6ca1\u914d\u7f6e "+t+" \u8fd9\u4e2a\u5b57\u7b26");var o=cc.instantiate(n);o.anchorX=0,e.node.addChild(o)}),this.permutation()},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this.atlas=cc.instantiate(this.texture)},e.prototype.start=function(){},e.prototype.permutation=function(){var t=this.gap,e=0;this.node.children.forEach(function(n){n.anchorX=0,n.x=e,e+=n.width+t}),this.w=e;var n=e/2;this.node.children.forEach(function(t){return t.x-=n})},r([p],e.prototype,"_gap",void 0),r([p],e.prototype,"gap",null),r([p],e.prototype,"_text",void 0),r([p],e.prototype,"text",null),r([p(cc.Prefab)],e.prototype,"texture",void 0),r([s,a("\u81ea\u5b9a\u4e49\u7ec4\u4ef6/\u4f4d\u56fe\u5b57")],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],ClipAni:[function(t,e,n){"use strict";cc._RF.push(e,"b257deNLElEQ7owjaUlEj0T","ClipAni");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var a=t("./Config/GameConfig"),c=cc._decorator,s=c.ccclass,p=(c.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.eventAniEnd=null,e.eventCollEnt=null,e}return i(e,t),e.prototype.start=function(){this.eventAniEnd=new cc.Event.EventCustom(a.CUSTOM_EVENT.CLIP_ANI_END,!0),this.eventCollEnt=new cc.Event.EventCustom(a.CUSTOM_EVENT.CLIP_COLLISION,!0)},e.prototype.onCollisionEnter=function(t){this.eventCollEnt.detail={other:t},cc.find("Canvas").dispatchEvent(this.eventCollEnt)},e.prototype.onAnimCompleted=function(t){this.eventAniEnd.detail={state:t},cc.find("Canvas").dispatchEvent(this.eventAniEnd)},r([s],e)}(cc.Component));n.default=p,cc._RF.pop()},{"./Config/GameConfig":"GameConfig"}],FitSprite:[function(t,e,n){"use strict";cc._RF.push(e,"55f2b6YY2VNsp2pvVM/3ZOl","FitSprite");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0}),n.FitSpriteType=void 0;var a,c=cc._decorator.ccclass,s=cc._decorator.property,p=cc._decorator.menu;(function(t){t[t.Horizontal=0]="Horizontal",t[t.Vertical=1]="Vertical"})(a=n.FitSpriteType||(n.FitSpriteType={}));var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._fitSpriteType=a.Vertical,e.maxWidth=0,e.maxHeight=0,e}return i(e,t),Object.defineProperty(e.prototype,"fitSpriteType",{get:function(){return this._fitSpriteType},set:function(t){this._fitSpriteType=t,this.updateSpriteSize()},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this.node.on(cc.Node.EventType.SIZE_CHANGED,this.updateSpriteSize,this)},e.prototype.setTexture=function(t){this.node.getComponent(cc.Sprite).spriteFrame=t,this.updateSpriteSize()},e.prototype.updateSpriteSize=function(){var t=this.node.getComponent(cc.Sprite).spriteFrame.getTexture();this.fitSpriteType===a.Horizontal?(this.node.height=t.height/t.width*this.maxWidth,this.node.width=this.maxWidth):(this.node.width=t.width/t.height*this.maxHeight,this.node.height=this.maxHeight)},r([s({type:cc.Enum(a),tooltip:"\u7c7b\u578b"})],e.prototype,"_fitSpriteType",void 0),r([s("\u6700\u5927\u5bbd\u5ea6")],e.prototype,"maxWidth",void 0),r([s("\u6700\u5927\u9ad8\u5ea6")],e.prototype,"maxHeight",void 0),r([s({type:cc.Enum(a),tooltip:"\u7c7b\u578b"})],e.prototype,"fitSpriteType",null),r([c,p("\u6e32\u67d3\u7ec4\u4ef6/FitSprite")],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],GameConfig:[function(t,e,n){"use strict";cc._RF.push(e,"2197dXlmixCibGa45Vyz3hP","GameConfig"),Object.defineProperty(n,"__esModule",{value:!0}),n.Config=n.GameColors=n.CUSTOM_EVENT=void 0,n.CUSTOM_EVENT={CLIP_ANI_END:"CLIP_ANI_END",CLIP_COLLISION:"CLIP_COLLISION",GAME_OVER:"GAME_OVER",NEXT_LEVEL:"NEXT_LEVEL",PASS_LEVEL:"PASS_LEVEL",GAME_START:"GAME_START",GAME_INIT:"GAME_INIT",GAME_DESTROY:"GAME_DESTROY"},n.GameColors=[["#EC5F33","#E52800","#CA1D00"],["#FF9400","#FF6C00","#EC5F33","#E52800","#CA1D00"],["#FFD34A","#FFC300","#FFB637","#FF9400","#FF6C00","#EC5F33","#E52800","#CA1D00"]],n.Config={maxLong:644,rotationSpeed:1,playSpeed:350,normalPropSpeed:250,bestPropSpeed:500,bestPropsNum:3,propsNum:2,countDowns:[30,30,30],LevelInfo:[{level:1,num:10,cds:30},{level:1,num:5,cds:30},{level:1,num:8,cds:30}],defaultColor:"#FF6C00",propsMap:[[1,0,0,1,1,1,1,0,1,1,1,1],[1,0,0,1,1,1,1,1,1,0,1,1]]},cc._RF.pop()},{}],GameScene:[function(t,e,n){"use strict";cc._RF.push(e,"5798dhpwtNHQq2OXS4At/jG","GameScene");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},a=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},c=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var o=Array(t),i=0;for(e=0;e<n;e++)for(var r=arguments[e],a=0,c=r.length;a<c;a++,i++)o[i]=r[a];return o};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./Components/Svga/Svga"),p=t("./Components/Svga/SvgaEvent"),l=t("./Config/GameConfig"),u=t("./exportEvent"),h=t("./utils"),f=cc._decorator,d=f.ccclass,v=f.property,y={DEFAULT:"clipAni",PLAY:"clipPlay",STOP:"clipStop",GAME_OVER:"gameOver"},g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.procItem=null,e.propItem=[],e.bsetPropItem=null,e.actLevel=0,e.levelObjectives=0,e.actLevelInfo=null,e.starNum=0,e.countDown=0,e.isGameOver=!1,e.isStartGame=!1,e.clip=null,e.clipState=y.STOP,e.clipSpeed=l.Config.normalPropSpeed,e.clipTarget=null,e.surplusStar=l.Config.bestPropsNum,e.gameConfig=r({},l.Config),e.speedMultiplier=1,e}return i(e,t),e.prototype.onLoad=function(){cc.director.getCollisionManager().enabled=!0},e.prototype.start=function(){this.clip=cc.find("clipMask/clipWrp/clip",this.node),this.addNodeEvent()},e.prototype.addNodeEvent=function(){var t,e=this;cc.find("gameBtn",this.node).on(cc.Node.EventType.TOUCH_END,this.playGame,this),this.node.on(l.CUSTOM_EVENT.CLIP_ANI_END,this.onAnimCompleted,this),this.node.on(l.CUSTOM_EVENT.CLIP_COLLISION,this.onCollEnter,this),u.default.on(l.CUSTOM_EVENT.NEXT_LEVEL,this.nextLevel,this),u.default.on(l.CUSTOM_EVENT.GAME_START,this.startGame,this),u.default.on(l.CUSTOM_EVENT.GAME_INIT,function(t){var n=t.detail,o=void 0===n?{}:n;e.resetConfig(o),e.refreshLevelInfo(),e.refreshStageProps()},this),u.default.on(l.CUSTOM_EVENT.GAME_DESTROY,function(){e.node.destroy()},this);var n=null===(t=null===window||void 0===window?void 0:window.location)||void 0===t?void 0:t.href,o=h.getUrlParam("testPanel"),i=cc.find("test",this.node);if(i.active=o,o&&((null==n?void 0:n.includes("duibadev"))||(null==n?void 0:n.includes("duibatest")))||n.includes("localhost")){var r={next:"nextLevel",refreshProp:"refreshStageProps",start:"testStartGame",init:"testInit",addSpeed:"addSpeeds"};i.children.forEach(function(t){var n=null==e?void 0:e[r[t.name]];t.on(cc.Node.EventType.TOUCH_END,n,e)})}},e.prototype.testStartGame=function(){console.log("\u6d4b\u8bd5"),u.default.fire(l.CUSTOM_EVENT.GAME_START)},e.prototype.testInit=function(){console.log("\u6d4b\u8bd5\u521d\u59cb\u5316"),u.default.fire(l.CUSTOM_EVENT.GAME_INIT,{LevelInfo:[{level:1,num:4,cds:50},{level:1,num:5,cds:30},{level:1,num:8,cds:30}]})},e.prototype.addSpeeds=function(){this.speedMultiplier+=1,cc.find("clipMask/clipWrp",this.node).getComponent(cc.Animation).getAnimationState("clipRation").speed+=1},e.prototype.startGame=function(t){var e=this;t.detail,this.startGameCountAni(function(){e.isStartGame=!0,cc.find("clipMask/clipWrp",e.node).getComponent(cc.Animation).play(),e.schedule(e.startCd,1)})},e.prototype.startGameCountAni=function(t){var e=cc.find("countDown/cd",this.node),n=cc.find("countDown/cdBg",this.node);e.parent.active=!0,n.opacity=150,e.on(p.SvgaEvent.END_FRAME,function(){null==t||t(),e.parent.active=!1}),e.getComponent(s.default).play(0)},e.prototype.resetConfig=function(t){void 0===t&&(t={}),this.gameConfig=r(r({},l.Config),t),this.clipSpeed=this.gameConfig.normalPropSpeed,this.surplusStar=this.gameConfig.bestPropsNum,this.clip.getChildByName("line").height=this.gameConfig.maxLong,cc.find("clipMask/clipWrp",this.node).getComponent(cc.Animation).getAnimationState("clipRation").speed=this.gameConfig.rotationSpeed,this.isGameOver=!1,this.isStartGame=!1,this.speedMultiplier=1,this.clipTarget=null,this.setClipState(y.DEFAULT),this.clip.y=-41,cc.find("clipMask/clipWrp",this.node).angle=0},e.prototype.onCollEnter=function(t){var e=t.detail.other;this.clipTarget=e.node,this.clipSpeed=1==e.tag?this.gameConfig.bestPropSpeed:this.gameConfig.normalPropSpeed,this.setClipState(y.STOP)},e.prototype.setClipState=function(t,e){var n=this,o=cc.find("clipMask/clipWrp",this.node).getComponent(cc.Animation),i=cc.find("clipMask/clipWrp/clip",this.node).getComponent(cc.Animation),r=cc.find("clipMask/clipWrp/default",this.node);switch(this.clipState=t,t){case y.DEFAULT:o.resume(),r.active=!0,this.clip.active=!1,this.clipTarget&&(1==this.clipTarget.getComponent(cc.Collider).tag&&this.setStarProc(),this.clipTarget.getComponent("propMove").die(function(){n.clipTarget=null,0==n.surplusStar&&n.refreshStageProps()}));break;case y.PLAY:case y.STOP:o.pause(),this.clip.active=!0,r.active=!1,i.play(t);break;case y.GAME_OVER:o.stop(),i.stop()}null==e||e()},e.prototype.playGame=function(){!this.isGameOver&&this.isStartGame&&this.setClipState(y.PLAY)},e.prototype.gameOver=function(){this.isGameOver=!0,this.setClipState(y.GAME_OVER),this.unschedule(this.startCd),u.default.fire(l.CUSTOM_EVENT.GAME_OVER,r(r({},this.gameConfig.LevelInfo[this.actLevel]),{score:this.starNum,level:this.actLevel}))},e.prototype.setLable=function(t,e){cc.find(t,this.node).getComponent(cc.Label).string=e+""},e.prototype.startCd=function(){var t=this.countDown-1||0;if(!t||t<=0)return this.setLable("cdIcon/cd","0s"),this.gameOver(),void this.unschedule(this.startCd);this.countDown=t,this.setLable("cdIcon/cd",this.countDown+"s")},e.prototype.onDestroy=function(){this.unschedule(this.startCd)},e.prototype.refreshLevelInfo=function(t){void 0===t&&(t=0),this.isGameOver=!1,this.actLevel=t,this.starNum=0,this.actLevelInfo=this.gameConfig.LevelInfo[t],this.levelObjectives=this.actLevelInfo.num,this.countDown=this.actLevelInfo.cds||0,this.setLable("levelName","\u7b2c"+h.numToChinese(t+1)+"\u5173"),this.setLable("starIcon/starProc",this.starNum+"/"+this.levelObjectives),this.updateGameProc(),this.unschedule(this.startCd),this.setLable("cdIcon/cd",this.countDown+"s")},e.prototype.setStarProc=function(){var t=cc.find("procBg/proc",this.node),e=this.starNum;if(this.surplusStar--,!(e>=this.levelObjectives)){var n=cc.instantiate(this.procItem),o=(null===l.GameColors||void 0===l.GameColors?void 0:l.GameColors[this.actLevel])||[];n.color=cc.color(o[e]||this.gameConfig.defaultColor),n.setParent(t),this.starNum++,this.setLable("starIcon/starProc",this.starNum+"/"+this.levelObjectives),this.starNum>=this.levelObjectives&&(this.unschedule(this.startCd),u.default.fire(l.CUSTOM_EVENT.PASS_LEVEL,r(r({},this.gameConfig.LevelInfo[this.actLevel]),{score:this.starNum,level:this.actLevel})))}},e.prototype.nextLevel=function(){var t=this.actLevel+1;this.unschedule(this.startCd),t>=this.gameConfig.LevelInfo.length?this.gameOver():(this.refreshLevelInfo(t),this.refreshStageProps(),this.schedule(this.startCd,1))},e.prototype.updateGameProc=function(){var t=this.node.getChildByName("procBg"),e=t.getChildByName("proc"),n=this.levelObjectives;e.removeAllChildren(),t.width=39*n+12+1*(n-1),e.width=39*n+1*(n-1),t.x=-t.width/2},e.prototype.refreshStageProps=function(){this.surplusStar=this.gameConfig.bestPropsNum;for(var t=cc.find("gameStage",this.node),e=t.children,n=Math.floor(h.randomNum(0,this.gameConfig.propsMap.length)),o=c(this.gameConfig.propsMap[n]),i=0;i<this.gameConfig.bestPropsNum;i++){for(var r=Math.floor(h.randomNum(0,o.length));1!==o[r%o.length];)r++;o[r%o.length]=2}var a=[];for(i=0;i<this.gameConfig.propsNum;i++)a.push.apply(a,this.propItem);var s=o.filter(function(t){return 1==t}).length;for(a=h.getRandomArrayElements(a,s),i=0;i<e.length;i++){var p=e[i],l=o[i],u=h.randomNum(0,90).toFixed(2),f=null;if(p.removeAllChildren(),1==l){var d=cc.instantiate(a.pop());f=cc.instantiate(d)}else{if(2!=l)continue;f=cc.instantiate(this.bsetPropItem)}f&&(f.angle=u>45?u-90:u,f.setParent(p))}t.getComponent(cc.Layout).horizontalDirection=h.getProbability(50)?cc.Layout.HorizontalDirection.LEFT_TO_RIGHT:cc.Layout.HorizontalDirection.RIGHT_TO_LEFT},e.prototype.update=function(t){var e;if(!this.isGameOver&&this.isStartGame){var n=this.gameConfig.maxLong-41;if(this.clipState==y.PLAY){if(this.clip.y<=-n)return void this.setClipState(y.STOP);this.clip.y-=t*this.gameConfig.playSpeed*this.speedMultiplier}if(this.clipState==y.STOP){if(this.clip.y>=-41)return this.clipSpeed=this.gameConfig.normalPropSpeed,void this.setClipState(y.DEFAULT);if(this.clip.y+=t*this.clipSpeed*this.speedMultiplier,this.clipTarget&&(null===(e=this.clipTarget)||void 0===e?void 0:e.parent)){var o=this.clip.convertToWorldSpaceAR(cc.v2(0,-133)),i=this.clipTarget.parent.convertToWorldSpaceAR(cc.v2(0,0));this.clipTarget.setPosition(o.x-i.x,o.y-i.y)}}}},a([v({type:cc.Prefab,displayName:"\u5355\u683c\u8fdb\u5ea6\u6761"})],e.prototype,"procItem",void 0),a([v({type:[cc.Prefab],displayName:"\u821e\u53f0\u9053\u5177"})],e.prototype,"propItem",void 0),a([v({type:cc.Prefab,displayName:"\u52a0\u5206\u9053\u5177"})],e.prototype,"bsetPropItem",void 0),a([d],e)}(cc.Component);n.default=g,cc._RF.pop()},{"./Components/Svga/Svga":"Svga","./Components/Svga/SvgaEvent":"SvgaEvent","./Config/GameConfig":"GameConfig","./exportEvent":"exportEvent","./utils":"utils"}],ImgFixedSize:[function(t,e,n){"use strict";cc._RF.push(e,"3ea067CJuhGxJmUsuZZ1Xje","ImgFixedSize");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(n,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=a.property,p=a.menu,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._fixedSize=1,e}return i(e,t),Object.defineProperty(e.prototype,"fixedSize",{get:function(){return this._fixedSize},set:function(t){this._fixedSize=t,this.onSizeChanged()},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this._fixedSize=this.fixedSize,this.node.on(cc.Node.EventType.SIZE_CHANGED,this.onSizeChanged,this),this.onSizeChanged()},e.prototype.onSizeChanged=function(){var t=this.node.width,e=this.node.height,n=Math.max(t,e);this.node.scale=this.fixedSize/n},r([s({type:cc.Integer,tooltip:"\u56fa\u5b9a\u5c3a\u5bf8"})],e.prototype,"fixedSize",null),r([s({type:cc.Integer,tooltip:"\u56fa\u5b9a\u5c3a\u5bf8"})],e.prototype,"_fixedSize",void 0),r([c,p("framework/ImgFixedSize")],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],Matrix:[function(t,e,n){"use strict";cc._RF.push(e,"ac135di5uZFfaPtJI9vcajQ","Matrix"),Object.defineProperty(n,"__esModule",{value:!0}),n.Matrix=void 0;var o=Math.PI,i=o>>1,r=o+i,a=o/180,c=180/o;function s(t){switch(t){case i:case-r:return 0;case o:case-o:return-1;case r:case-i:return 0;default:return Math.cos(t)}}function p(t){switch(t){case i:case-r:return 1;case o:case-o:return 0;case r:case-i:return-1;default:return Math.sin(t)}}var l=function(){function t(t,e,n,o,i,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=1),void 0===i&&(i=0),void 0===r&&(r=0),this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this.array=null,this.prepend=function(t){var e=this,n=t.a,o=t.b,i=t.c,r=t.d,a=t.tx,c=t.ty,s=e.a,p=e.c,l=e.tx;return e.a=n*s+i*e.b,e.b=o*s+r*e.b,e.c=n*p+i*e.d,e.d=o*p+r*e.d,e.tx=n*l+i*e.ty+a,e.ty=o*l+r*e.ty+c,this};var a=this;a.a=t,a.b=e,a.c=n,a.d=o,a.tx=i,a.ty=r}return t.prototype.clone=function(){var e=this;return new t(e.a,e.b,e.c,e.d,e.tx,e.ty)},t.prototype.copy=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},t.prototype.transformVec2=function(t,e,n){void 0===n&&(n=null);var o=this;return n||(n=new cc.Vec2),n.x=t*o.a+e*o.c+o.tx,n.y=t*o.b+e*o.d+o.ty,n},t.prototype.transformVec2Inverse=function(t,e,n){void 0===n&&(n=null),n||(n=new cc.Vec2);var o=1/(this.a*this.d+this.c*-this.b);return n.x=this.d*o*t+-this.c*o*e+(this.ty*this.c-this.tx*this.d)*o,n.y=this.a*o*e+-this.b*o*t+(-this.ty*this.a+this.tx*this.b)*o,n},t.prototype.setFrom=function(t){var e=this;e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.tx=t.tx,e.ty=t.ty},t.prototype.identity=function(){var t=this;t.a=t.d=1,t.b=t.c=t.tx=t.ty=0},t.prototype.invert=function(){var t=this,e=t.a,n=t.b,o=t.c,i=t.d,r=t.tx,a=t.ty;if(0==n&&0==o)return 0==e||0==i?t.a=t.d=t.tx=t.ty=0:(e=t.a=1/e,i=t.d=1/i,t.tx=-e*r,t.ty=-i*a),t;var c=e*i-n*o;if(0==c)return t.identity(),t;c=1/c;var s=t.a=i*c;return n=t.b=-n*c,o=t.c=-o*c,i=t.d=e*c,t.tx=-(s*r+o*a),t.ty=-(n*r+i*a),t},t.prototype.createBox=function(t,e,n,o,i,r,c,l,u){var h=this;if(0!=i?r=c=i%360:(r%=360,c%=360),0==r&&0==c)h.a=n,h.b=h.c=0,h.d=o;else{c*=a;var f=s(r*=a),d=p(r);r==c?(h.a=f*n,h.b=d*n):(h.a=s(c)*n,h.b=p(c)*n),h.c=-d*o,h.d=f*o}h.tx=t+l-(l*h.a+u*h.c),h.ty=e+u-(l*h.b+u*h.d)},t.prototype.append=function(t){var e=this.a,n=this.b,o=this.c,i=this.d;this.a=t.a*e+t.b*o,this.b=t.a*n+t.b*i,this.c=t.c*e+t.d*o,this.d=t.c*n+t.d*i,this.tx=t.tx*e+t.ty*o+this.tx,this.ty=t.tx*n+t.ty*i+this.ty},t.isEqual=function(t,e){return t.tx==e.tx&&t.ty==e.ty&&t.a==e.a&&t.b==e.b&&t.c==e.c&&t.d==e.d},t.prototype.concat=function(t){var e=this,n=e.a,o=e.b,i=e.c,r=e.d,a=e.tx,c=e.ty,s=t.a,p=t.b,l=t.c,u=t.d,h=t.tx,f=t.ty;e.a=n*s+o*l,e.b=n*p+o*u,e.c=i*s+r*l,e.d=i*p+r*u,e.tx=a*s+c*l+h,e.ty=a*p+c*u+f},t.prototype.rotate=function(t){var e=this,n=Math.sin(t),o=Math.cos(t),i=e.a,r=e.b,a=e.c,c=e.d,s=e.tx,p=e.ty;e.a=i*o-r*n,e.b=i*n+r*o,e.c=a*o-c*n,e.d=a*n+c*o,e.tx=s*o-p*n,e.ty=s*n+p*o},t.prototype.scale=function(t,e){var n=this;n.a*=t,n.d*=e,n.c*=t,n.b*=e,n.tx*=t,n.ty*=e},t.prototype.translate=function(t,e){this.tx+=t,this.ty+=e},t.prototype.set=function(t,e,n,o,i,r){return this.a=t,this.b=e,this.c=n,this.d=o,this.tx=i,this.ty=r,this},t.prototype.getRotation=function(){return Math.round(Math.atan2(this.b,this.a)*c)},t.prototype.toArray=function(t,e){void 0===t&&(t=!1),this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},t.prototype.decompose=function(){var t={rotation:0,skew:cc.v2(),scale:cc.v2(),position:cc.v2()},e=this.a,n=this.b,o=this.c,i=this.d,r=-Math.atan2(-o,i),a=Math.atan2(n,e),c=Math.abs(r+a);return c<1e-5||Math.abs(2*Math.PI-c)<1e-5?(t.rotation=a,e<0&&i>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=r,t.skew.y=a),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(o*o+i*i),t.position.x=this.tx,t.position.y=this.ty,t},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){},t}();n.Matrix=l,cc._RF.pop()},{}],SvgaEvent:[function(t,e,n){"use strict";cc._RF.push(e,"07040GmslJHs7J1pUxL6Kr7","SvgaEvent"),Object.defineProperty(n,"__esModule",{value:!0}),n.SvgaEvent=void 0,(n.SvgaEvent||(n.SvgaEvent={})).END_FRAME="end_frame",cc._RF.pop()},{}],SvgaTrack:[function(t,e,n){"use strict";cc._RF.push(e,"5eefe9b92lAU4GY+nBw9mG4","SvgaTrack"),Object.defineProperty(n,"__esModule",{value:!0}),n.SvgaTrack=void 0;var o=function(){function t(t,e){this.node=t,this.frames=e}return t.prototype.setValue=function(t){var e=this.node,n=this.frames,o=n[t=Math.round(cc.misc.clampf(t,0,n.length-1))],i=o.alpha,r=o.transform;if(o.maskPath,i<.05)e.opacity=0;else{e.opacity=255*i;var a=r.a,c=r.b,s=r.c,p=r.d,l=r.tx,u=r.ty,h=e._matrix,f=e._trs,d=h.m;d[0]=a,d[1]=c,d[4]=-s,d[5]=-p,d[6]=-d[6],d[7]=-d[7],f[0]=l,f[1]=u,e._renderFlag|=cc.RenderFlow.FLAG_WORLD_TRANSFORM}},t.prototype.resetValue=function(){this.node._renderFlag&=~cc.RenderFlow.FLAG_LOCAL_TRANSFORM,this.setValue(0)},t.prototype.destroy=function(){this.node=null},t}();n.SvgaTrack=o,cc._RF.pop()},{}],Svga:[function(t,e,n){"use strict";cc._RF.push(e,"7c5ffhlHDpBpoDQ8wfKN7pu","Svga");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function a(t){try{s(o.next(t))}catch(e){r(e)}}function c(t){try{s(o.throw(t))}catch(e){r(e)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}s((o=o.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(t){return function(e){return s([t,e])}}function s(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./SvgaTrack"),p=cc._decorator.executeInEditMode,l=cc._decorator.playOnFocus,u=t("./SvgaEvent"),h=t("./loadSvga"),f=cc._decorator.menu,d=cc._decorator.disallowMultiple,v=cc._decorator,y=v.ccclass,g=v.property,_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.edit_update=!1,e.aniNode=null,e._svga=null,e.tracks=[],e.isPlaying=!1,e.vmData=null,e.autoPlay=!0,e._loop=!1,e._totalFrames=0,e._frameTime=0,e._fps=0,e._curTime=0,e._curFrame=0,e}return i(e,t),e.prototype.onFocusInEditor=function(){this.edit_update=!0,this.play(0)},e.prototype.onLostFocusInEditor=function(){this.edit_update=!1},e.prototype.resetInEditor=function(){return a(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return[4,this._load()];case 1:return t.sent(),this.edit_update=!0,this.play(0),[2]}})})},e.prototype.onEnable=function(){this.play(0)},Object.defineProperty(e.prototype,"svga",{get:function(){return this._svga},set:function(t){var e=this;t!==this._svga&&(this._svga=t,this._load().then(function(){e.play(0)}))},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){return a(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return this.aniNode=this.node.getChildByName("aniNode"),this.aniNode||(this.aniNode=new cc.Node("aniNode"),this.aniNode.scaleY=-1,this.node.addChild(this.aniNode)),[4,this._load()];case 1:return t.sent(),this.autoPlay&&this.play(0),[2]}})})},e.prototype.start=function(){},e.prototype.play=function(t){void 0===t&&(t=0),this.curFrame=t,this.isPlaying=!0},e.prototype.stop=function(t){void 0===t&&(t=!1),t&&(this.curFrame=0),this.isPlaying=!1},Object.defineProperty(e.prototype,"loop",{get:function(){return this._loop},set:function(t){this._loop=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalTime",{get:function(){return this._totalFrames*(1/this.fps)||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalFrames",{get:function(){return this._totalFrames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fps",{get:function(){var t;return this._fps||(null===(t=this.vmData)||void 0===t?void 0:t.FPS)||0},set:function(t){this._fps=t,this._frameTime=1/t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"curTime",{get:function(){return this._curTime},set:function(t){this._curTime=t,this._curFrame=t*this.fps},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"curFrame",{get:function(){return this._curFrame},set:function(t){this._curFrame=t,this._curTime=t/this.fps},enumerable:!1,configurable:!0}),e.prototype.update=function(t){var e=this;this.isPlaying&&(this.curTime+=t,this._curFrame>this.totalFrames&&(this.node.emit(u.SvgaEvent.END_FRAME),this.loop?this.curTime=(this._curFrame-this.totalFrames)*this._frameTime:this.stop(!0)),this.tracks.forEach(function(t){t.setValue(e._curFrame)}))},e.prototype.onDestroy=function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].destroy();this.tracks=[]},e.prototype._load=function(){return a(this,void 0,void 0,function(){var t=this;return c(this,function(){return this.svga?(this.aniNode.removeAllChildren(!0),[2,new Promise(function(e){return a(t,void 0,void 0,function(){var t,n,o,i,r,p,l,u,f,d,v,y,g,_,m,b,S=this;return c(this,function(C){switch(C.label){case 0:return[4,h.loadSvga(this.svga)];case 1:for(d in(t=C.sent()).textures={},this.vmData=t,n=t.FPS,o=t.videoSize,i=t.images,r=t.sprites,p=t.textures,l=t.frames,this.fps||(this.fps=n),this._totalFrames=l,this.node.setContentSize(o.width,o.height),this.aniNode.setPosition(-o.width/2,o.height/2),u=[],f=function(t){var e=i[t];0!==e.indexOf("iVBO")&&0!==e.indexOf("/9j/2w")||(e="data:image/png;base64,"+e),u.push(new Promise(function(n){return a(S,void 0,void 0,function(){var o,i;return c(this,function(r){switch(r.label){case 0:return[4,h.createImage(e)];case 1:return o=r.sent(),(i=new cc.Texture2D).initWithElement(o),p[t]=new cc.SpriteFrame(i),n(),[2]}})})}))},i)f(d);return[4,Promise.all(u)];case 2:for(C.sent(),v=0;v<r.length;v++){if(y=r[v],g=y.imageKey,_=y.frames,!g)return[2];(m=new cc.Node(g)).setAnchorPoint(0,1),this.aniNode.addChild(m),m.addComponent(cc.Sprite).spriteFrame=p[g],(b=new s.SvgaTrack(m,_)).resetValue(),this.tracks.push(b)}return e(),[2]}})})})]):[2]})})},r([g(cc.Asset)],e.prototype,"_svga",void 0),r([g(cc.Asset)],e.prototype,"svga",null),r([g({tooltip:"\u662f\u5426\u81ea\u52a8\u64ad\u653e"})],e.prototype,"autoPlay",void 0),r([g],e.prototype,"_loop",void 0),r([g({tooltip:"\u662f\u5426\u5faa\u73af"})],e.prototype,"loop",null),r([g],e.prototype,"_fps",void 0),r([g],e.prototype,"fps",null),r([y,p,d,l,f("\u81ea\u5b9a\u4e49\u7ec4\u4ef6/Svga")],e)}(cc.Component);n.default=_,cc._RF.pop()},{"./SvgaEvent":"SvgaEvent","./SvgaTrack":"SvgaTrack","./loadSvga":"loadSvga"}],exportEvent:[function(t,e,n){"use strict";cc._RF.push(e,"d252b/Dmr1HLLC3k85LvdL5","exportEvent"),Object.defineProperty(n,"__esModule",{value:!0}),n.EventCenterClass=void 0;var o=function(t,e,n){this.type=t,this.target=e,this.detail=n,this.timeStamp=+new Date},i=function(){function t(){this._listeners={}}return t.prototype.on=function(t,e,n,o){for(var i,r=(i=this._listeners=this._listeners||{})[t]=i[t]||[],a=0,c=r.length;a<c;a++)if(r[a].listener===e)return;return r.push({listener:e,context:n,once:o}),this},t.prototype.off=function(t,e){var n;if(n=this._listeners=this._listeners||{},0==arguments.length)return n=null,this;var o=n&&n[t];if(o){if(1==arguments.length)return delete n[t],this;for(var i=0,r=o.length;i<r;i++){var a=o[i];if(a.listener===e){o.splice(i,1),0===o.length&&delete n[t];break}}}return this},t.prototype.fire=function(t,e){var n,i;"string"==typeof t?i=t:(n=t,i=t.type);var r=this._listeners;if(!r)return!1;var a=r[i];if(a){var c=a.slice(0);n=n||new o(i,this,e);for(var s=0;s<c.length;s++){var p=c[s];if(p.listener.call(p.context,n),p.once){var l=a.indexOf(p);l>-1&&a.splice(l,1)}}return 0==a.length&&delete r[i],!0}return!1},t}();n.EventCenterClass=i;var r=new i;cc.EventBus=r,n.default=r,cc._RF.pop()},{}],interface:[function(t,e,n){"use strict";cc._RF.push(e,"dbeb7x/ykZC14tBqxOW9gtp","interface"),Object.defineProperty(n,"__esModule",{value:!0}),cc._RF.pop()},{}],loadSvga:[function(t,e,n){"use strict";cc._RF.push(e,"d0e08EVP/pFhJXdUpznXvD+","loadSvga"),Object.defineProperty(n,"__esModule",{value:!0}),n.createImage=n.ImgCache=n.loadSvga=n.SvgaCache=void 0,n.SvgaCache={},cc.assetManager.downloader.register(".svga",function(t,e,n){cc.assetManager.downloader.downloadFile(t,{responseType:"arraybuffer"},n)}),n.loadSvga=function(t){return new Promise(function(e){var o="";t instanceof cc.Asset?(o=t._uuid,t=t._nativeAsset):o=t,n.SvgaCache[o]?e(n.SvgaCache[o]):SvgaParser.loadSvga(t,function(t){n.SvgaCache[o]=t,e(t)})})},n.ImgCache={},n.createImage=function(t){return new Promise(function(e){if(n.ImgCache[t])e(n.ImgCache[t]);else{var o=new Image;o.onload=function(){n.ImgCache[t]=o,e(o)},o.src=t}})},cc._RF.pop()},{}],propMove:[function(t,e,n){"use strict";cc._RF.push(e,"a4cebApRXhOpYXmhf5gIeC3","propMove");var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function a(t){try{s(o.next(t))}catch(e){r(e)}}function c(t){try{s(o.throw(t))}catch(e){r(e)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}s((o=o.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(t){return function(e){return s([t,e])}}function s(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,p=s.ccclass,l=(s.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.die=function(t){return a(this,void 0,void 0,function(){var e,n=this;return c(this,function(o){switch(o.label){case 0:return(e=this.node.getComponent(cc.Animation))?(e.play(),e.on("finished",function(){return a(n,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:return[4,null==t?void 0:t()];case 1:return e.sent(),this.node.destroy(),[2]}})})},this),[3,3]):[3,1];case 1:return[4,null==t?void 0:t()];case 2:o.sent(),this.node.destroy(),o.label=3;case 3:return[2]}})})},r([p],e)}(cc.Component));n.default=l,cc._RF.pop()},{}],utils:[function(t,e,n){"use strict";cc._RF.push(e,"6aca3erpIVPLpMW4bJwDRR6","utils");var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function a(t){try{s(o.next(t))}catch(e){r(e)}}function c(t){try{s(o.throw(t))}catch(e){r(e)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}s((o=o.apply(t,e||[])).next())})},i=this&&this.__generator||function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(t){return function(e){return s([t,e])}}function s(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}},r=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var o=Array(t),i=0;for(e=0;e<n;e++)for(var r=arguments[e],a=0,c=r.length;a<c;a++,i++)o[i]=r[a];return o};function a(t,e){return Math.floor(Math.random()*(e-t))+t}Object.defineProperty(n,"__esModule",{value:!0}),n.getUrlParam=n.getProbability=n.getRandomArrayElements=n.randomNum=n.loadGameResources=n.numToChinese=n.set16ToRgb=void 0,n.set16ToRgb=function(t){if(t&&/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(t)){var e=t.toLowerCase().replace(/\#/g,""),n=e.length;if(3==n){for(var o="",i=0;i<n;i++)o+=e.slice(i,i+1).concat(e.slice(i,i+1));e=o}var r=[];for(i=0;i<6;i+=2){var a=e.slice(i,i+2);r.push(parseInt("0x"+a))}return r}},n.numToChinese=function(t){return["\u96f6","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341"][t]},n.loadGameResources=function(){return o(void 0,void 0,void 0,function(){return i(this,function(){return[2,new Promise(function(t){cc.resources.preloadDir("images",cc.SpriteFrame,function(e,n){console.log("111",n),t(n,e)})})]})})},n.randomNum=a,n.getRandomArrayElements=function(t,e){if(t.length<=e)return t;for(var n,o,i=t.slice(0),r=t.length,a=r-e;r-- >a;)n=i[o=(r+1)*Math.random()>>0],i[o]=i[r],i[r]=n;return i.slice(a)},n.getProbability=function(t){return r(Array(100-t).fill(!1),Array(t).fill(!0))[Math.floor(a(0,99))]},n.getUrlParam=function(t){var e=window.location.search,n=e.slice(1).match(new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"));return e.length?n&&n[2]:null},cc._RF.pop()},{}]},{},["ClipAni","BitText","FitSprite","Matrix","Svga","SvgaEvent","SvgaTrack","interface","loadSvga","GameConfig","GameScene","ImgFixedSize","exportEvent","propMove","utils"]);
\ No newline at end of file
......@@ -40,7 +40,7 @@
<!-- <script src="//yun.duiba.com.cn/db_games/libs0924/svgaParser.minWeb.js" crossorigin="anonymous"></script>-->
<link rel="stylesheet" type="text/css" href="https://yun.duiba.com.cn/db_games/ccc_game/template/1681791625573/style-mobile.css"/>
<link rel="stylesheet" type="text/css" href="https://yun.duiba.com.cn/db_games/ccc_game/template/1681800855882/style-mobile.css"/>
<style>
......@@ -90,9 +90,9 @@
</div>
</div>
<script src="https://yun.duiba.com.cn/db_games/ccc_game/template/1681791625573/src/settings.js" charset="utf-8"></script>
<script src="https://yun.duiba.com.cn/db_games/ccc_game/template/1681800855882/src/settings.js" charset="utf-8"></script>
<script src="https://yun.duiba.com.cn/db_games/ccc_game/template/1681791625573/main.js" charset="utf-8"></script>
<script src="https://yun.duiba.com.cn/db_games/ccc_game/template/1681800855882/main.js" charset="utf-8"></script>
<script type="text/javascript">
(function () {
......
window.__remoteUrl__ = "https://yun.duiba.com.cn/db_games/ccc_game/template/1681791625573/";
window.__remoteUrl__ = "https://yun.duiba.com.cn/db_games/ccc_game/template/1681800855882/";
window.__remoteAssets__ = window.__remoteUrl__ + "assets/";
window.__version__ = 1681791625573;
window.__version__ = 1681800855882;
window.__ENV__ = "prod";
window.boot = function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment