window.__require=function t(e,n,o){function i(s,a){if(!n[s]){if(!e[s]){var c=s.split("/");if(c=c[c.length-1],!e[c]){var u="function"==typeof __require&&__require;if(!a&&u)return u(c,!0);if(r)return r(c,!0);throw new Error("Cannot find module '"+s+"'")}s=c}var p=n[s]={exports:{}};e[s][0].call(p.exports,function(t){return i(e[s][1][t]||t)},p,p.exports,t,e,n,o)}return n[s].exports}for(var r="function"==typeof __require&&__require,s=0;s=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var i=cc._decorator,r=i.ccclass,s=(i.property,function(){function t(){}return t.formatDate=function(t){return void 0===t&&(t=new Date),t.getFullYear()+"-"+(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-"+(t.getDate()<10?"0"+t.getDate():t.getDate())+"-"+(t.getHours()<10?"0"+t.getHours():t.getHours())+":"+(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":"+(t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds())},t.formatSecond_00_00=function(t,e){void 0===e&&(e=":");var n=Math.floor(t/60),o=t-60*n,i=n.toString();n<10&&(i="0"+i);var r=o.toString();return o<10&&(r="0"+r),i+e+r},t.format_hh_mm_ss=function(t){return void 0===t&&(t=new Date),(t.getHours()<10?"0"+t.getHours():t.getHours())+":"+(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":"+(t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds())},t.DaySequence=function(t,e){var n=t.getFullYear(),o=e.getFullYear(),i=this._DaySequence(n,o);if(0!=i)return i;var r=t.getMonth(),s=e.getMonth(),a=this._DaySequence(r,s);if(0!=a)return a;var c=t.getDate(),u=e.getDate();return this._DaySequence(c,u)},t._DaySequence=function(t,e){return t=60?t>=2592e3?Math.floor(t/2592e3)+"\u6708":t>=86400?Math.floor(t/86400)+"\u5929":t>=3600?Math.floor(t/3600)+"\u5c0f\u65f6":Math.floor(t/60)+"\u5206\u949f":Math.floor(t)+"\u79d2"},t.getCurTime=function(){return Number((.001*(new Date).getTime()).toFixed(0))},t.secondConvertStringTime=function(t){var e;if(t>-1){var n=Math.floor(t/3600),o=Math.floor(t/60)%60,i=t%60;e=n+"\u5c0f\u65f6",o<10&&(e+="0"),e+=o+"\u5206",i<10&&(e+="0"),e+=i.toFixed(0)+"\u79d2"}return e},t.secondConvertTime=function(t,e){void 0===e&&(e=3);var n="\u683c\u5f0f\u5316\u65f6\u95f4\uff0c\u4f20\u5165\u503c\u9519\u8bef\uff1a"+t;if(t>-1){var o=Math.floor(t/3600),i=Math.floor(t/60)%60,r=t%60;n=o<10?"0"+o+":":o+":",i<10&&(n+="0"),n+=i+":",r<10&&(n+="0"),n+=r.toFixed(0)}return n},t.secondConverDateTime=function(t){var e,n,o=new Date(1e3*t);return e=o.getMinutes()<10?"0"+o.getMinutes():o.getMinutes().toString(),n=o.getSeconds()<10?"0"+o.getSeconds():o.getSeconds().toString(),o.getHours()+":"+e+":"+n},t.timeConvertUnixStamp=function(t){var e=t.split(":")[0],n=t.split(":")[1],o=t.split(":")[2];return Number(3600*e).toString()+Number(60*n).toString()+Number(o).toString()},t.timestampTo_M_D=function(t){var e=new Date(1e3*t);return(e.getMonth()+1).toString()+"\u6708"+e.getDate()+"\u65e5"},t.timestampTo_Y_M_D=function(t){var e=new Date(1e3*t),n=[];return n.push(e.getFullYear()),n.push(e.getMonth()+1),n.push(e.getDate()),n},t.timeSecToHours=function(t){return t/3600},t}();window.DateUtil=n,cc._RF.pop()},{}],EventMgr:[function(t,e,n){"use strict";cc._RF.push(e,"aced9WTMPxJc6wvoU3pD8px","EventMgr");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,a=s.ccclass,c=(s.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.events_map={},e}var n;return i(e,t),n=e,e.prototype.onLoad=function(){null===n.Instance?n.Instance=this:this.destroy()},e.prototype.add_event_listenner=function(t,e,n){this.events_map[t]||(this.events_map[t]=[]),this.events_map[t].push({caller:e,func:n})},e.prototype.remove_event_listenner=function(t,e,n){if(this.events_map[t]){for(var o=this.events_map[t],i=0;i=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./EventMgr"),a=t("./GameEvent"),c=cc._decorator,u=c.ccclass,p=(c.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.onLoad=function(){this.camera=this.node},e.prototype.start=function(){s.default.Instance.add_event_listenner(a.GameEvent.CamShake,this,this.OnCamShake)},e.prototype.OnCamShake=function(t,e){this.Shake(e)},e.prototype.Shake=function(t){void 0===t&&(t=0),this.StopShake();var e=this,n=this.camera.position,o=cc.delayTime(1/30),i=cc.callFunc(function(){var t=Util.random(-3,3),o=Util.random(-3,3);e.camera.x=n.x+t,e.camera.y=n.y+o}),r=cc.sequence(o,i);this.camera.runAction(cc.repeatForever(r)),t>0&&setTimeout(function(){e.camera.stopAllActions()},t)},e.prototype.StopShake=function(){this.camera.stopAllActions(),this.camera.x=0,this.camera.y=0},r([u],e)}(cc.Component));n.default=p,cc._RF.pop()},{"./EventMgr":"EventMgr","./GameEvent":"GameEvent"}],GameConst:[function(t,e){"use strict";cc._RF.push(e,"a912enDLRVODrwSyvT4NwML","GameConst");var n=function(){function t(){}return Object.defineProperty(t,"logType",{get:function(){return 4},enumerable:!1,configurable:!0}),t.Gravity=-700,t.VSTimeScale=1.1,t}();window.GameConst=n,cc._RF.pop()},{}],GameEvent:[function(t,e,n){"use strict";cc._RF.push(e,"2ddedahPURA/bwO5YlH6nfU","GameEvent"),Object.defineProperty(n,"__esModule",{value:!0}),n.GameEvent=void 0,function(t){t.HeroDie="HeroDie",t.MonsterDie="MonsterDie",t.HeroHpChange="HeroHpChange",t.HeroRageChange="HeroRageChange",t.UpdateBestKill="UpdateBestKill",t.DebugSDKInput="DebugSDKInput",t.CamShake="CamShake",t.HeroSuperSkill="HeroSuperSkill",t.EndlessGameNewRound="EndlessGameNewRound",t.GuideStepWolfStop="GuideStepWolfStop",t.GuideStepEnd="GuideStepEnd",t.GuideIptSwitch="GuideIptSwitch",t.GuidIptPermit="GuidIptPermit",t.SDK_UI_IPT="SDK_UI_IPT",t.SDK_SHAKE="SDK_SHAKE",t.HERO_HURT="HERO_HURT",t.SCRENN_COLOR="SCRENN_COLOR",t.SDK_QUIT="SDK_QUIT",t.update_endless_wolf_count="update_endless_wolf_count",t.sdkActionTip="sdkActionTip",t.GuideState="GuideState"}(n.GameEvent||(n.GameEvent={})),cc._RF.pop()},{}],GameMode:[function(t,e,n){"use strict";cc._RF.push(e,"152d98L9xhH1ZQv6fXhvp8i","GameMode"),Object.defineProperty(n,"__esModule",{value:!0}),n.GameMode=void 0,function(t){t.normal="normal",t.endless="endless"}(n.GameMode||(n.GameMode={})),cc._RF.pop()},{}],GameState:[function(t,e,n){"use strict";cc._RF.push(e,"28284fnN2JKy40RFtUtexyp","GameState"),Object.defineProperty(n,"__esModule",{value:!0}),n.GameState=void 0,function(t){t.inMain="inMain",t.inGame="inGame",t.inGuide="inGuide",t.win="win",t.fail="fail"}(n.GameState||(n.GameState={})),cc._RF.pop()},{}],Game_extens:[function(t,e){"use strict";cc._RF.push(e,"72470iPOiFEurllgcmTrPJq","Game_extens");var n=0;cc.js.getPropertyDescriptor(cc.director,"_deltaTime"),Object.defineProperty(cc.director,"_deltaTime",{get:function(){return n*cc.director.getScheduler().getTimeScale()},set:function(t){n=t},enumerable:!0,configurable:!0}),String.prototype.format=function(){if(0===arguments.length)return String(this);for(var t=/(\{\d\})/,e=this;t.test(e);){var n=Number(RegExp.$1.slice(1,-1));e=e.replace(new RegExp("\\{"+n+"\\}","g"),n>=arguments.length?"":arguments[n])}return e},Date.prototype.Format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[n]:("00"+e[n]).substr((""+e[n]).length)));return t},cc._RF.pop()},{}],GuideMgr:[function(t,e,n){"use strict";cc._RF.push(e,"d96b1QuATlIDLU9yK8lrpPI","GuideMgr");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,a=s.ccclass,c=(s.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}var n;return i(e,t),n=e,e.prototype.onLoad=function(){null===n.ins?n.ins=this:this.destroy()},e.ins=null,n=r([a],e)}(cc.Component));n.default=c,cc._RF.pop()},{}],Helloworld:[function(t,e,n){"use strict";cc._RF.push(e,"1d488zJw75A3KhDL6RKLaSW","Helloworld");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,a=s.ccclass,c=s.property,u=t("./sdk"),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.label=null,e.left=null,e.right=null,e.text="hello1111123123123",e}return i(e,t),e.prototype.start=function(){var t=this;this.label.string=this.text,u.SDK.on(u.MOTION.LEFT_DOWN.toString(),function(e){console.log("MOTION.LEFT .. "+e),console.log("MOTION.LEFT .. "+e+","+t.name)}),u.SDK.on(u.MOTION.LEFT_DOWN.toString(),this._onMotionLeft,this),u.SDK.on(u.CMD.ENTER_KEY.toString(),this._ok,this),u.SDK.once(u.MOTION.LEFT_DOWN.toString(),function(e){console.log("MOTION.LEFT .. once "+e+","+t.name)}),u.SDK.once(u.MOTION.LEFT_DOWN.toString(),this._onMotionLeftOnce,this),u.SDK.getUserInfo(this.user),u.SDK.getRank(0,this.getRank),u.SDK.on(u.CMD.ENTER_KEY.toString(),this._ok,this),u.SDK.on(u.CMD.CANCLE_KEY.toString(),this._ok,this),u.SDK.on(u.CMD.BACK_LEFT.toString(),this._ok,this),u.SDK.on(u.CMD.BACK_RIGHT.toString(),this._ok,this)},e.prototype.user=function(t){console.log("getUserInfo 1111111 "+t)},e.prototype.getRank=function(t){console.log("getRank 1111 type: "+t[0]+" == "+t[1]+" == "+t[1].list.length)},e.prototype.update=function(){},e.prototype._onMotionLeft=function(t){console.log("MOTION.LEFT .. _onMotionLeft"+t+","+this.name),u.SDK.off(u.MOTION.LEFT_DOWN.toString(),this._onMotionLeft)},e.prototype._onMotionLeftOnce=function(t){console.log("MOTION.LEFT .. _onMotionLeftOnce"+t+","+this.name)},e.prototype._ok=function(){console.log(" -- cmd._ok ")},r([c(cc.Label)],e.prototype,"label",void 0),r([c(cc.Button)],e.prototype,"left",void 0),r([c(cc.Button)],e.prototype,"right",void 0),r([c],e.prototype,"text",void 0),r([a],e)}(cc.Component);n.default=p,cc._RF.pop()},{"./sdk":"sdk"}],HeroHit:[function(t,e,n){"use strict";cc._RF.push(e,"fcabcSszGxFxbUFOl3isKf0","HeroHit");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./Hero"),a=t("./MonsterHit"),c=cc._decorator,u=c.ccclass,p=(c.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hero=null,e.isHurt=!1,e.realVal=0,e.maxVal=5,e.dir=10,e}return i(e,t),Object.defineProperty(e.prototype,"Hero",{get:function(){return this.hero},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"WPos",{get:function(){return this.hero.WPos},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this.hero=this.node.parent.getComponent(s.default),this.node.getComponent(cc.Sprite)&&(this._material=this.node.getComponent(cc.Sprite).getMaterial(0)),this._material.setProperty("uSize",this.realVal);for(var t=this.getComponents(cc.BoxCollider),e=0;e=this.maxVal||this.realVal<=0)&&(this.dir=-this.dir,this.blinkCount--<=0&&(this.realVal=0,this.isHurt=!1)),this._material.setProperty("uSize",this.realVal))},e.prototype.dunCollider=function(){this.hurtCollider&&(this.hurtCollider.size.height=20,this.hurtCollider.offset.y=.5*this.hurtCollider.size.height)},e.prototype.standCollider=function(){this.hurtCollider&&(this.hurtCollider.size.height=140,this.hurtCollider.offset.y=.5*this.hurtCollider.size.height)},e.prototype.jumpCollider=function(){this.hurtCollider&&(this.hurtCollider.size.height=60,this.hurtCollider.offset.y=180)},e.prototype.superSkillCollider=function(){this.hurtCollider&&(this.hurtCollider.size.height=0,this.hurtCollider.offset.y=0)},e.prototype.onDestroy=function(){Ticker.unregister(this.tickFun,this)},r([u],e)}(cc.Component));n.default=p,cc._RF.pop()},{"./Hero":"Hero","./MonsterHit":"MonsterHit"}],Hero:[function(t,e,n){"use strict";cc._RF.push(e,"59dab5wsilBPKblRV01BD+Z","Hero");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0}),n.GameInput=void 0;var s,a,c,u=t("../help/TouchMgr"),p=t("./EventMgr"),l=t("./GameEvent"),h=t("./HeroHit"),d=t("./HurtTag"),f=t("./Main"),_=t("./ResMgr"),y=t("./SDKIpt"),m=t("./SoundMgr"),g=t("./WeaponType");(function(t){t.stand="stand",t.jump="jump",t.dun="dun",t.die="die"})(s||(s={})),function(t){t.attack1="atk1",t.attack2="atk2",t.attack3="atk3",t.attack4="atk4",t.die="die",t.dun="dun",t.dun_atk1="dun_atk1",t.dun_hookAtk="dun_hookAtk",t.idle="idle",t.jump="jump",t.jump_up_atk_sdk="jump_up_atk_sdk",t.weapon_atk="weapon_atk",t.weapon_hold="weapon_hold",t.superSkill="superSkill",t.hurt_left="hurt_left",t.hurt_right="hurt_right"}(a||(a={})),function(t){t.none="none",t.leftClick="leftClick",t.up="up",t.leftDown="leftDown",t.rightClick="rightClick",t.rightDown="rightDown",t.down="down"}(c=n.GameInput||(n.GameInput={}));var v=cc._decorator,S=v.ccclass,b=v.property,w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.weapon=null,e.rage=0,e.speed=0,e.wPos=null,e.sp=null,e.heroAni=null,e.heroHit=null,e.annima=null,e.standAtkCombo=0,e.lv=null,e.hurtTag=null,e.weaponHoldPosNode=null,e.weaponAtkPosNode=null,e.doctorWolfRoot=null,e.isHeroLeftDir=!1,e.jump_up_atk_count=0,e.jump_up_atk_ing=!1,e._heroSate=s.stand,e.killWolf=0,e.lastInputState=c.none,e._inputState=c.none,e.isDunAtking=!1,e.isHoldWeapon=!1,e}return i(e,t),Object.defineProperty(e.prototype,"Hp",{get:function(){return this.hp},set:function(t){t>this.maxHp&&(t=this.maxHp),t<0&&(t=0),this.hp!=t&&(this.hp=t,p.default.Instance.dispatch_event(l.GameEvent.HeroHpChange,this.hp))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Rage",{get:function(){return this.rage},set:function(t){t>this.maxRage&&(t=this.maxRage),t<0&&(t=0),this.rage!=t&&(this.rage=t,p.default.Instance.dispatch_event(l.GameEvent.HeroRageChange,this.rage))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"IsHeavy",{get:function(){return 3==this.standAtkCombo||this.annima==a.jump_up_atk_sdk||(this.annima,a.dun_atk1),3==this.standAtkCombo||this.annima==a.jump_up_atk_sdk||this.annima==a.dun_atk1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"heroSate",{get:function(){return this._heroSate},set:function(t){var e=this._heroSate;this._heroSate=t,this.heroStateChange(e,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inputState",{get:function(){return this._inputState},set:function(t){if(f.default.Ins.HasGuideIptPermit(t)&&(!this.isDunAtking||t==c.none||t==c.up)){var e=this._inputState;this.lastInputState=e,this._inputState=t,this.inputStateChange(e,t)}},enumerable:!1,configurable:!0}),e.prototype.init=function(t){this.superSkillComb=0,this.speed=200,this.sp=cc.v2(0,0),this.maxHp=t,this.Hp=f.default.Ins.IsGuide?7:t,this.maxRage=10,this.Rage=0,this.rigid=this.node.getComponent(cc.RigidBody),this.heroAni=this.node.getChildByName("body").getComponent(cc.Animation),this.heroHit=this.node.getChildByName("body").getComponent(h.default),this.heroAni.on(cc.Animation.EventType.FINISHED,this.onAnimationFinish,this),this.wPos=this.node.convertToWorldSpaceAR(cc.Vec2.ZERO),this.annima=a.idle,this.heroSate=s.stand;var e=cc.instantiate(_.default.Instance.getAsset("LifePrefab","hurtTag"));e.parent=this.node,this.hurtTag=e.getComponent(d.default),this.hurtTag.init(!0)},e.prototype.start=function(){f.default.Ins.SDKOpen?(cc.sys.isBrowser&&p.default.Instance.add_event_listenner(l.GameEvent.DebugSDKInput,this,this.OnDebugSDKInput),p.default.Instance.add_event_listenner(l.GameEvent.SDK_UI_IPT,this,this.ON_SDK_UI_IPT)):(p.default.Instance.add_event_listenner(cc.Node.EventType.TOUCH_START,this,this.ON_TOUCH_START),p.default.Instance.add_event_listenner(cc.Node.EventType.TOUCH_MOVE,this,this.ON_TOUCH_MOVE),p.default.Instance.add_event_listenner(cc.Node.EventType.TOUCH_END,this,this.ON_TOUCH_END),p.default.Instance.add_event_listenner(cc.Node.EventType.TOUCH_CANCEL,this,this.ON_TOUCH_END)),p.default.Instance.add_event_listenner(l.GameEvent.MonsterDie,this,this.OnMonsterDie)},e.prototype.OnMonsterDie=function(){this.killWolf++,2==this.killWolf&&(this.Rage++,this.killWolf=0)},e.prototype.OnDebugSDKInput=function(t,e){this.inputState=e},e.prototype.ON_SDK_UI_IPT=function(t,e){switch(e){case y.SDKIpt.hero_down:this.inputState=c.down;break;case y.SDKIpt.hero_left:this.inputState=c.leftClick;break;case y.SDKIpt.hero_right:this.inputState=c.rightClick;break;case y.SDKIpt.hero_up:this.inputState=c.up}},e.prototype.ON_TOUCH_END=function(){var t=this.isTouchRight();this.touchType==cc.Node.EventType.TOUCH_START&&(this.inputState=t?c.rightClick:c.leftClick),this.touchType=cc.Node.EventType.TOUCH_END},e.prototype.ON_TOUCH_MOVE=function(){this.touchType==cc.Node.EventType.TOUCH_MOVE||u.default.Instance.getMoveStrength()<5||(this.touchType=cc.Node.EventType.TOUCH_MOVE,this.isTouchRight(),this.isMoveUp(),this.inputState=c.up)},e.prototype.ON_TOUCH_START=function(){this.touchType=cc.Node.EventType.TOUCH_START},e.prototype.onDestroy=function(){this.removeIptListen()},e.prototype.removeIptListen=function(){p.default.Instance.remove_event_listenner(cc.Node.EventType.TOUCH_START,this,this.ON_TOUCH_START),p.default.Instance.remove_event_listenner(cc.Node.EventType.TOUCH_MOVE,this,this.ON_TOUCH_MOVE),p.default.Instance.remove_event_listenner(cc.Node.EventType.TOUCH_END,this,this.ON_TOUCH_END),p.default.Instance.remove_event_listenner(cc.Node.EventType.TOUCH_CANCEL,this,this.ON_TOUCH_END),p.default.Instance.remove_event_listenner(l.GameEvent.DebugSDKInput,this,this.OnDebugSDKInput),p.default.Instance.remove_event_listenner(l.GameEvent.MonsterDie,this,this.OnMonsterDie),p.default.Instance.remove_event_listenner(l.GameEvent.SDK_UI_IPT,this,this.ON_SDK_UI_IPT)},e.prototype.isTouchRight=function(){return this.getTouchSide()>0},e.prototype.getTouchSide=function(){var t=u.default.Instance.WPos.x-this.wPos.x;return Math.abs(t)<50?0:t<0?-1:1},e.prototype.isMoveUp=function(){return u.default.Instance.getMoveDir()<0},e.prototype.inputStateChange=function(t,e){var n=this;if(e!=c.down&&e!=c.up||(f.default.Ins.TryGuideStep(3)?(f.default.Ins.BallonGuide.showTop(!1),f.default.Ins.BallonGuide.showBottom(!1),p.default.Instance.dispatch_event(l.GameEvent.GuideStepWolfStop,!1),f.default.Ins.SetGuideSteping(3),f.default.Ins.SetGuideIptPermit(c.down,c.up,c.leftClick,c.rightClick)):f.default.Ins.TryGuideStep(4)?(f.default.Ins.BallonGuide.showTop(!1),p.default.Instance.dispatch_event(l.GameEvent.GuideStepWolfStop,!1),f.default.Ins.SetGuideSteping(4)):f.default.Ins.TryGuideStep(5)&&(f.default.Ins.BallonGuide.showTop(!1),p.default.Instance.dispatch_event(l.GameEvent.GuideStepWolfStop,!1),f.default.Ins.GuideStepEnd(5),p.default.Instance.dispatch_event(l.GameEvent.GuideState,!1))),this.error("\u8f93\u5165\u72b6\u6001\u66f4\u65b0-> oldIpt: "+t+" newIpt: "+e),e!=c.none){var o=this.isHeroLeftDir;switch(this.heroSate!=s.jump&&(o=f.default.Ins.SDKOpen?e==c.leftClick||e==c.leftDown:e==c.leftClick||e==c.leftDown||e==c.up),e!=c.up&&e!=c.down||(o=this.isHeroLeftDir),this.isHeroLeftDir=o,e){case c.leftClick:case c.rightClick:var i=function(){return e==n.superSkillIptState||n.superSkillIptState!=c.leftClick&&n.superSkillIptState!=c.rightClick?(n.superSkillComb=1,!1):++n.superSkillComb>=4&&n.Rage>=n.maxRage?(n.heroSate=s.jump,!0):(n.timer_out_superSkill&&Ticker.unregisterDelay(n.timer_out_superSkill),n.timer_out_superSkill=Ticker.registerDelay(function(){n.superSkillComb=0},3e3),!1)};this.heroSate==s.stand?i()||(this.heroSate=s.stand):this.heroSate==s.dun?i()||(this.heroSate=s.stand):this.heroSate==s.jump&&(this.heroSate=s.jump);break;case c.leftDown:case c.rightDown:case c.down:n.superSkillComb=0,this.heroSate==s.stand?this.heroSate=s.dun:this.heroSate==s.dun?this.heroSate=s.dun:this.heroSate==s.jump&&(this.heroSate=s.jump);break;case c.up:n.superSkillComb=0,this.heroSate==s.stand?this.heroSate=s.jump:this.heroSate==s.dun?this.heroSate=s.jump:this.heroSate==s.jump&&(this.heroSate=s.jump)}this.node.scaleX=o?-1:1,this.superSkillIptState=e,this.inputState=c.none}},e.prototype.heroStateChange=function(t,e){switch(this.warn("\u82f1\u96c4\u72b6\u6001\u66f4\u65b0-> oldState: "+t+" newState: "+e),e){case s.die:this.onDieState(t);break;case s.dun:this.onDunState(t);break;case s.jump:this.onJumpState(t);break;case s.stand:this.onStandState(t)}},e.prototype.onStandState=function(t){var e=a.idle;this.log("onStandState oldState:"+t+" inputState:"+this.inputState),this.inputState==c.leftClick||this.inputState==c.rightClick?t==s.dun?this.isHoldWeapon?(e=a.weapon_atk,this.weaponAtk()):e=a.dun_hookAtk:t==s.stand&&(this.log("\u5373\u5c06\u64ad\u653e\u653b\u51fb\u52a8\u753b \u7ad9\uff1a "+this.standAtkCombo),this.comTimerID&&Ticker.unregisterDelay(this.comTimerID),0==this.standAtkCombo?e=a.attack1:1==this.standAtkCombo?e=a.attack2:2==this.standAtkCombo?e=a.attack3:3==this.standAtkCombo&&(e=a.attack4),this.isHoldWeapon&&(e=a.weapon_atk,this.weaponAtk())):this.isHoldWeapon&&(e=a.weapon_hold,this.setWeaponShow(!0)),this.setAnima(e)},e.prototype.onDunState=function(t){var e=a.dun;this.log("onDunState oldState:"+t+" inputState:"+this.inputState),this.inputState==c.leftClick||this.inputState==c.rightClick||(this.inputState==c.leftDown||this.inputState==c.rightDown||this.inputState==c.down?e=a.dun_atk1:(this.inputState,c.up)),this.setWeaponShow(!1),this.setAnima(e)},e.prototype.onJumpState=function(t){var e=a.jump;if(!this.jump_up_atk_ing){if(this.log("onJumpState oldState:"+t+" inputState:"+this.inputState),t==s.dun||t==s.stand){if(this.jump_up_atk_count>0)return;this.jump_up_atk_ing=!0,this.jump_up_atk_count++,this.superSkillComb>=4?(this.Rage=0,this.superSkillComb=0,e=a.superSkill,p.default.Instance.dispatch_event(l.GameEvent.SCRENN_COLOR),setTimeout(function(){p.default.Instance.dispatch_event(l.GameEvent.HeroSuperSkill),m.default.Instance.play_effect("\u5c0f\u7f8a\u5927\u62db"),p.default.Instance.dispatch_event(l.GameEvent.SDK_SHAKE,600)},400)):(e=a.jump_up_atk_sdk,this.rigidLineVelocity(0,900))}else this.inputState==c.leftDown||this.inputState==c.rightDown||(this.inputState,c.down);this.setWeaponShow(!1),this.setAnima(e)}},e.prototype.onDieState=function(t){t!=s.die&&(this.setAnima(a.die),this.setWeaponShow(!1),p.default.Instance.dispatch_event(l.GameEvent.HeroDie))},e.prototype.setAnima=function(t){t&&this.annima!=t&&(this.annima=t,this.log("\u5f53\u524d\u64ad\u653e\u52a8\u753b:"+t),t==a.jump_up_atk_sdk?m.default.Instance.play_effect("\u5c0f\u7f8a\u8df3\u8dc3"):t==a.dun_atk1?m.default.Instance.play_effect("\u5c0f\u7f8a\u8e72\u4e0b"):t==a.dun_hookAtk||t==a.attack1||t==a.weapon_atk?m.default.Instance.play_effect("\u653b\u51fb1"):t==a.attack2?m.default.Instance.play_effect("\u653b\u51fb2"):t==a.attack3?m.default.Instance.play_effect("\u653b\u51fb3"):t==a.attack4?m.default.Instance.play_effect("\u653b\u51fb4"):a.superSkill,t==a.jump||t==a.jump_up_atk_sdk?this.heroHit.jumpCollider():t==a.dun||t==a.dun_atk1?this.heroHit.dunCollider():t==a.superSkill?this.heroHit.superSkillCollider():this.heroHit.standCollider(),t==a.dun_atk1&&(this.isDunAtking=!0),this.heroAni.play(t))},e.prototype.onAnimationFinish=function(t,e){var n=this,o=e.name;this.isDunAtking=!1,this.log("\u52a8\u753b\u7ed3\u675f:"+o+" standAtkCombo:"+this.standAtkCombo,!0),o==a.attack1||o==a.attack2||o==a.attack3||o==a.attack4?(this.heroSate=s.stand,this.standAtkCombo=(this.standAtkCombo+1)%4,this.comTimerID=Ticker.registerDelay(function(){n.heroSate==s.stand&&(n.heroSate=s.stand),n.standAtkCombo=0},1e3)):o==a.dun_atk1?this.heroSate=s.dun:(o!=a.jump_up_atk_sdk&&o!=a.superSkill||(this.jump_up_atk_ing=!1),this.heroSate=this.heroSate)},e.prototype.onBeginContact=function(t,e,n){"ground"==n.node.group&&this.heroSate==s.jump&&(this.log("onBeginContact jump:"+this.annima),this.annima==a.dun?this.heroSate=s.dun:this.annima==a.jump&&(this.heroSate=s.stand),this.annima!=a.superSkill&&(this.jump_up_atk_ing=!1,this.jump_up_atk_count=0))},e.prototype.OnHurt=function(t,e){if(void 0===e&&(e=null),this.heroSate==s.die||this.heroSate==s.jump)return!1;if(e){var n;n=this.isFaceLeft?t?100:-100:t?-100:100;var o=this.node.convertToWorldSpaceAR(cc.v2(n,150));e.Drop(o)}if(m.default.Instance.play_effect("\u5c0f\u732a\u53d7\u653b"),0==--this.Hp)f.default.Ins.IsGuide?this.Hp=1:(this.node.scaleX=t?-1:1,this.heroSate=s.die,this.removeIptListen());else{if(this.heroSate!=s.dun){var i;i=this.isFaceLeft?t?a.hurt_left:a.hurt_right:t?a.hurt_right:a.hurt_left,this.setAnima(i)}this.Rage++}return this.Hp<0&&(this.Hp=0),this.hurtTag.play(t),p.default.Instance.dispatch_event(l.GameEvent.SDK_SHAKE,400),p.default.Instance.dispatch_event(l.GameEvent.HERO_HURT,1),!0},e.prototype.forceDie=function(){m.default.Instance.play_effect("\u5c0f\u732a\u53d7\u653b"),this.heroSate=s.die,this.removeIptListen()},e.prototype.AtkWeapon=function(t){return!(!this.isHoldWeapon||this.weapon.WeaponType!=g.WeaponType.hold||(t.heroAtkWeapon(this.WPos.x=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,a=s.ccclass,c=s.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.anim=null,e.sheepTags=[],e.wolfTags=[],e}return i(e,t),e.prototype.init=function(t){void 0===t&&(t=!1),this.isSheep=t,this.node.setScale(0,0)},e.prototype.play=function(t){var e;e=this.isSheep?this.sheepTags[Util.random(0,this.sheepTags.length-1,!0)]:this.wolfTags[Util.random(0,this.wolfTags.length-1,!0)],this.getComponent(cc.Sprite).spriteFrame=e;var n=Util.random(30,60),o=Util.random(70,110);this.node.parent.scaleX<0&&(t=!t),n=t?-n:n,this.node.position=cc.v3(n,o,0),this.anim.play()},r([c(cc.Animation)],e.prototype,"anim",void 0),r([c([cc.SpriteFrame])],e.prototype,"sheepTags",void 0),r([c([cc.SpriteFrame])],e.prototype,"wolfTags",void 0),r([a],e)}(cc.Component);n.default=u,cc._RF.pop()},{}],Main:[function(t,e,n){"use strict";cc._RF.push(e,"7743cAKtSdCEJzW3TPoC7lG","Main");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../help/SaveUtil"),a=t("../sdk/sdkIptCom"),c=t("../view/ballonGuide"),u=t("../view/gameView"),p=t("../view/guideView"),l=t("../view/mainView"),h=t("../view/resultView"),d=t("./EventMgr"),f=t("./GameEvent"),_=t("./GameMode"),y=t("./GameState"),m=t("./Hero"),g=t("./MapEnvirment"),v=t("./MonsterBase"),S=t("./ResMgr"),b=t("./SoundMgr"),w=t("../game/sdk"),M=t("../view/loadingView"),O={Sounds:{assetType:cc.AudioClip,urls:["\u5c0f\u732aBGM","\u5c0f\u732a\u53d7\u653b","\u653b\u51fb1","\u653b\u51fb2","\u653b\u51fb3","\u653b\u51fb4","\u72fc\u6b7b\u4ea1","\u7ed3\u675f\u97f3\u6548","\u98de\u5200\u51fb\u4e2d\u72fc","\u5c0f\u7f8a\u5927\u62db","\u5c0f\u7f8a\u8df3\u8dc3","\u5c0f\u7f8a\u8e72\u4e0b"]},LifePrefab:{assetType:cc.Prefab,urls:["wolf1","wolf2","wolf3","wolf10","wolf20","wolf21","wolf22","wolfRush","wolfDoctor","hurtTag"]}},I=cc._decorator,T=I.ccclass,D=I.property,R=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.loading=null,e.map=null,e.heroPrefab=null,e.hero=null,e.lifeRoot=null,e.tmpMainViewHero=null,e.bornPosNodeLeft=null,e.bornPosNodeRight=null,e.enemyCount=0,e.tt=0,e.mode=_.GameMode.normal,e.state=y.GameState.inMain,e.mainView=null,e.gameView=null,e.resultView=null,e.guideView=null,e.ballonGuide=null,e.sdkOpen=!1,e.ground=null,e._isNewBestKill=!1,e.enermyNames=["wolf1","wolf2","wolf3","wolf10","wolf20","wolf21","wolf22","wolfRush","wolfDoctor"],e.guideStep=0,e.guideIptPermit=[],e.endStep=0,e.round=0,e.endlessEnemyCount=10,e.leftEndlessSec=0,e.initEndlessTime=32,e.curBornCount=0,e.endlessRecordScore=0,e.killNum=0,e._score=0,e._bestScore=-1,e}var n;return i(e,t),n=e,Object.defineProperty(e.prototype,"bornPosLeft",{get:function(){return this.bornPosNodeLeft.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bornPosRigth",{get:function(){return this.bornPosNodeRight.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enemyAmount",{get:function(){return this.mode==_.GameMode.normal?5:9},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"EnemyCount",{get:function(){return this.enemyCount},set:function(t){t<0?t=0:t>this.enemyAmount&&(t=this.enemyAmount),this.enemyCount=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Mode",{get:function(){return this.mode},set:function(t){this.mode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"State",{get:function(){return this.state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"MainView",{get:function(){return this.mainView.node},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BallonGuide",{get:function(){return this.ballonGuide},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"IsGuide",{get:function(){return"0"==s.SaveUtil.get("guide","0")},set:function(t){s.SaveUtil.save("guide",t?"0":"1")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"heroHp",{get:function(){return this.Mode==_.GameMode.normal?10:Number.MAX_SAFE_INTEGER},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SDKOpen",{get:function(){return this.sdkOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groudPosY",{get:function(){return this.ground.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"IsNewBestKill",{get:function(){return this._isNewBestKill},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){null===n.Ins?(n.Ins=this,cc.game.setFrameRate(30),Ticker.start((new Date).getTime()),cc.director.getCollisionManager().enabled=!0,cc.director.getCollisionManager().enabledDebugDraw=!1,cc.director.getPhysicsManager().enabled=!0,cc.director.getPhysicsManager().enabledAccumulator=!0,cc.director.getPhysicsManager().gravity=cc.v2(0,GameConst.Gravity),this.node.addComponent(b.default),Ticker.register(this.tickFun,this),this.loading.node.active=!0,this.loading.ShowProgress()):this.destroy()},e.prototype.ShowMainView=function(t){void 0===t&&(t=!0),d.default.Instance.dispatch_event(f.GameEvent.sdkActionTip,[new ActionTipData(!0,"\u666e\u901a\u6a21\u5f0f"),new ActionTipData(!1,"\u65e0\u5c3d\u6a21\u5f0f")]),Ticker.unregisterDelay(this.timer_itv_normal),Ticker.unregistCount(this.timer_itv_endless),this.lifeRoot.active=!0,this.lifeRoot.destroyAllChildren(),this.tmpMainViewHero.active=!0,this.mainView.ShowMainGame(),this.gameView.Hide(),this.ballonGuide.setShow(!1),this.resultView.Hide(),this.state=y.GameState.inMain,t&&this.map.changeMap()},e.prototype.PlayGame=function(){if(d.default.Instance.dispatch_event(f.GameEvent.sdkActionTip,[new ActionTipData(!0,"\u6682\u505c")]),w.SDK.onGameStart(),this.mainView.Hide(),Ticker.resume(),this._isNewBestKill=!1,this._score=0,this.tmpMainViewHero.active=!1,this.lifeRoot.destroyAllChildren(),this.lifeRoot.active=!0,this.EnemyCount=0,this.gameView.Show(),this.gameView.Init(this.heroHp),this.createHero(),this.IsGuide)return this.guideStep=0,this.guideSteping=0,this.endStep=0,this.BallonGuide.node.setPosition(0,this.groudPosY),this.BallonGuide.init(),this.state=y.GameState.inGuide,this.Guide1(),void d.default.Instance.dispatch_event(f.GameEvent.GuideState,!0);this.state=y.GameState.inGame,this.Mode==_.GameMode.normal?this.normalGame():this.endlessGame()},Object.defineProperty(e.prototype,"GuideStep",{get:function(){return this.guideStep},enumerable:!1,configurable:!0}),e.prototype.Guide1=function(){var t=this;this.guideStep=1,this.guideLog("\u5f00\u59cb\u5f15\u5bfc-1"),Ticker.registerDelay(function(){t.guideView.show("\u5de6\u3001\u53f3\u8e29\u5411\u4e24\u4fa7\u53d1\u52a8\u653b\u51fb",2,function(){t.creatWolf(t.enermyNames[0],!1)}.bind(t))},10)},e.prototype.Guide2=function(){this.guideStep=2,this.guideLog("\u5f00\u59cb\u5f15\u5bfc-2"),this.creatWolf(this.enermyNames[0],!0)},e.prototype.Guide3=function(){this.guideStep=3,this.guideLog("\u5f00\u59cb\u5f15\u5bfc-3"),this.creatWolf(this.enermyNames[4],!1)},e.prototype.Guide4=function(){this.guideStep=4,this.guideLog("\u5f00\u59cb\u5f15\u5bfc-4"),this.creatWolf(this.enermyNames[7],!1)},e.prototype.Guide5=function(){var t=this;this.guideStep=5,this.guideLog("\u5f00\u59cb\u5f15\u5bfc-4"),t.creatWolf(this.enermyNames[8],!0),Ticker.registerDelay(function(){t.creatWolf(t.enermyNames[8],!1)},1e3),Ticker.registerDelay(function(){t.creatWolf(t.enermyNames[0],!0)},1500),Ticker.registerDelay(function(){t.creatWolf(t.enermyNames[1],!1)},1800)},e.prototype.HasGuideIptPermit=function(t){return!this.IsGuide||t==m.GameInput.none||this.guideIptPermit&&-1!=this.guideIptPermit.indexOf(t)},e.prototype.SetGuideIptPermit=function(){for(var t=[],e=0;e=5&&(this.IsGuide=!1,this.state=y.GameState.inGame,this.normalGame())},e.prototype.TryGuideStep=function(t){return!!this.IsGuide&&this.endStep==t-1},Object.defineProperty(e.prototype,"GuideSteping",{get:function(){return this.guideSteping},enumerable:!1,configurable:!0}),e.prototype.SetGuideSteping=function(t){this.guideSteping=t},e.prototype.HasEndStep=function(t){return t<=this.endStep},e.prototype.ReturnPlayGame=function(){d.default.Instance.dispatch_event(f.GameEvent.sdkActionTip,[new ActionTipData(!0,"\u6682\u505c")]),Ticker.resume(),this.state=y.GameState.inGame,this.lifeRoot.active=!0,this.gameView.Show()},e.prototype.PauseGameView=function(){d.default.Instance.dispatch_event(f.GameEvent.sdkActionTip,[new ActionTipData(!0,"\u8fd4\u56de\u5927\u5385"),new ActionTipData(!1,"\u7ee7\u7eed\u6e38\u620f")]),Ticker.pause(),this.lifeRoot.active=!1,this.mainView.ShowPauseGame()},e.prototype.start=function(){var t=this;d.default.Instance.add_event_listenner(f.GameEvent.HeroDie,this,this.OnHeroDie),d.default.Instance.add_event_listenner(f.GameEvent.MonsterDie,this,this.OnMonsterDie),d.default.Instance.add_event_listenner(f.GameEvent.HERO_HURT,this,this.ON_HERO_HURT),t.ShowMainView(!1),S.default.Instance.preloadResPackage(O,this.onResLoadProgress.bind(this),function(){t.loading.node.active=!1,b.default.Instance.play_main_music("\u5c0f\u732aBGM",!0),t.node.addComponent(a.default)}.bind(this))},e.prototype.onResLoadProgress=function(t,e){var n=t/e;n=(n=n<0?0:n)>1?1:n,this.loading.UpdateProgress(n)},e.prototype.tickFun=function(t){this.state==y.GameState.inGame&&(this.tt+=t,this.tt>2&&(this.checkEnemyCount(),this.tt=0))},e.prototype.createHero=function(){var t=cc.instantiate(this.heroPrefab);this.hero=t.getComponent(m.default),t.setPosition(0,this.groudPosY),this.lifeRoot.addChild(t),this.hero.init(this.heroHp)},Object.defineProperty(e.prototype,"Round",{get:function(){return this.round},set:function(t){this.round=t},enumerable:!1,configurable:!0}),e.prototype.normalGame=function(){var t=this;this.Round=0;var e=function(){t.guideLog("\u6bcf\u969430\u79d2\u5237\u4e00\u6ce2\u72fc:"+t.Round),1==++t.Round?t.waitBornWolfArr=[0,0,0,4,5]:2==t.Round?t.waitBornWolfArr=[0,0,1,1,2,4,5,6]:t.waitBornWolfArr=[0,0,1,1,2,3,4,5,6,7,8]};e(),Ticker.unregisterDelay(this.timer_itv_normal),this.timer_itv_normal=Ticker.registerDelay(function(){e()},3e4,0)},Object.defineProperty(e.prototype,"EndlessEnemyCount",{get:function(){return 10+Math.floor((this.round-1)/2)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"EndlessTime",{get:function(){return this.initEndlessTime+this.leftEndlessSec},enumerable:!1,configurable:!0}),e.prototype.endlessGame=function(){this.Round=0,this.Score=0,this.leftEndlessSec=0,this.EndlessRecordScore=0,this.startNewEndlessRound()},e.prototype.startNewEndlessRound=function(){var t=this;t.endlessEnemyCount=0,t.Round++,1==t.Round?t.waitBornWolfArr=[0,0,0,1,1,4,5,6]:2==t.Round?t.waitBornWolfArr=[0,1,1,2,3,4,5,6,7]:3==t.Round?t.waitBornWolfArr=[0,1,1,2,3,3,4,4,5,6,7]:4==t.Round?t.waitBornWolfArr=[0,1,2,3,3,4,4,5,5,6,6,7,7]:t.Round<6?t.waitBornWolfArr=[0,1,2,3,3,4,4,5,5,6,6,7,7,7]:t.Round<8?t.waitBornWolfArr=[0,1,2,3,3,4,4,5,5,5,6,6,6,7,7,7,7]:t.Round<11?t.waitBornWolfArr=[0,1,2,3,3,4,4,5,5,5,6,6,6,7,7,7,7,7]:t.Round<14?t.waitBornWolfArr=[1,2,3,3,4,4,5,5,5,5,6,6,6,7,7,7,7,7,7]:t.Round<20?t.waitBornWolfArr=[2,3,3,3,4,4,4,5,5,5,5,6,6,6,7,7,7,7,7,7,7]:t.Round<25?t.waitBornWolfArr=[3,3,3,3,4,4,4,5,5,5,5,6,6,6,7,7,7,7,7,7,7,7]:t.Round<50&&(t.waitBornWolfArr=[3,3,3,3,5,5,5,5,6,6,6,7,7,7,7,7,7,7,7,7,7,7]),d.default.Instance.dispatch_event(f.GameEvent.EndlessGameNewRound,this.Round),Ticker.registerDelay(function(){t.endlessEnemyCount=t.EndlessEnemyCount,t.curBornCount=0,t.killNum=0},1e3,1),this.timer_itv_endless&&Ticker.unregistCount(this.timer_itv_endless);var e=t.EndlessTime;t.timer_itv_endless=Ticker.registerCount(function(n){t.leftEndlessSec=e-n,n>=e&&(t.curBornCount=0,t.killNum=0,t.state=y.GameState.fail,t.resultView.Show(),t.gameView.Hide(),t.hero.forceDie())},e)},e.prototype.checkEnemyCount=function(){var t;this.Mode==_.GameMode.normal?this.EnemyCount.5)?this.bornPosLeft:this.bornPosRigth;o.SetInitPos(i,this.groudPosY),n.scaleX=i>0?-1:1,this.lifeRoot.addChild(n)},e.prototype.OnHeroDie=function(){b.default.Instance.play_effect("\u7ed3\u675f\u97f3\u6548"),this.state=y.GameState.fail,this.resultView.Show(),this.gameView.Hide()},e.prototype.OnMonsterDie=function(t,e){this.killNum++,this.Mode==_.GameMode.endless?(this.Score+=e,this.EndlessRecordScore=Math.max(this.endlessRecordScore,this.Score),d.default.Instance.dispatch_event(f.GameEvent.update_endless_wolf_count,this.endlessEnemyCount-this.killNum),this.killNum>=this.endlessEnemyCount&&this.startNewEndlessRound()):this.Score++},Object.defineProperty(e.prototype,"EndlessRecordScore",{get:function(){return this.endlessRecordScore},set:function(t){this.endlessRecordScore=t,this.endlessRecordScore<0&&(this.endlessRecordScore=0),this.endlessRecordScore>this._bestScore&&(this._isNewBestKill=!0,this.BestScore=this.endlessRecordScore)},enumerable:!1,configurable:!0}),e.prototype.ON_HERO_HURT=function(){if(this.Mode==_.GameMode.endless){var t=1+Math.floor((this.round-1)/2);t>5&&(t=5),this.Score-=t}},Object.defineProperty(e.prototype,"Score",{get:function(){return this._score},set:function(t){this._score=t,this._score<0&&(this._score=0),this.gameView.OnMonsterDie(this._score),this.Mode==_.GameMode.normal&&this._score>this._bestScore&&(this._isNewBestKill=!0,this.BestScore=this._score,d.default.Instance.dispatch_event(f.GameEvent.UpdateBestKill))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BestScore",{get:function(){var t=s.SaveUtil.get(this.bestScoreKey,"0");return this._bestScore=parseInt(t),this._bestScore},set:function(t){this._bestScore=t,s.SaveUtil.save(this.bestScoreKey,t.toString())},enumerable:!1,configurable:!0}),e.prototype.getBestScore=function(t){var e=s.SaveUtil.get(this.getBestScoreKey(t),"0");return parseInt(e)},Object.defineProperty(e.prototype,"bestScoreKey",{get:function(){return this.getBestScoreKey(this.Mode)},enumerable:!1,configurable:!0}),e.prototype.getBestScoreKey=function(t){return"BestScore_"+t},e.prototype.onDestroy=function(){Ticker.unregister(this.tickFun,this),d.default.Instance.remove_event_listenner(f.GameEvent.HeroDie,this,this.OnHeroDie),d.default.Instance.remove_event_listenner(f.GameEvent.MonsterDie,this,this.OnMonsterDie),d.default.Instance.remove_event_listenner(f.GameEvent.HERO_HURT,this,this.ON_HERO_HURT)},e.prototype.log=function(){},e.prototype.logWarn=function(){},e.prototype.logErr=function(){},e.prototype.guideLog=function(){},e.prototype.pauseGame=function(){Ticker.pause(),cc.director.pause()},e.prototype.resumeGame=function(){Ticker.resume(),cc.director.resume()},e.prototype.GetSDKGameMode=function(t){return t==_.GameMode.normal?0:1},e.Ins=null,r([D(M.default)],e.prototype,"loading",void 0),r([D(g.default)],e.prototype,"map",void 0),r([D(cc.Prefab)],e.prototype,"heroPrefab",void 0),r([D(cc.Node)],e.prototype,"lifeRoot",void 0),r([D(cc.Node)],e.prototype,"tmpMainViewHero",void 0),r([D(cc.Node)],e.prototype,"bornPosNodeLeft",void 0),r([D(cc.Node)],e.prototype,"bornPosNodeRight",void 0),r([D({type:l.default})],e.prototype,"mainView",void 0),r([D({type:u.default})],e.prototype,"gameView",void 0),r([D({type:h.default})],e.prototype,"resultView",void 0),r([D({type:p.default})],e.prototype,"guideView",void 0),r([D(c.default)],e.prototype,"ballonGuide",void 0),r([D(cc.Boolean)],e.prototype,"sdkOpen",void 0),r([D(cc.Node)],e.prototype,"ground",void 0),n=r([T],e)}(cc.Component);n.default=R,cc._RF.pop()},{"../game/sdk":"sdk","../help/SaveUtil":"SaveUtil","../sdk/sdkIptCom":"sdkIptCom","../view/ballonGuide":"ballonGuide","../view/gameView":"gameView","../view/guideView":"guideView","../view/loadingView":"loadingView","../view/mainView":"mainView","../view/resultView":"resultView","./EventMgr":"EventMgr","./GameEvent":"GameEvent","./GameMode":"GameMode","./GameState":"GameState","./Hero":"Hero","./MapEnvirment":"MapEnvirment","./MonsterBase":"MonsterBase","./ResMgr":"ResMgr","./SoundMgr":"SoundMgr"}],MapEnvirment:[function(t,e,n){"use strict";cc._RF.push(e,"fc498HlngREJq1W2MTKW0Bq","MapEnvirment");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,a=s.ccclass,c=s.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.bgs=[],e.fronts=[],e}return i(e,t),e.prototype.start=function(){this.changeMap(1)},e.prototype.changeMap=function(t){void 0===t&&(t=-1);var e=Util.random(0,this.bgs.length-1,!0);t>=0&&(e=t);for(var n=0;n=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./MonsterBase"),a=cc._decorator,c=a.ccclass,u=(a.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),Object.defineProperty(e.prototype,"initSpeed",{get:function(){return Util.random(200,300)},enumerable:!1,configurable:!0}),e.prototype.init=function(){t.prototype.init.call(this),this.speed=this.initSpeed},r([c],e)}(s.default));n.default=u,cc._RF.pop()},{"./MonsterBase":"MonsterBase"}],Monster2:[function(t,e,n){"use strict";cc._RF.push(e,"cba2fLafuBNHZLaVuHmqGma","Monster2");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./Monster1"),a=t("./MonsterBase"),c=t("./Weapon"),u=cc._decorator,p=u.ccclass,l=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.weaponAtkPosNode=null,e.weaponPrefab=null,e.weaponAtkLPos=cc.v2(100,250),e.prethrowWeapon=!0,e}return i(e,t),Object.defineProperty(e.prototype,"walkAnim",{get:function(){return this._walkAnim},enumerable:!1,configurable:!0}),e.prototype.init=function(){t.prototype.init.call(this),this._walkAnim="walk2",this.speed=Util.random(100,140)},e.prototype.enemyAction=function(){var e=this;t.prototype.enemyAction.call(this);var n=this;n.prethrowWeapon&&this.heroDisAbsolut<.5*cc.view.getVisibleSize().width-150&&(n.prethrowWeapon=!1,this.state=a.MonsterState.none,n.dirX=0,n.setSpeed(),n.throwWeapon(),this.timerId_move=Ticker.registerDelay(function(){n._walkAnim=a.MonsterAnima.walk,n.speed=n.initSpeed,e.state=a.MonsterState.move},150))},e.prototype.throwWeapon=function(){this.setAnima("throwWeapon");var t=cc.instantiate(this.weaponPrefab).getComponent(c.default),e=this.node.convertToWorldSpaceAR(cc.v2(130,120));t.node.parent=this.node.parent;var n=t.node.parent.convertToNodeSpaceAR(e);t.node.group="monsterWeapon",t.node.active=!1,t.node.active=!0,t.node.position=cc.v3(n.x,n.y,0),t.MonstThrow(this.monsteFace==a.MonsterFace.left,this.id)},e.prototype.dropWeapon=function(){if(Math.random()<.3){var t=this.node.convertToWorldSpaceAR(this.weaponAtkLPos),e=cc.instantiate(this.weaponPrefab).getComponent(c.default);e.node.parent=this.node.parent,e.Drop(t)}},e.prototype.moveInScreen=function(){t.prototype.moveInScreen.call(this),this.state!=a.MonsterState.dead&&this.state!=a.MonsterState.win&&Ticker.registerDelay(function(){},800)},e.prototype.onHurt=function(e,n,o,i){Ticker.unregisterDelay(this.timerId_move),t.prototype.onHurt.call(this,e,n,o,i),this.prethrowWeapon||(this.speed=this.initSpeed)},r([l(cc.Node)],e.prototype,"weaponAtkPosNode",void 0),r([l(cc.Prefab)],e.prototype,"weaponPrefab",void 0),r([p],e)}(s.default);n.default=h,cc._RF.pop()},{"./Monster1":"Monster1","./MonsterBase":"MonsterBase","./Weapon":"Weapon"}],MonsterBase:[function(t,e,n){"use strict";cc._RF.push(e,"ac806miAY5C86JvNzZRA+2R","MonsterBase");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0}),n.MonsterFace=n.MonsterAnima=n.MonsterState=void 0;var s,a,c,u=t("./EventMgr"),p=t("./GameEvent"),l=t("./GameState"),h=t("./Hero"),d=t("./HurtTag"),f=t("./Main"),_=t("./MonsterHit"),y=t("./ResMgr"),m=t("./SoundMgr"),g=cc._decorator,v=g.ccclass,S=g.property;(function(t){t.none="none",t.born="born",t.stand="stand",t.move="move",t.attack="attack",t.hurt="hurt",t.dead="dead",t.win="win"})(s=n.MonsterState||(n.MonsterState={})),function(t){t.walk="walk",t.attack1="atk",t.hurt="hurt",t.hurtDizzy="wolfHurtDizzy",t.dead="die",t.win="win"}(a=n.MonsterAnima||(n.MonsterAnima={})),function(t){t.left="left",t.right="right"}(c=n.MonsterFace||(n.MonsterFace={}));var b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.weaponAttach=null,e.hp=5,e.baseScore=0,e.dirX=0,e._enemySate=null,e.anim=null,e.animName=null,e.lv=null,e.tt=0,e.lifeTime=0,e.atkLifeTime=0,e.hero=null,e.isDestroy=!1,e.speed=150,e.nearSpeed=140,e.time=0,e.isStop=!1,e}return i(e,t),Object.defineProperty(e.prototype,"state",{get:function(){return this._enemySate},set:function(t){this._enemySate=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"WPos",{get:function(){return this.node.convertToWorldSpaceAR(cc.Vec2.ZERO)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"walkAnim",{get:function(){return a.walk},enumerable:!1,configurable:!0}),e.prototype.SetInitPos=function(t,e){this.node.setPosition(cc.v2(t,e))},e.prototype.onLoad=function(){var t=this;t.state=s.none,t.node.active=!1,t.isInvincible=!0,this.nearSpeed=Util.random(130,150),t.node.active=!0,t.init(),u.default.Instance.add_event_listenner(p.GameEvent.HeroDie,this,this.OnHeroDie),u.default.Instance.add_event_listenner(p.GameEvent.HeroSuperSkill,this,this.OnHeroSuperSkill),Ticker.register(this.tickFun,this),f.default.Ins.IsGuide&&u.default.Instance.add_event_listenner(p.GameEvent.GuideStepWolfStop,this,this.OnGuideStepWolfStop)},e.prototype.OnGuideStepWolfStop=function(t,e){f.default.Ins.guideLog("\u662f\u5426\u51b7\u51bb:"+e),e?this.stopMove():this.repuseMove()},e.prototype.init=function(){this._id=this.node.uuid,this.state=s.move,this.animName=this.walkAnim,this.hero=f.default.Ins.hero,this.anim=this.node.getChildByName("body").getComponent(cc.Animation),this.hitCom=this.node.getChildByName("body").getComponent(_.default),this.faceHero(),this.anim.on(cc.Animation.EventType.FINISHED,this.onFinishAnima,this),this.rigidBody=this.node.getComponent(cc.RigidBody);var t=cc.instantiate(y.default.Instance.getAsset("LifePrefab","hurtTag"));t.parent=this.node,this.hurtTag=t.getComponent(d.default),this.hurtTag.init(!1)},e.prototype.OnHeroSuperSkill=function(){this.hurt(Math.random()>.5,!0,!1,!0)},e.prototype.OnHeroDie=function(){this.logErr(" enemy =\u82f1\u96c4\u6b7b\u4e86"),this.state!=s.dead&&(this.state=s.win,this.node&&(this.dirX=0,this.setSpeed(),this.setAnima(a.win)))},e.prototype.onDestroy=function(){this.removeListerner()},e.prototype.onFinishAnima=function(t,e){var n=e.name;this.logErr("\u52a8\u753b\u7ed3\u675f:"+n),n==a.attack1&&(this.state=s.move,this.animName=null)},e.prototype.tickFun=function(t){this.isStop||f.default.Ins.State!=l.GameState.inGame&&f.default.Ins.State!=l.GameState.inGuide||this.state!=s.none&&0!=this.hp&&this.state!=s.win&&(this.lifeTime+=t,this.updateAction(t))},e.prototype.updateAction=function(t){this.tt+=t,this.tt>=.1&&(this.state==s.move||this.state==s.stand)&&(this.enemyAction(),this.tt=0),this.state==s.move?this.onMove():this.state==s.attack?this.onAttack():this.state==s.stand&&this.onStand()},Object.defineProperty(e.prototype,"heroDist",{get:function(){var t=this.hero.node.position,e=this.node.position;return t.x-e.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"heroDisAbsolut",{get:function(){return Math.abs(this.heroDist)},enumerable:!1,configurable:!0}),e.prototype.faceHero=function(){var t=Math.abs(this.node.scaleX);this.monsteFace==c.left?this.node.scaleX=-t:this.node.scaleX=t},e.prototype.moveToHero=function(){},e.prototype.enemyAction=function(){var t=this.heroDist;if(this.monsteFace=t>0?c.right:c.left,Math.abs(t)<=130){if(this.dirX=0,this.setSpeed(),f.default.Ins.TryGuideStep(1)||f.default.Ins.TryGuideStep(2))return f.default.Ins.guideLog("\u5f00\u59cb\u5f15\u5bfc-2"),u.default.Instance.dispatch_event(p.GameEvent.GuideStepWolfStop,!0),void(f.default.Ins.TryGuideStep(1)?(f.default.Ins.BallonGuide.showRight(!0),f.default.Ins.SetGuideIptPermit(h.GameInput.rightClick)):f.default.Ins.TryGuideStep(2)&&(f.default.Ins.BallonGuide.showLeft(!0),f.default.Ins.SetGuideIptPermit(h.GameInput.leftClick)));Math.random()>.8&&this.lifeTime-this.atkLifeTime>1.5?(this.state=s.attack,this.atkLifeTime=this.lifeTime):this.state=s.stand}else this.state=s.move},e.prototype.onMove=function(){if(!this.isStop){var t=Math.abs(this.node.getChildByName("body").scaleX),e=this.animName;this.monsteFace==c.left?(this.dirX=-1,this.node.scaleX=-t,e=this.walkAnim):(this.dirX=1,this.node.scaleX=t,e=this.walkAnim),this.heroDisAbsolut<180?this.setSpeed(this.nearSpeed):this.setSpeed(),this.setAnima(e)}},e.prototype.onStand=function(){this.setAnima(this.walkAnim),this.state!=s.stand&&(this.dirX=0,this.setSpeed(),this.setAnima(this.walkAnim))},e.prototype.onAttack=function(){this.dirX=0,this.setSpeed(),Math.random()<.3&&this.setAnima(a.attack1)},e.prototype.setSpeed=function(t){void 0===t&&(t=void 0),this.rigidBody&&(this.lv=this.rigidBody.linearVelocity,this.dirX?this.lv.x=this.dirX*(t||this.speed):this.lv.x=0,this.rigidBody.linearVelocity=this.lv)},e.prototype.setAnima=function(t){this.animName!=a.win&&t&&this.animName!=t&&(this.animName=t,this.logErr("\u5f53\u524d\u64ad\u653e\u52a8\u753b:"+t,!0),this.setShowHurtWeapon(t==this.walkAnim||t==a.attack1),this.anim||this.logErr(this,!0),this.anim.play(t))},e.prototype.setShowHurtWeapon=function(){this.hurtWeapon},e.prototype.hurt=function(t,e,n,o){return!(this.isInvincible&&!o||this.state==s.dead||this.state==s.win||(this.onHurt(t,e,n,o),0))},e.prototype.onHurt=function(t,e,n,o){this.hp--,m.default.Instance.play_effect("\u98de\u5200\u51fb\u4e2d\u72fc"),this.onHurtSpeed(),u.default.Instance.dispatch_event(p.GameEvent.CamShake,300),o&&(this.hp=0),this.hp<=0?this.onHurtDie():this.onHurtStillLive(e,n),this.hurtTag.play(t)},e.prototype.onHurtSpeed=function(){this.dirX=0,this.setSpeed()},e.prototype.onHurtDie=function(){this.logErr("onHurtDie",!0),this.removeListerner(),f.default.Ins.IsGuide||this.dropWeapon(),f.default.Ins.EnemyCount--,this.state=s.dead,this.setAnima(a.dead),m.default.Instance.play_effect("\u72fc\u6b7b\u4ea1"),u.default.Instance.dispatch_event(p.GameEvent.MonsterDie,this.baseScore),this.rigidBody.linearVelocity=cc.v2(this.monsteFace==c.left?200:-200,400),this.logErr("\u602a\u7269\u9500\u6bc1",!0),f.default.Ins.TryGuideStep(1)||f.default.Ins.TryGuideStep(2)?(f.default.Ins.guideLog("\u5f00\u59cb\u5f15\u5bfc-2"),f.default.Ins.SetGuideIptPermit(),f.default.Ins.BallonGuide.showRight(!1),f.default.Ins.BallonGuide.showLeft(!1),f.default.Ins.TryGuideStep(1)?(f.default.Ins.GuideStepEnd(1),f.default.Ins.Guide2()):f.default.Ins.TryGuideStep(2)&&(f.default.Ins.GuideStepEnd(2),f.default.Ins.Guide3())):3==f.default.Ins.GuideStep&&(f.default.Ins.GuideStepEnd(3),f.default.Ins.SetGuideIptPermit(),f.default.Ins.Guide4())},e.prototype.onHurtStillLive=function(t,e){var n=this;this.state=s.hurt,t||e?(Ticker.unregisterDelay(n.timeId_dizzy),this.setAnima(a.hurt),this.rigidBody.linearVelocity=cc.v2(this.monsteFace==c.left?200:-200,400)):(Ticker.unregisterDelay(n.timeId_dizzy),this.setAnima(a.hurtDizzy),n.timeId_dizzy=Ticker.registerDelay(function(){n.state=s.move},300))},e.prototype.hurtWithWeapon=function(t){var e=t.WPos.x,n=this.WPos.x;return!!this.hurt(e=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./HeroHit"),a=t("./MonsterBase"),c=cc._decorator,u=c.ccclass,p=(c.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.enemy=null,e}var n;return i(e,t),n=e,Object.defineProperty(e.prototype,"monster",{get:function(){return this.enemy},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"WPos",{get:function(){return this.enemy.WPos},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this.enemy=this.node.parent.getComponent(a.default)},e.prototype.onCollisionEnter=function(t,e){if(2==e.tag&&"hero"==t.node.group&&1==t.tag){if(0==t.size.width||0==t.size.height)return;var o=t.node.getComponent(s.default).Hero,i=(t.node.getComponent(n),o.WPos.x),r=this.WPos.x;this.monster.hurt(i=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,a=s.ccclass,c=(s.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.abBunds={},e.total=0,e.now=0,e.progressFunc=null,e.endFunc=null,e.nowAb=0,e.totalAb=0,e}var n;return i(e,t),n=e,e.prototype.onLoad=function(){null===n.Instance?n.Instance=this:this.destroy()},e.prototype.loadRes=function(t,e,n){var o=this;t.load(e,n,function(t){o.now++,t&&console.error("load Res "+e+" error: "+t),o.progressFunc&&o.progressFunc(o.now,o.total),o.now>=o.total&&null!==o.endFunc&&o.endFunc()})},e.prototype.getAsset=function(t,e){var n=cc.assetManager.getBundle(t);return null===n?(console.log("[error]: "+t+" AssetsBundle not loaded !!!"),null):n.get(e)},e.prototype.releaseResPackage=function(t){for(var e in t)for(var n=t[e].urls,o=0;o=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/EventMgr"),a=t("../game/GameEvent"),c=cc._decorator,u=c.ccclass,p=(c.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.opacityFrom=0,e.opacityTo=100,e}return i(e,t),e.prototype.start=function(){s.default.Instance.add_event_listenner(a.GameEvent.SCRENN_COLOR,this,this.ON_SCREEN_COLOR)},e.prototype.ON_SCREEN_COLOR=function(){cc.tween(this.node).to(1,{opacity:this.opacityTo}).to(.5,{opacity:this.opacityFrom}).start()},e.prototype.onDestroy=function(){s.default.Instance.remove_event_listenner(a.GameEvent.SCRENN_COLOR,this,this.ON_SCREEN_COLOR)},r([u],e)}(cc.Component));n.default=p,cc._RF.pop()},{"../game/EventMgr":"EventMgr","../game/GameEvent":"GameEvent"}],SoundMgr:[function(t,e,n){"use strict";cc._RF.push(e,"e07f7XgwrdFDJnbbYXRlEy7","SoundMgr");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../help/SaveUtil"),a=t("./ResMgr"),c=cc._decorator,u=c.ccclass,p=(c.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.effect_volume=1,e.music_volume=.9,e.music_as=[],e.effect_as=[],e.curEff_as=0,e.musicMute=!0,e.effMute=!1,e}var n;return i(e,t),n=e,e.prototype.onLoad=function(){null===n.Instance?(n.Instance=this,this.MusicMute="1"==s.SaveUtil.get("music_mute","0"),this.EffMute="1"==s.SaveUtil.get("effect_mute","0"),this.initAudio(8,this.effect_as,this.effect_volume,this.EffMute),this.initAudio(2,this.music_as,this.music_volume,this.MusicMute),this.curEff_as=0):this.destroy()},e.prototype.initAudio=function(t,e,n,o){for(var i=0;i=8&&(this.curEff_as=0),e.clip=a.default.Instance.getAsset("Sounds",t),e.clip?e.play():cc.error("effect audio clip null: ",t)},e.prototype.playClickBtn=function(){this.play_effect("BMButton_click")},e.prototype.getSwitchMusic=function(){return this.EffMute},e.prototype.setPauseMusic=function(){cc.audioEngine.pauseMusic()},e.prototype.setResumeMusic=function(){cc.audioEngine.resumeMusic()},e.prototype.replayMusic=function(){cc.audioEngine.resumeMusic()},e.prototype.setStopMusic=function(t){void 0===t&&(t=!0),cc.audioEngine.stopMusic()},e.Instance=null,n=r([u],e)}(cc.Component));n.default=p,cc._RF.pop()},{"../help/SaveUtil":"SaveUtil","./ResMgr":"ResMgr"}],TickTest:[function(t,e,n){"use strict";cc._RF.push(e,"22a23tjpxFCgrOtMPIorRA0","TickTest");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../scripts/help/DateTime"),a=cc._decorator,c=a.ccclass,u=(a.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.setTimeScale=function(t,e){cc.director.getScheduler().setTimeScale(e)},e.prototype.startTick=function(){Ticker.start((new Date).getTime())},e.prototype.stopTick=function(){Ticker.stop()},e.prototype.pause=function(){Ticker.pause()},e.prototype.repause=function(){Ticker.resume()},e.prototype.startItv=function(){this.removeItv(),this.timerId=Ticker.registerDelay(this.tick.bind(this),1e3)},e.prototype.tick=function(t){console.log(s.default.formatDate()+" tick\uff1a"+t)},e.prototype.removeItv=function(){Ticker.unregisterDelay(this.timerId)},r([c],e)}(cc.Component));n.default=u,cc._RF.pop()},{"../scripts/help/DateTime":"DateTime"}],Tick:[function(t,e){"use strict";cc._RF.push(e,"d270b5PlnpBL7ViK3nEmu6k","Tick");var n=function(){function t(){this._isPause=!1,this._running=!1,this._systemTime=0,this._lastTime=0,this._delay=10,this._tickFuncs=[],this._executeFuncs=[],this._pauseTime=0}return t.prototype._searchIndex=function(t){for(var e=this._executeFuncs,n=0,o=e.length,i=0;n=e[i=Math.floor(n+(o-n)/2)].time?n=i+1:o=i-1;return n},t.prototype._register=function(t,e){for(var n=0;n0&&0==--t.loop)return;var e=this._systemTime+t.delay;this._registerDelay(t.func,t.delay,e,t.loop,t.id,t.count)}}},t.prototype._stop=function(){this._timerId&&(clearTimeout(this._timerId),this._timerId=null),this._running=!1},t.prototype._pause=function(){this._running&&(this._isPause=!0,this._running=!1,this._pauseStartTime=(new Date).getTime())},t.prototype._repause=function(){this._running||(this._isPause=!1,this._running=!0,this._pauseTime+=(new Date).getTime()-this._pauseStartTime,this._update())},t.prototype._registerCount=function(t,e){var n=this,o=0,i=setInterval(function(){n._isPause||(t(++o),o>=e&&clearInterval(i))},1e3);return i},t.prototype._unregistCount=function(t){clearInterval(t)},t.register=function(t,e){return this._ticker._register(t,e)},t.unregister=function(t,e){this._ticker._unregister(t,e)},t.unregisterById=function(t){this._ticker._unregisterById(t)},t.unregisterDelay=function(t){this._ticker._unregisterDelay(t)},t.unregisterAll=function(){this._ticker._unregisterAll()},t.registerDelay=function(t,e,n){void 0===n&&(n=1);var o=this._ticker._systemTime+e,i=Util.GetUUID(6);return this._ticker._registerDelay(t,e,o,n,i,0),i},t.registerTimer=function(t,e){this._ticker._registerTimer(t,e)},t.registerCount=function(t,e){return this._ticker._registerCount(t,e)},t.unregistCount=function(t){this._ticker._unregistCount(t)},t.start=function(t){void 0===t&&(t=0),this._ticker._start(t)},t.stop=function(){this._ticker._stop()},t.pause=function(){this._ticker._pause()},t.resume=function(){this._ticker._repause()},t.tooglePause=function(){this._ticker._isPause?this.resume():this.pause()},Object.defineProperty(t,"isPause",{get:function(){return this._ticker._isPause},enumerable:!1,configurable:!0}),Object.defineProperty(t,"systemTime",{get:function(){return this._ticker._systemTime},enumerable:!1,configurable:!0}),Object.defineProperty(t,"running",{get:function(){return this._ticker._running},enumerable:!1,configurable:!0}),t._ticker=new t,t}();window.Ticker=n,cc._RF.pop()},{}],TouchMgr:[function(t,e,n){"use strict";cc._RF.push(e,"8a2adGTy45Ffp+1o0SFfQmb","TouchMgr");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/EventMgr"),a=cc._decorator,c=a.ccclass,u=a.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.label=null,e}var n;return i(e,t),n=e,Object.defineProperty(e.prototype,"InitTouchX",{get:function(){return this.initTouchX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"InitTouchY",{get:function(){return this.initTouchY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RealTouchX",{get:function(){return this.realTouchX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RealTouchY",{get:function(){return this.realTouchY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"WPos",{get:function(){return this.event.getLocation()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Event",{get:function(){return this.event},enumerable:!1,configurable:!0}),e.prototype.SetActive=function(t){this.node.active=t},e.prototype.getMoveDir=function(){var t=this.initTouchY-this.realTouchY;return Math.floor(t)},e.prototype.getMoveAngel=function(){var t=Math.atan2(this.initTouchY-this.realTouchY,this.initTouchX-this.realTouchX)/Math.PI*180;return Math.floor(t)},e.prototype.getMoveStrength=function(){var t=cc.v2(this.initTouchX-this.realTouchX,this.initTouchY-this.realTouchY).len();return Math.floor(t)},e.prototype.onLoad=function(){var t=this;this.node.active=!0,null===n.Instance?(n.Instance=this,this.node.on(cc.Node.EventType.TOUCH_START,function(e){t.event=e,t.initTouchX=e.getLocationX(),t.initTouchY=e.getLocationY(),t.realTouchX=t.initTouchX,t.realTouchY=t.initTouchY,s.default.Instance.dispatch_event(cc.Node.EventType.TOUCH_START,null)},this),this.node.on(cc.Node.EventType.TOUCH_MOVE,function(e){t.event=e,t.realTouchX=e.getLocationX(),t.realTouchY=e.getLocationY();var n="TOUCH_MOVE->dir:"+t.getMoveDir();t.label.string=n,s.default.Instance.dispatch_event(cc.Node.EventType.TOUCH_MOVE,null)},this),this.node.on(cc.Node.EventType.TOUCH_END,function(e){t.event=e,s.default.Instance.dispatch_event(cc.Node.EventType.TOUCH_END,null)},this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,function(e){t.event=e,s.default.Instance.dispatch_event(cc.Node.EventType.TOUCH_CANCEL,null)},this)):this.destroy()},e.Instance=null,r([u(cc.Label)],e.prototype,"label",void 0),n=r([c],e)}(cc.Component);n.default=p,cc._RF.pop()},{"../game/EventMgr":"EventMgr"}],Util:[function(t,e){"use strict";cc._RF.push(e,"9f2c93Mj6hKd7xqu2B3iNBP","Util");var n=function(){function t(){}return t.random=function(t,e,n){void 0===n&&(n=!0);var o=Math.random()*(e-t)+t;return n?Math.round(o):o},t.randomExclude=function(t,e,n){var o=Math.round(Math.random()*(e-t)+t);return"number"==typeof n?o==n?this.randomExclude(t,e,n):o:-1!=n.indexOf(o)?this.randomExclude(t,e,n):o},t.randomBoolean=function(){return Math.random()>.5},t.randomArr=function(t,e){for(var n=[],o=0;o99999?e=t>99999e3?this.getKxue(t+""):this.getNumStr(Math.floor(t/1e3)+"")+"k":t>=1e4?e=this.getNumStr(t+""):t>1e3&&(e=this.getNumStr(t+"")),e},t.getKxue=function(t){var e=t.length-1;return t[0]+"."+t[1]+t[2]+"E+"+e},t.getNumStr=function(t){var e=t.length-3;0==e&&(e=t.length);for(var n="",o=0;o=60?t>=2592e3?Math.floor(t/2592e3)+"\u6708":t>=86400?Math.floor(t/86400)+"\u5929":t>=3600?Math.floor(t/3600)+"\u5c0f\u65f6":Math.floor(t/60)+"\u5206\u949f":Math.floor(t)+"\u79d2"},t.getCurTime=function(){return Number((.001*(new Date).getTime()).toFixed(0))},t.secondConvertStringTime=function(t){var e;if(t>-1){var n=Math.floor(t/3600),o=Math.floor(t/60)%60,i=t%60;e=n+"\u5c0f\u65f6",o<10&&(e+="0"),e+=o+"\u5206",i<10&&(e+="0"),e+=i.toFixed(0)+"\u79d2"}return e},t.secondConvertTime=function(t){var e="\u683c\u5f0f\u5316\u65f6\u95f4\uff0c\u4f20\u5165\u503c\u9519\u8bef\uff1a"+t;if(t>-1){var n=Math.floor(t/3600),o=Math.floor(t/60)%60,i=t%60;e=n<10?"0"+n+":":n+":",o<10&&(e+="0"),e+=o+":",i<10&&(e+="0"),e+=i.toFixed(0)}return e},t.secondConverDateTime=function(t){var e,n,o=new Date(1e3*t);return e=o.getMinutes()<10?"0"+o.getMinutes():o.getMinutes().toString(),n=o.getSeconds()<10?"0"+o.getSeconds():o.getSeconds().toString(),o.getHours()+":"+e+":"+n},t.timeConvertUnixStamp=function(t){var e=t.split(":")[0],n=t.split(":")[1],o=t.split(":")[2];return Number(3600*e).toString()+Number(60*n).toString()+Number(o).toString()},t.timestampTo_M_D=function(t){var e=new Date(1e3*t);return(e.getMonth()+1).toString()+"\u6708"+e.getDate()+"\u65e5"},t.timestampTo_Y_M_D=function(t){var e=new Date(1e3*t),n=[];return n.push(e.getFullYear()),n.push(e.getMonth()+1),n.push(e.getDate()),n},t.stringExFormat=function(t){for(var e=[],n=1;n=t.length)return t;for(var n=[],o=20*t.length;n.lengthe&&(t=t.slice(0,e)+"..."),t},t.numAdd=function(){for(var t=[],e=0;e=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./Weapon"),a=t("./WeaponType"),c=cc._decorator,u=c.ccclass,p=(c.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.onLoad=function(){t.prototype.onLoad.call(this),this.weaponType=a.WeaponType.hold},Object.defineProperty(e.prototype,"handAnim",{get:function(){return this.weaponType==a.WeaponType.hold?"holdInHero_full":"holdInHero"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropAnim",{get:function(){return this.weaponType==a.WeaponType.hold?"drop_full":"drop"},enumerable:!1,configurable:!0}),r([u],e)}(s.default));n.default=p,cc._RF.pop()},{"./Weapon":"Weapon","./WeaponType":"WeaponType"}],Weapon:[function(t,e,n){"use strict";cc._RF.push(e,"ec5eaTPGlRMI5wewyCnKHgQ","Weapon");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s,a=t("./EventMgr"),c=t("./GameEvent"),u=t("./Hero"),p=t("./HeroHit"),l=t("./Main"),h=t("./MonsterBase"),d=t("./WeaponState"),f=t("./WeaponType"),_=cc._decorator,y=_.ccclass,m=_.property;(function(t){t.holdInHero="holdInHero",t.move="move",t.hitInEnemy="hitInEnemy",t.drop="drop"})(s||(s={}));var g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canAttachTag=null,e.warnTag=null,e.weaponType=f.WeaponType.throw,e.animCom=null,e.rigidBody=null,e.annima=null,e.speed=400,e.playerNode=null,e.IsAttatch=!0,e.isStop=!1,e.tt=0,e.checkSameWolfAtk=!1,e}return i(e,t),Object.defineProperty(e.prototype,"State",{get:function(){return this.state},set:function(t){this.state=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"WeaponType",{get:function(){return this.weaponType},set:function(t){this.weaponType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CanPick",{get:function(){return this.canPick},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"IsSafe",{get:function(){return this.isSafe},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"WPos",{get:function(){return this.node.convertToWorldSpaceAR(cc.Vec2.ZERO)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handAnim",{get:function(){return s.holdInHero.toString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropAnim",{get:function(){return s.drop.toString()},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this.State=d.WeaponState.none,this.node.scale=1.3,a.default.Instance.add_event_listenner(c.GameEvent.HeroSuperSkill,this,this.OnHeroSuperSkill),Ticker.register(this.tickFun,this),l.default.Ins.IsGuide&&a.default.Instance.add_event_listenner(c.GameEvent.GuideStepWolfStop,this,this.OnGuideStepWolfStop)},e.prototype.OnGuideStepWolfStop=function(t,e){e?this.stopMove():this.repuseMove()},e.prototype.stopMove=function(){this.isStop=!0,this.stopGravityScale=this.rigidBody.gravityScale,this.stopSpeed=this.rigidBody.linearVelocity.x,this.rigidBody.linearVelocity=cc.v2(0,0)},e.prototype.repuseMove=function(){this.isStop=!1,this.rigidBody.gravityScale=this.stopGravityScale,this.rigidBody.linearVelocity=cc.v2(this.stopSpeed,0)},e.prototype.OnHeroSuperSkill=function(){this.node.destroy()},e.prototype.onDestroy=function(){this.logErr("\u6b66\u5668 \u9500\u6bc1"),a.default.Instance.remove_event_listenner(c.GameEvent.HeroSuperSkill,this,this.OnHeroSuperSkill),a.default.Instance.remove_event_listenner(c.GameEvent.GuideStepWolfStop,this,this.OnGuideStepWolfStop),Ticker.unregister(this.tickFun,this)},e.prototype.IsHero=function(){return this.State==d.WeaponState.isHeroThrow},Object.defineProperty(e.prototype,"IsMonster",{get:function(){return this.State==d.WeaponState.isMonsterThrow},enumerable:!1,configurable:!0}),e.prototype.tickFun=function(t){if(!this.isStop&&this.IsMonster&&(this.tt+=t,this.tt>.2)){this.tt=0,this.checkSameWolfAtk||(this.moveDir<0&&this.node.position.x<0||this.moveDir>0&&this.node.position.x>0)&&(this.checkSameWolfAtk=!0,this.node.group="heroWeapon",this.node.active=!1,this.node.active=!0);var e=l.default.Ins.hero.node.position,n=Math.abs(e.x-this.node.position.x);n<250&&l.default.Ins.TryGuideStep(3)&&3!=l.default.Ins.GuideSteping&&(l.default.Ins.BallonGuide.showTop(!0,"\u8df3\u8dc3\u8eb2\u907f\u653b\u51fb"),l.default.Ins.BallonGuide.showBottom(!0,"\u8e72\u4e0b\u8eb2\u907f\u653b\u51fb"),a.default.Instance.dispatch_event(c.GameEvent.GuideStepWolfStop,!0),l.default.Ins.SetGuideIptPermit(u.GameInput.up,u.GameInput.down)),this.annima!=this.dropAnim?this.moveDir<0&&this.node.position.x>30||this.moveDir>0&&this.node.position.x<-30?this.dangerShow():this.state!=d.WeaponState.heroHold&&this.safeShow():n<200&&this.canPickShow()}},e.prototype.setAnima=function(t){t&&this.annima!=t&&(this.annima=t,this.log("\u5f53\u524d\u64ad\u653e\u52a8\u753b:"+t),this.animCom.play(t))},e.prototype.Drop=function(t){var e=this;this.SetWPos(t),this.node.group="monsterWeapon",this.node.active=!1,this.node.active=!0,this.canPick=!1,this.isSafe=!1,this.rigidBody.gravityScale=1,this.rigidBody.linearVelocity=cc.v2(0,550),Ticker.registerDelay(function(){e.State=d.WeaponState.drop},500),this.setAnima(this.dropAnim);var n=l.default.Ins.hero.node.position;Math.abs(n.x-this.node.position.x)<200&&this.canPickShow()},e.prototype.onCollisionEnter=function(t,e){if(this.logErr("\u6b66\u5668 onCollisionEnter: "+t.node.group+" self group"+e.node.group,!0),"hero"==t.node.group){if(this.isSafe)return;var n=t.node.getComponent(p.default);if(!n)return;var o=n.node.parent.getComponent(u.default);if(1==t.tag){if(o.AtkWeapon(this))return;if(this.state==d.WeaponState.drop)return void(o.OnHoldWeapon(this)&&(this.setAnima(this.handAnim),this.rigidBody.linearVelocity=cc.v2(0,0),this.rigidBody.gravityScale=0,this.canAttachTag.active=!1,this.warnTag.active=!1))}else this.State==d.WeaponState.isMonsterThrow&&2==t.tag&&n.onHurt(this.WPos.x=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./EventMgr"),a=t("./GameEvent"),c=t("./Hero"),u=t("./Main"),p=t("./Monster1"),l=t("./MonsterBase"),h=cc._decorator,d=h.ccclass,f=(h.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rushSpeed=400,e.isRushState=!0,e}return i(e,t),e.prototype.SetInitPos=function(t,e){this.node.setPosition(cc.v2(t,e+170))},e.prototype.init=function(){t.prototype.init.call(this),this.rigidBody.gravityScale=0,this.speed=Util.random(300,400),this.state=l.MonsterState.move,this.rushCheck()},e.prototype.updateAction=function(){u.default.Ins.TryGuideStep(5)&&this.heroDisAbsolut<100&&(u.default.Ins.BallonGuide.showTop(!0,"\u8df3\u8dc3\u62fe\u53d6\u56de\u590d\u9053\u5177"),u.default.Ins.SetGuideIptPermit(c.GameInput.up),s.default.Instance.dispatch_event(a.GameEvent.GuideStepWolfStop,!0))},e.prototype.onHurt=function(){this.isRushState&&(this.isRushState=!1,this.speed=0,this.setSpeed(),this.hero.Cure(this.anim.node,1),this.node.destroy())},e.prototype.hurtWithWeapon=function(){return!1},e.prototype.onBeginContact=function(e,n,o){t.prototype.onBeginContact.call(this,e,n,o),this.isRushState&&"board"==o.node.group&&this.rushCheck()},e.prototype.rushCheck=function(){var t=this,e=this.heroDist>0?l.MonsterFace.right:l.MonsterFace.left;t.monsteFace=e,t.faceHero(),t.dirX=0,t.setSpeed(),Ticker.registerDelay(function(){t.monsteFace==l.MonsterFace.left?t.dirX=-1:t.dirX=1,t.setSpeed(t.rushSpeed)},500)},e.prototype.removeListerner=function(){t.prototype.removeListerner.call(this)},r([d],e)}(p.default));n.default=f,cc._RF.pop()},{"./EventMgr":"EventMgr","./GameEvent":"GameEvent","./Hero":"Hero","./Main":"Main","./Monster1":"Monster1","./MonsterBase":"MonsterBase"}],WolfRush:[function(t,e,n){"use strict";cc._RF.push(e,"c1eafP6XR5DFrLbtUJ/7s3v","WolfRush");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./EventMgr"),a=t("./GameEvent"),c=t("./GameState"),u=t("./Hero"),p=t("./Main"),l=t("./Monster1"),h=t("./MonsterBase"),d=t("./Weapon"),f=cc._decorator,_=f.ccclass,y=f.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.weaponAtkPosNode=null,e.weaponPrefab=null,e.rushSpeed=400,e.wanderSpeed=100,e.isRushState=!0,e.rushRound=0,e.realVal=0,e.maxVal=5,e.dir=10,e.isBlink=!1,e}return i(e,t),Object.defineProperty(e.prototype,"walkAnim",{get:function(){return this._walkAnim},enumerable:!1,configurable:!0}),e.prototype.init=function(){t.prototype.init.call(this),this._walkAnim=h.MonsterAnima.walk,this._walkAnim="rush",this.speed=this.rushSpeed,this.state=h.MonsterState.move,p.default.Ins.guideLog("rush-init")},e.prototype.start=function(){this.initColor()},e.prototype.updateAction=function(e){this.isRushState?p.default.Ins.TryGuideStep(4)&&4!=p.default.Ins.GuideSteping&&this.heroDisAbsolut<240&&(p.default.Ins.BallonGuide.showTop(!0,"\u8df3\u8dc3\u8eb2\u907f\u653b\u51fb"),p.default.Ins.SetGuideIptPermit(u.GameInput.up),s.default.Instance.dispatch_event(a.GameEvent.GuideStepWolfStop,!0)):t.prototype.updateAction.call(this,e)},e.prototype.onHurtSpeed=function(){this.isRushState||t.prototype.onHurtSpeed.call(this)},e.prototype.onHurtStillLive=function(e,n){this.isRushState?n&&(this.changeToNormal(),t.prototype.onHurtStillLive.call(this,!0,n)):t.prototype.onHurtStillLive.call(this,e,n)},e.prototype.changeToNormal=function(){this.isRushState=!1,this.speed=this.initSpeed,this._walkAnim=h.MonsterAnima.walk,this.setBlink(!1)},e.prototype.dropWeapon=function(){if(this.isRushState){var t=this.DropWPos,e=cc.instantiate(this.weaponPrefab).getComponent(d.default);e.node.parent=this.node.parent,e.Drop(t)}},Object.defineProperty(e.prototype,"DropWPos",{get:function(){return this.node.convertToWorldSpaceAR(cc.v2(100,150))},enumerable:!1,configurable:!0}),e.prototype.onBeginContact=function(e,n,o){t.prototype.onBeginContact.call(this,e,n,o),this.isRushState&&"board"==o.node.group&&(p.default.Ins.guideLog("rush-board"),this.rushRound>=1?p.default.Ins.IsGuide?(p.default.Ins.SetGuideIptPermit(),p.default.Ins.GuideStepEnd(4),p.default.Ins.Guide5(),this.node.destroy()):this.changeToNormal():this.rushCheck())},e.prototype.rushCheck=function(){var t=this;if(p.default.Ins.State!=c.GameState.win&&p.default.Ins.State!=c.GameState.fail){var e=this.heroDist>0?h.MonsterFace.right:h.MonsterFace.left;t.monsteFace=e,t.faceHero(),t.dirX=0,t.setSpeed(),Ticker.unregisterDelay(t.timer_to_rush),t.timer_to_rush=Ticker.registerDelay(function(){t.monsteFace==h.MonsterFace.left?t.dirX=-1:t.dirX=1,t.rushRound++,t.setSpeed(t.rushSpeed)},500)}},e.prototype.OnHeroDie=function(){var t=this;this.setAnima(h.MonsterAnima.walk),Ticker.unregisterDelay(t.timer_to_rush);var e=function(){t.dirX=t.dirX<0?1:-1;var e=Math.abs(t.node.scaleX);t.dirX<0?t.node.scaleX=-e:t.node.scaleX=e,t.setSpeed(t.wanderSpeed)};e(),t.timer_itv_wander=Ticker.registerDelay(function(){e()},Util.random(1e3,3e3),0)},e.prototype.initColor=function(){this.hitCom.node.getComponent(cc.Sprite)&&(this._material=this.hitCom.node.getComponent(cc.Sprite).getMaterial(0),this._material&&(this._material.setProperty("uSize",this.realVal),this._material.setProperty("uGlowColor",cc.color(255,208,75)),Ticker.register(this.blinkTickFun,this),this.setBlink(!0)))},e.prototype.blinkTickFun=function(t){this.isBlink&&(this.realVal+=t*this.dir,(this.realVal>=this.maxVal||this.realVal<=0)&&(this.dir=-this.dir),this._material.setProperty("uSize",this.realVal))},e.prototype.setBlink=function(t){this.isBlink=t,this._material||(this.isBlink=!1),this.isBlink||this._material.setProperty("uSize",0)},e.prototype.onDestroy=function(){t.prototype.onDestroy.call(this),Ticker.unregisterDelay(this.timer_itv_wander),Ticker.unregisterDelay(this.timer_to_rush),Ticker.unregister(this.blinkTickFun,this),t.prototype.onDestroy.call(this)},r([y(cc.Node)],e.prototype,"weaponAtkPosNode",void 0),r([y(cc.Prefab)],e.prototype,"weaponPrefab",void 0),r([_],e)}(l.default);n.default=m,cc._RF.pop()},{"./EventMgr":"EventMgr","./GameEvent":"GameEvent","./GameState":"GameState","./Hero":"Hero","./Main":"Main","./Monster1":"Monster1","./MonsterBase":"MonsterBase","./Weapon":"Weapon"}],ballonGuide:[function(t,e,n){"use strict";cc._RF.push(e,"676e6ysWQlAF79Pwo+HIhYd","ballonGuide");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,a=s.ccclass,c=s.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.left=null,e.right=null,e.top=null,e.bottom=null,e}return i(e,t),e.prototype.init=function(){this.setShow(!0),this.showTop(!1),this.showBottom(!1),this.showLeft(!1),this.showRight(!1)},e.prototype.showTop=function(t,e){void 0===e&&(e=void 0),t&&e&&(this.top.node.getChildByName("lb").getComponent(cc.Label).string=e),this.top.node.active!=t&&(this.top.node.active=t)},e.prototype.showBottom=function(t,e){void 0===e&&(e=void 0),t&&e&&(this.bottom.node.getChildByName("lb").getComponent(cc.Label).string=e),this.bottom.node.active!=t&&(this.bottom.node.active=t)},e.prototype.showLeft=function(t,e){void 0===e&&(e=void 0),t&&e&&(this.left.node.getChildByName("lb").getComponent(cc.Label).string=e),this.left.node.active!=t&&(this.left.node.active=t)},e.prototype.showRight=function(t,e){void 0===e&&(e=void 0),t&&e&&(this.right.node.getChildByName("lb").getComponent(cc.Label).string=e),this.right.node.active!=t&&(this.right.node.active=t)},e.prototype.setShow=function(t){this.node.active=t},r([c(cc.Animation)],e.prototype,"left",void 0),r([c(cc.Animation)],e.prototype,"right",void 0),r([c(cc.Animation)],e.prototype,"top",void 0),r([c(cc.Animation)],e.prototype,"bottom",void 0),r([a],e)}(cc.Component);n.default=u,cc._RF.pop()},{}],endlessRoundPanel:[function(t,e,n){"use strict";cc._RF.push(e,"7f23bxBAARCQbKm6opktD31","endlessRoundPanel");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/EventMgr"),a=t("../game/GameEvent"),c=t("../game/Main"),u=cc._decorator,p=u.ccclass,l=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.lbRound=null,e}return i(e,t),e.prototype.onLoad=function(){s.default.Instance.add_event_listenner(a.GameEvent.EndlessGameNewRound,this,this.OnEndlessGameNewRound),this.node.active=!1},e.prototype.OnEndlessGameNewRound=function(){var t=this;this.lbRound.string="\u7b2c"+c.default.Ins.Round+"\u6ce2",this.node.active=!0,this.node.scaleY=0,cc.tween(this.node).to(.3,{opacity:255,scaleY:1}).delay(1).to(.3,{opacity:0,scaleY:0}).call(function(){t.node.active=!1}).start()},e.prototype.onDestroy=function(){s.default.Instance.remove_event_listenner(a.GameEvent.EndlessGameNewRound,this,this.OnEndlessGameNewRound)},r([l(cc.Label)],e.prototype,"lbRound",void 0),r([p],e)}(cc.Component);n.default=h,cc._RF.pop()},{"../game/EventMgr":"EventMgr","../game/GameEvent":"GameEvent","../game/Main":"Main"}],gameView:[function(t,e,n){"use strict";cc._RF.push(e,"9049fUrL5hOpLSbsFB0K+d+","gameView");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/EventMgr"),a=t("../game/GameEvent"),c=t("../game/GameMode"),u=t("../game/Main"),p=t("../game/SDKIpt"),l=t("./valBar"),h=cc._decorator,d=h.ccclass,f=h.property,_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.btnPause=null,e.lbKillMonsterNum=null,e.lbBest=null,e.endlessNode=null,e.lbRound=null,e.endlessTime=null,e.endlessWolfTitle=null,e.endlessWolfCount=null,e.hpBar=null,e.rageBar=null,e.spHeadStats=[],e.guildTitle=null,e.hasInit=!1,e}return i(e,t),e.prototype.onLoad=function(){this.btnPause.node.on("click",this.onBtnPause,this),this.guildTitle.active=u.default.Ins.IsGuide,s.default.Instance.add_event_listenner(a.GameEvent.GuideState,this,this.onGuideChange)},e.prototype.onGuideChange=function(){this.guildTitle.active=u.default.Ins.IsGuide},e.prototype.ON_SDK_UI_IPT=function(t,e){if(this.node.active&&!u.default.Ins.MainView.active)switch(e){case p.SDKIpt.leftFoot:u.default.Ins.PauseGameView()}},e.prototype.OnEndlessGameNewRound=function(){var t=this;if(u.default.Ins.Mode==c.GameMode.endless){t.lbRound.string="\u7b2c"+u.default.Ins.Round+"\u6ce2";var e=u.default.Ins.EndlessTime;t.endlessTime.string=t.timeShow(e-2),t.endlessWolfCount.string=u.default.Ins.EndlessEnemyCount.toString(),Ticker.unregistCount(this.tiemrId_endless),t.tiemrId_endless=Ticker.registerCount(function(n){n>=2&&(t.endlessTime.string=t.timeShow(e-n))},e)}},e.prototype.timeShow=function(t){var e,n=t-(u.default.Ins.initEndlessTime-2);return n>0?e=""+(t-n)+"+"+n+"":(e=t,e=""+t+""),e},e.prototype.OnHeroSuperSkill=function(){this.rageBar.show(0)},e.prototype.OnUpdateBestKill=function(){this.lbBest.string=u.default.Ins.BestScore.toString()},e.prototype.onBtnPause=function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,p.SDKIpt.leftFoot)},e.prototype.Show=function(){var t=this;this.node.active=!0,s.default.Instance.remove_event_listenner(a.GameEvent.SDK_UI_IPT,t,t.ON_SDK_UI_IPT),Ticker.unregisterDelay(this.tickId_pause_ipt),this.tickId_pause_ipt=Ticker.registerDelay(function(){s.default.Instance.add_event_listenner(a.GameEvent.SDK_UI_IPT,t,t.ON_SDK_UI_IPT)},100),s.default.Instance.add_event_listenner(a.GameEvent.HeroHpChange,this,this.OnHeroHpChange),s.default.Instance.add_event_listenner(a.GameEvent.HeroRageChange,this,this.OnHeroRageChange),s.default.Instance.add_event_listenner(a.GameEvent.UpdateBestKill,this,this.OnUpdateBestKill),s.default.Instance.add_event_listenner(a.GameEvent.HeroSuperSkill,this,this.OnHeroSuperSkill),s.default.Instance.add_event_listenner(a.GameEvent.EndlessGameNewRound,this,this.OnEndlessGameNewRound),s.default.Instance.add_event_listenner(a.GameEvent.update_endless_wolf_count,this,this.on_update_endless_wolf_count)},e.prototype.on_update_endless_wolf_count=function(t,e){this.endlessWolfCount.string=e.toString()},e.prototype.Hide=function(){this.node.active=!1,Ticker.unregisterDelay(this.tiemrId_endless),s.default.Instance.remove_event_listenner(a.GameEvent.HeroHpChange,this,this.OnHeroHpChange),s.default.Instance.remove_event_listenner(a.GameEvent.HeroRageChange,this,this.OnHeroRageChange),s.default.Instance.remove_event_listenner(a.GameEvent.UpdateBestKill,this,this.OnUpdateBestKill),s.default.Instance.remove_event_listenner(a.GameEvent.HeroSuperSkill,this,this.OnHeroSuperSkill),s.default.Instance.remove_event_listenner(a.GameEvent.EndlessGameNewRound,this,this.OnEndlessGameNewRound),s.default.Instance.remove_event_listenner(a.GameEvent.update_endless_wolf_count,this,this.on_update_endless_wolf_count),s.default.Instance.remove_event_listenner(a.GameEvent.SDK_UI_IPT,this,this.ON_SDK_UI_IPT),Ticker.unregisterDelay(this.tiemrId_endless)},e.prototype.Init=function(t){Ticker.unregisterDelay(this.tiemrId_endless),this.hpBar.node.active=u.default.Ins.Mode==c.GameMode.normal,u.default.Ins.Mode==c.GameMode.normal?this.rageBar.node.y=this.hpBar.node.y-44:this.rageBar.node.y=this.hpBar.node.y,this.endlessNode.active=u.default.Ins.Mode==c.GameMode.endless,this.lbRound.string="",u.default.Ins.Mode==c.GameMode.normal&&this.hpBar.show(t),this.rageBar.show(0),this.OnUpdateBestKill(),this.lbKillMonsterNum.string="0",this.showHeroHead(t)},e.prototype.OnMonsterDie=function(t){this.lbKillMonsterNum.string=t.toString()},e.prototype.OnHeroHpChange=function(t,e){u.default.Ins.Mode==c.GameMode.normal&&(this.hpBar.show(e),this.showHeroHead(e))},e.prototype.OnHeroRageChange=function(t,e){this.rageBar.show(e)},e.prototype.showHeroHead=function(t){u.default.Ins.Mode==c.GameMode.normal?(this.spHeadStats[0].active=t>8,this.spHeadStats[1].active=t>6,this.spHeadStats[2].active=t>4,this.spHeadStats[3].active=t>2,this.spHeadStats[4].active=t>1,this.spHeadStats[5].active=!0):this.spHeadStats[0].active=!0},e.prototype.onDestroy=function(){s.default.Instance.remove_event_listenner(a.GameEvent.HeroHpChange,this,this.OnHeroHpChange),s.default.Instance.remove_event_listenner(a.GameEvent.HeroRageChange,this,this.OnHeroRageChange),s.default.Instance.remove_event_listenner(a.GameEvent.UpdateBestKill,this,this.OnUpdateBestKill),s.default.Instance.remove_event_listenner(a.GameEvent.HeroSuperSkill,this,this.OnHeroSuperSkill),s.default.Instance.remove_event_listenner(a.GameEvent.EndlessGameNewRound,this,this.OnEndlessGameNewRound),s.default.Instance.remove_event_listenner(a.GameEvent.update_endless_wolf_count,this,this.on_update_endless_wolf_count),s.default.Instance.remove_event_listenner(a.GameEvent.SDK_UI_IPT,this,this.ON_SDK_UI_IPT),Ticker.unregisterDelay(this.tiemrId_endless)},r([f(cc.Button)],e.prototype,"btnPause",void 0),r([f(cc.Label)],e.prototype,"lbKillMonsterNum",void 0),r([f(cc.Label)],e.prototype,"lbBest",void 0),r([f(cc.Node)],e.prototype,"endlessNode",void 0),r([f(cc.Label)],e.prototype,"lbRound",void 0),r([f(cc.RichText)],e.prototype,"endlessTime",void 0),r([f(cc.Node)],e.prototype,"endlessWolfTitle",void 0),r([f(cc.Label)],e.prototype,"endlessWolfCount",void 0),r([f(l.default)],e.prototype,"hpBar",void 0),r([f(l.default)],e.prototype,"rageBar",void 0),r([f([cc.Node])],e.prototype,"spHeadStats",void 0),r([f(cc.Node)],e.prototype,"guildTitle",void 0),r([d],e)}(cc.Component);n.default=_,cc._RF.pop()},{"../game/EventMgr":"EventMgr","../game/GameEvent":"GameEvent","../game/GameMode":"GameMode","../game/Main":"Main","../game/SDKIpt":"SDKIpt","./valBar":"valBar"}],guideView:[function(t,e,n){"use strict";cc._RF.push(e,"3881dwdzwlNGq2iL+kmbruF","guideView");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/Main"),a=cc._decorator,c=a.ccclass,u=a.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.lbTip=null,e}return i(e,t),e.prototype.onLoad=function(){},e.prototype.show=function(t,e,n){void 0===e&&(e=void 0),void 0===n&&(n=void 0);var o=this;this.lbTip.string=t,this.node.active=!0,e&&setTimeout(function(){o.hide(),n&&n()},1e3*e),s.default.Ins.pauseGame()},e.prototype.hide=function(){this.node.active=!1,s.default.Ins.resumeGame()},r([u(cc.Label)],e.prototype,"lbTip",void 0),r([c],e)}(cc.Component);n.default=p,cc._RF.pop()},{"../game/Main":"Main"}],loadingView:[function(t,e,n){"use strict";cc._RF.push(e,"d563aMwSpRNVZDHgSoUw0Nf","loadingView");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,a=s.ccclass,c=s.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.progress=null,e}return i(e,t),e.prototype.UpdateProgress=function(t){this.progress.progress=t},e.prototype.ShowProgress=function(){this.node.active=!0,this.progress.node.active=!0,this.progress.progress=0},r([c(cc.ProgressBar)],e.prototype,"progress",void 0),r([a],e)}(cc.Component);n.default=u,cc._RF.pop()},{}],mainView:[function(t,e,n){"use strict";cc._RF.push(e,"2be12YfjTFEA786ReCP8LD+","mainView");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/EventMgr"),a=t("../game/GameEvent"),c=t("../game/GameMode"),u=t("../game/GameState"),p=t("../game/Main"),l=t("../game/SDKIpt"),h=t("../game/SoundMgr"),d=t("./rankPanel"),f=cc._decorator,_=f.ccclass,y=f.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rankPanel=null,e.returnMainView=null,e.returnPlay=null,e.btnNormalMode=null,e.btnEndlessMode=null,e.btnAudio=null,e.btnMusic=null,e.btnRank=null,e.mainNodes=[],e.mainPanel=null,e.pausePanel=null,e.btnQuit=null,e.quitPanel=null,e.btnQuitCancel=null,e.btnQuitConfirn=null,e}return i(e,t),Object.defineProperty(e.prototype,"isActive",{get:function(){return this.node.active},enumerable:!1,configurable:!0}),e.prototype.start=function(){var t=this;this.btnAudio.node.on("click",function(){h.default.Instance.ToogleEffectMute(),t.btnAudio.node.getChildByName("closeTag").active=h.default.Instance.EffMute},this),this.btnMusic.node.on("click",function(){h.default.Instance.ToogleMusicMute(),t.btnMusic.node.getChildByName("closeTag").active=h.default.Instance.MusicMute},this),this.btnRank.node.on("click",function(){t.rankPanel.ToggleShow()},this),this.returnMainView.node.on("click",function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,l.SDKIpt.leftFoot)},this),this.returnPlay.node.on("click",function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,l.SDKIpt.rightFoot)},this),this.btnNormalMode.node.on("click",function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,l.SDKIpt.leftFoot)},this),this.btnEndlessMode.node.on("click",function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,l.SDKIpt.rightFoot)},this),this.btnAudio.node.getChildByName("closeTag").active=h.default.Instance.EffMute,this.btnMusic.node.getChildByName("closeTag").active=h.default.Instance.MusicMute,s.default.Instance.add_event_listenner(a.GameEvent.SDK_UI_IPT,this,this.ON_SDK_UI_IPT),this.initQuitPanel()},e.prototype.ON_SDK_UI_IPT=function(t,e){if(this.isActive)switch(e){case l.SDKIpt.left:case l.SDKIpt.right:break;case l.SDKIpt.rightFoot:if(p.default.Ins.State==u.GameState.inGame)1==this.pausePanel.active&&(p.default.Ins.ReturnPlayGame(),this.node.active=!1);else if(p.default.Ins.State==u.GameState.inMain){if(p.default.Ins.IsGuide)return;p.default.Ins.Mode=c.GameMode.endless,p.default.Ins.PlayGame()}break;case l.SDKIpt.leftFoot:p.default.Ins.State==u.GameState.inGame?1==this.pausePanel.active&&p.default.Ins.ShowMainView():p.default.Ins.State==u.GameState.inMain&&(p.default.Ins.Mode=c.GameMode.normal,p.default.Ins.PlayGame())}},e.prototype.Show=function(){this.node.active=!0},e.prototype.Hide=function(){this.node.active=!1},e.prototype.ShowPauseGame=function(){this.node.active=!0,this.setShowMainNodes(!1),this.setShowPauseNodes(!0)},e.prototype.ShowMainGame=function(){this.node.active=!0,this.setShowMainNodes(!0),this.setShowPauseNodes(!1),this.btnEndlessMode.interactable=!p.default.Ins.IsGuide},e.prototype.hideMainPause=function(){this.setShowMainNodes(!1),this.setShowPauseNodes(!1)},e.prototype.setShowMainNodes=function(t){for(var e=0;e=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/GameMode"),a=t("../game/Main"),c=t("../game/sdk"),u=cc._decorator,p=u.ccclass,l=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tmpRow=null,e.best=null,e.gap=40,e.items=null,e.isGeting=!1,e}return i(e,t),e.prototype.onLoad=function(){var t=this;t.gameMode=s.GameMode.endless,this.best.string="\u6392\u884c\u699c",c.SDK.getUserInfo(function(e){t.mId=e.id,t.ToggleShow()})},e.prototype.ToggleShow=function(){this.node.active&&this.getData()},e.prototype.getData=function(){var t=this;t.isGeting||(t.isGeting=!0,t.gameMode=this.gameMode==s.GameMode.normal?s.GameMode.endless:s.GameMode.normal,c.SDK.getRank(a.default.Ins.GetSDKGameMode(s.GameMode.normal),function(e){t.data1=e,c.SDK.getRank(a.default.Ins.GetSDKGameMode(s.GameMode.endless),function(n){t.data2=n,t.best.string=t.gameMode==s.GameMode.normal?"\u4e16\u754c\u699c":"\u597d\u53cb\u699c",t.best.string+=" \u5386\u53f2\u6700\u9ad8\u5206:"+t.getBestScore(e,n),t.showList(t.gameMode==s.GameMode.normal?t.data1:t.data2),t.isGeting=!1})}))},e.prototype.checkeValid=function(t){return!!t&&!!(t&&t[1]&&t[1].list)},e.prototype.getBestScore=function(t,e){var n=this,o=function(t){if(!n.checkeValid(t))return 0;for(var e=t[1].list,o=0;o=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/EventMgr"),a=t("../game/GameEvent"),c=t("../game/GameState"),u=t("../game/Main"),p=t("../game/SDKIpt"),l=t("../game/sdk"),h=t("../game/GameMode"),d=cc._decorator,f=d.ccclass,_=d.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rePlay=null,e.returnMain=null,e.bestStar=null,e.lbKill=null,e.lbRound=null,e.failNodes=[],e.winNodes=[],e}return i(e,t),Object.defineProperty(e.prototype,"isActive",{get:function(){return this.node.active},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this.rePlay.node.on("click",this.onRePlay,this),this.returnMain.node.on("click",this.onReturnMain,this),s.default.Instance.add_event_listenner(a.GameEvent.SDK_UI_IPT,this,this.ON_SDK_UI_IPT)},e.prototype.ON_SDK_UI_IPT=function(t,e){if(this.isActive)switch(e){case p.SDKIpt.left:case p.SDKIpt.right:break;case p.SDKIpt.rightFoot:this.onRePlay();break;case p.SDKIpt.leftFoot:this.onReturnMain()}},e.prototype.onRePlay=function(){u.default.Ins.PlayGame(),this.Hide()},e.prototype.onReturnMain=function(){u.default.Ins.ShowMainView(),this.Hide()},e.prototype.Show=function(){s.default.Instance.dispatch_event(a.GameEvent.sdkActionTip,[new ActionTipData(!0,"\u8fd4\u56de\u5927\u5385"),new ActionTipData(!1,"\u518d\u6765\u4e00\u5c40")]),this.node.active=!0,this.lbKill.string=u.default.Ins.Mode==h.GameMode.normal?u.default.Ins.Score.toString():u.default.Ins.EndlessRecordScore.toString(),this.bestStar.active=u.default.Ins.IsNewBestKill,this.lbRound.node.active=u.default.Ins.Mode==h.GameMode.endless,u.default.Ins.Mode==h.GameMode.endless&&(this.lbRound.string="\u7b2c"+u.default.Ins.Round+"\u6ce2");for(var t=0;t=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/EventMgr"),a=t("../game/GameEvent"),c=cc._decorator,u=c.ccclass,p=c.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.leftNode=null,e.rightNode=null,e}return i(e,t),e.prototype.onLoad=function(){this.initLeftPosX=this.leftNode.x,this.initRightPosX=this.rightNode.x,s.default.Instance.add_event_listenner(a.GameEvent.sdkActionTip,this,this.onSdkActionTip)},e.prototype.onSdkActionTip=function(t,e){if(this.node.active=!0,1==e.length){var n=e[0],o=n.isLeft?this.leftNode:this.rightNode;this.leftNode.active=!1,this.rightNode.active=!1,this.setNodeShoow(o,n,80)}else 2==e.length?(this.setNodeShoow(this.leftNode,e[0],this.initLeftPosX),this.setNodeShoow(this.rightNode,e[1],this.initRightPosX)):this.node.active=!1},e.prototype.setNodeShoow=function(t,e,n){t.getChildByName("des").getComponent(cc.Label).string=e.footStr+"\xb7"+e.handStr,t.x=n,t.active=!0},e.prototype.onDestroy=function(){s.default.Instance.remove_event_listenner(a.GameEvent.sdkActionTip,this,this.onSdkActionTip)},r([p(cc.Node)],e.prototype,"leftNode",void 0),r([p(cc.Node)],e.prototype,"rightNode",void 0),r([u],e)}(cc.Component);n.default=l,cc._RF.pop()},{"../game/EventMgr":"EventMgr","../game/GameEvent":"GameEvent"}],sdkDebugView:[function(t,e,n){"use strict";cc._RF.push(e,"26507UoMJRGBYoTAb7dwJwa","sdkDebugView");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/EventMgr"),a=t("../game/GameEvent"),c=t("../game/Hero"),u=cc._decorator,p=u.ccclass,l=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.btnLeft=null,e.btnLeftDown=null,e.btnRight=null,e.btnRightDown=null,e.btnUp=null,e.btnDown=null,e.btnDebugToggle=null,e.debugView=null,e}return i(e,t),e.prototype.start=function(){this.btnLeft.node.active=!1,this.btnRight.node.active=!1,this.btnLeft.node.on("click",this.on_btnLeft,this),this.btnLeftDown.node.on("click",this.on_btnLeftDown,this),this.btnRight.node.on("click",this.on_btnRight,this),this.btnRightDown.node.on("click",this.on_btnRightDown,this),this.btnUp.node.on("click",this.on_btnUp,this),this.btnDown.node.on("click",this.on_btnDown,this),this.btnDebugToggle.node.on("click",this.on_btnDebugToggle,this),this.on_btnDebugToggle()},e.prototype.on_btnDown=function(){s.default.Instance.dispatch_event(a.GameEvent.DebugSDKInput,c.GameInput.down)},e.prototype.on_btnUp=function(){s.default.Instance.dispatch_event(a.GameEvent.DebugSDKInput,c.GameInput.up)},e.prototype.on_btnRightDown=function(){s.default.Instance.dispatch_event(a.GameEvent.DebugSDKInput,c.GameInput.rightClick)},e.prototype.on_btnRight=function(){s.default.Instance.dispatch_event(a.GameEvent.DebugSDKInput,c.GameInput.rightClick)},e.prototype.on_btnLeftDown=function(){s.default.Instance.dispatch_event(a.GameEvent.DebugSDKInput,c.GameInput.leftClick)},e.prototype.on_btnLeft=function(){s.default.Instance.dispatch_event(a.GameEvent.DebugSDKInput,c.GameInput.leftDown)},e.prototype.on_btnDebugToggle=function(){this.debugView.active=!this.debugView.active},r([l(cc.Button)],e.prototype,"btnLeft",void 0),r([l(cc.Button)],e.prototype,"btnLeftDown",void 0),r([l(cc.Button)],e.prototype,"btnRight",void 0),r([l(cc.Button)],e.prototype,"btnRightDown",void 0),r([l(cc.Button)],e.prototype,"btnUp",void 0),r([l(cc.Button)],e.prototype,"btnDown",void 0),r([l(cc.Button)],e.prototype,"btnDebugToggle",void 0),r([l(cc.Node)],e.prototype,"debugView",void 0),r([p],e)}(cc.Component);n.default=h,cc._RF.pop()},{"../game/EventMgr":"EventMgr","../game/GameEvent":"GameEvent","../game/Hero":"Hero"}],sdkIptCom:[function(t,e,n){"use strict";cc._RF.push(e,"d9f7d/v2FZEpoG2ZpicqTPB","sdkIptCom");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,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../game/EventMgr"),a=t("../game/GameEvent"),c=t("../game/sdk"),u=t("../game/SDKIpt"),p=cc._decorator,l=p.ccclass,h=(p.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.onLoad=function(){c.SDK.on(c.CMD.ENTER_KEY.toString(),this.ON_ENTER_KEY,this),c.SDK.on(c.CMD.CANCLE_KEY.toString(),this.ON_CANCLE_KEY,this),c.SDK.on(c.CMD.BACK_LEFT.toString(),this.ON_BACK_LEFT,this),c.SDK.on(c.CMD.BACK_RIGHT.toString(),this.ON_BACK_RIGHT,this),c.SDK.on(c.MOTION.LEFT.toString(),this._onMotionLeft,this),c.SDK.on(c.MOTION.RIGHT.toString(),this._onMotionRight,this),c.SDK.on(c.MOTION.JUMP.toString(),this._onMotionJump,this),c.SDK.on(c.MOTION.DOWN.toString(),this._onMotionDown,this),s.default.Instance.add_event_listenner(a.GameEvent.SDK_SHAKE,this,this.ON_SDK_SHAKE),s.default.Instance.add_event_listenner(a.GameEvent.SDK_QUIT,this,this.ON_SDK_QUIT),cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN,this.onKeyDown,this)},e.prototype.onKeyDown=function(t){switch(t.keyCode){case cc.macro.KEY.escape:c.SDK.onBackPressed();break;case cc.macro.KEY.q:s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.leftFoot);break;case cc.macro.KEY.e:s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.rightFoot);break;case cc.macro.KEY.w:case cc.macro.KEY.up:s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.hero_up);break;case cc.macro.KEY.s:case cc.macro.KEY.down:s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.hero_down);break;case cc.macro.KEY.a:case cc.macro.KEY.left:s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.hero_left);break;case cc.macro.KEY.d:case cc.macro.KEY.right:s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.hero_right)}},e.prototype.ON_SDK_QUIT=function(){c.SDK.onBackPressed()},e.prototype.ON_SDK_SHAKE=function(t,e){c.SDK.vibrate(e)},e.prototype.ON_ENTER_KEY=function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.rightFoot)},e.prototype.ON_CANCLE_KEY=function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.leftFoot)},e.prototype.ON_BACK_LEFT=function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.left)},e.prototype.ON_BACK_RIGHT=function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.right)},e.prototype._onMotionJump=function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.hero_up)},e.prototype._onMotionDown=function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.hero_down)},e.prototype._onMotionRight=function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.hero_right)},e.prototype._onMotionLeft=function(){s.default.Instance.dispatch_event(a.GameEvent.SDK_UI_IPT,u.SDKIpt.hero_left)},r([l],e)}(cc.Component));n.default=h,cc._RF.pop()},{"../game/EventMgr":"EventMgr","../game/GameEvent":"GameEvent","../game/SDKIpt":"SDKIpt","../game/sdk":"sdk"}],sdk:[function(t,e,n){"use strict";var o,i,r;cc._RF.push(e,"0fe97ldi2dOtbkWHDwIdCsJ","sdk"),Object.defineProperty(n,"__esModule",{value:!0}),n.CMD=n.MOTION=n.SDK=void 0,function(t){t[t.NONE_INTERATION=2e3]="NONE_INTERATION",t[t.FRONT_LEFT=2001]="FRONT_LEFT",t[t.FRONT_RIGHT=2002]="FRONT_RIGHT",t[t.BACK_LEFT=2003]="BACK_LEFT",t[t.BACK_RIGHT=2004]="BACK_RIGHT",t[t.CANCLE_KEY=2005]="CANCLE_KEY",t[t.ENTER_KEY=2006]="ENTER_KEY"}(o||(o={})),n.CMD=o,function(t){t[t.STOP=0]="STOP",t[t.RUN=1]="RUN",t[t.JUMP=2]="JUMP",t[t.DOWN=3]="DOWN",t[t.LEFT=4]="LEFT",t[t.RIGHT=5]="RIGHT",t[t.FRONT=6]="FRONT",t[t.BACK=7]="BACK",t[t.LEFT_UP=8]="LEFT_UP",t[t.LEFT_DOWN=9]="LEFT_DOWN",t[t.RIGHT_UP=10]="RIGHT_UP",t[t.RIGHT_DOWN=11]="RIGHT_DOWN",t[t.STEP=12]="STEP",t[t.MOTION_JUMP_OC=13]="MOTION_JUMP_OC",t[t.MOTION_JUMP_VERTICAL=14]="MOTION_JUMP_VERTICAL",t[t.NUMBERS_OF_MOTION=15]="NUMBERS_OF_MOTION"}(i||(i={})),n.MOTION=i,function(t){t[t.FREQ=1e3]="FREQ"}(r||(r={}));var s=function(t,e){this._target=t,this._fn=e},a=new(function(){function t(){this._events={},this._motion=[0,0,0,0],this._motionTime=[0,0,0,0],this._responseCallMap={string:Function}}return t.prototype.callback=function(t,e){console.log("callback "+t+" "+e);var n=this._responseCallMap[t];null==n||n.call(n,e)},t.prototype.isMotion=function(t,e){var n=new Date,o=this._motion[t]>0&&n.getTime()-this._motionTime[t]<=e;return o&&(this._motion[t]=0),o},t.prototype.isLeftFootDown=function(t){return void 0===t&&(t=1e3/60),this.isMotion(0,t)},t.prototype.isRightFootDown=function(t){return void 0===t&&(t=1e3/60),this.isMotion(1,t)},t.prototype.getCmd=function(){var t=this._cmd;return t>0&&(this._cmd=0),t},t.prototype.cmd=function(t,e){this._cmd=e+o.NONE_INTERATION;var n=(new Date).getTime();console.log("cmd set "+e+" "+this._cmd),this.emit(this._cmd.toString(),n)},t.prototype.getMotion=function(){return this._motion},t.prototype.motion=function(t,e,n,o,r,s){this._motion[0]=n,this._motion[1]=o,this._motion[2]=r,this._motion[3]=s,console.log("motion set "+this._motion);for(var a=(new Date).getTime(),c=this._motion,u=0;u0){if(a-this._motionTime[u]<33)continue;this._motionTime[u]=a;var p=c[u],l=p.toString();this.emit(l,a),console.log("motion set "+p+" -> "+l+" "+i[p])}},t.prototype.getStepFreq=function(){return this._stepFreq},t.prototype.stepFreq=function(t){this._stepFreq=t,console.log("step freq "+t),this.emit(r.FREQ.toString(),t)},t.prototype.emit=function(t){for(var e=[],n=1;n=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(n,"__esModule",{value:!0});var s=cc._decorator,a=s.ccclass,c=s.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tmpBar=null,e.barRoot=null,e.lbVal=null,e.gap=23,e.bars=[],e}return i(e,t),e.prototype.onLoad=function(){this.tmpBar.active=!1},e.prototype.show=function(t){for(var e=Math.max(t,this.bars.length),n=0;nn}this.lbVal.string=t},r([c(cc.Node)],e.prototype,"tmpBar",void 0),r([c(cc.Node)],e.prototype,"barRoot",void 0),r([c(cc.Label)],e.prototype,"lbVal",void 0),r([c(cc.Integer)],e.prototype,"gap",void 0),r([a],e)}(cc.Component);n.default=u,cc._RF.pop()},{}]},{},["ActionTipData","EventMgr","GameCam","GameConst","GameEvent","GameMode","GameState","GuideMgr","Helloworld","Hero","HeroHit","HurtTag","Main","MapEnvirment","Monster1","Monster2","MonsterBase","MonsterHit","ResMgr","SDKIpt","SoundMgr","Weapon","WeaponState","WeaponType","Weapon_big","WolfDoctor","WolfRush","sdk","DateTime","DateUtil","GLog","Game_extens","SaveField","SaveUtil","Tick","TouchMgr","Util","sdkIptCom","ScreenColor","ballonGuide","endlessRoundPanel","gameView","guideView","loadingView","mainView","rankPanel","resultView","sdkActTipView","sdkDebugView","valBar","TickTest"]);