bundle.js 235 KB

12345678
  1. var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])};return function(t,a){function n(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(n.prototype=a.prototype,new n)}}();!function(){function e(t,a,n){function i(r,s){if(!a[r]){if(!t[r]){var c="function"==typeof require&&require;if(!s&&c)return c(r,!0);if(o)return o(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var h=a[r]={exports:{}};t[r][0].call(h.exports,function(e){var a=t[r][1][e];return i(a||e)},h,h.exports,e,t,a,n)}return a[r].exports}for(var o="function"==typeof require&&require,r=0;r<n.length;r++)i(n[r]);return i}return e}()({1:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../PrefabControl/PanelResDic"),i=e("../utils/DispatcherManager"),o=e("../utils/Singleton"),r=e("../WXSDK/ServerSocket"),s=e("../Data/RoleData"),c=function(e){function t(){var t=e.call(this)||this;return t._objectPool=n.PanelResDic.Instance,t.initSelf(),t}return __extends(t,e),t.prototype.initSelf=function(){},t.prototype.drawSomething=function(){this.sp=new Laya.Sprite,Laya.stage.addChild(this.sp),this.sp.graphics.drawLine(10,58,146,58,"#ff0000",3),this.sp.graphics.drawLines(176,58,[0,0,39,-50,78,0,117,50,156,0],"#ff0000",5),this.sp.graphics.drawCurves(352,58,[0,0,19,-100,39,0,58,100,78,0,97,-100,117,0,136,100,156,0],"#ff0000",5),this.sp.graphics.drawRect(10,166,166,90,"#ffff00"),this.sp.graphics.drawPoly(264,166,[0,0,60,0,78.48,57,30,93.48,-18.48,57],"#ffff00"),this.sp.graphics.drawPoly(400,166,[0,100,50,0,100,100],"#ffff00"),this.sp.graphics.drawCircle(98,332,50,"#00ffff"),this.sp.graphics.drawPie(240,290,100,10,60,"#00ffff"),this.sp.graphics.drawPath(400,310,[["moveTo",5,0],["lineTo",105,0],["arcTo",110,0,110,5,5],["lineTo",110,55],["arcTo",110,60,105,60,5],["lineTo",5,60],["arcTo",0,60,0,55,5],["lineTo",0,5],["arcTo",0,0,5,0,5],["closePath"]],{fillStyle:"#00ffff"})},t.prototype.DisOn=function(e,t,a){i.DispatcherManager.addEventListener(e,t,a)},t.prototype.DisTrigger=function(e,t){void 0===t&&(t=null),i.DispatcherManager.dispatchEvent(e,t)},t.prototype.DisOff=function(e,t,a){i.DispatcherManager.removeEventListener(e,t,a)},t.prototype.setup=function(){for(var e,t=new Laya.Sprite,a=0;1e3>a;a++)e=new Laya.Text,e.fontSize=20,e.text=(100*Math.random()).toFixed(0),e.rotation=360*Math.random(),e.color="#CCCCCC",e.x=Math.random()*Laya.stage.width,e.y=Math.random()*Laya.stage.height,t.addChild(e);t.cacheAs="bitmap",Laya.stage.addChild(t)},t.prototype.getSingleTon=function(e){return this._objectPool.getSingleTon(e)},t.prototype.sendMessage=function(e,t,a){void 0===t&&(t=null),void 0===a&&(a=!0),r.ServerSocket.Instance.sendMessage(e,t,a)},Object.defineProperty(t.prototype,"RoleData",{get:function(){return this.roleData||(this.roleData=s.RoleData.Instance),this.roleData},enumerable:!0,configurable:!0}),t}(o.Singleton);a.AgencyBaseControl=c},{"../Data/RoleData":30,"../PrefabControl/PanelResDic":45,"../WXSDK/ServerSocket":63,"../utils/DispatcherManager":70,"../utils/Singleton":76}],2:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./AgencyBaseControl"),i=e("../utils/GameState"),o=e("../View/ViewManager"),r=e("../View/CompletePanel"),s=e("../Control/GameStateControl"),c=e("../utils/GameUtils"),l=e("../Control/SceneControl"),h=e("../PrefabControl/PropManager"),u=e("../WXSDK/PlayerAccount"),p=e("../WXSDK/Sdk"),d=e("./AgencyTrial"),f=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.initSelf=function(){this.DisOn(i.GameState.end,this,this.endgameHandler)},t.prototype.endgameHandler=function(){Laya.timer.once(1e3,this,this.startEndView)},t.prototype.startEndView=function(){var e=(s.GameStateControl.Instance.nowMingCi,0);if(0==s.GameStateControl.Instance.endGamePlayerArr.length)e=this.RoleData.levelcfg.winGold,p.WxApi.recordAldEvent("打开结算界面(游戏胜利)"),this.RecropLevelEnd(!0);else{var t=c.GameUtils.cutstrtoArr(this.RoleData.levelcfg.failGod);e=c.GameUtils.randRangeint(Number(t[0]),Number(t[1])),p.WxApi.recordAldEvent("打开结算界面(游戏失败)"),this.RecropLevelEnd(!1)}o.ViewManager.Instance.add(r.CompletePanel,e)},t.prototype.RecropLevelEnd=function(e){if(Laya.Browser.onWeiXin){var t=this.RoleData.LevelID.toString(),a=(u.PlayerAccount.CurrentAccount.CurAccountData.UseId,"第"+this.RoleData.LevelID+"关");if(e)p.WxApi.levelSuccess(t,a,t);else{var n=(this.RoleData.CharacterID.toString(),this.RoleData.roleCfg.name);p.WxApi.levelFail(t,a,t,"0",n)}}},t.prototype.returnmainview=function(){h.PropManager.Instance.CloseGameOverEffect(),o.ViewManager.Instance.close(r.CompletePanel),this.DisTrigger(i.GameState.returnMainView),l.SceneControl.Instance.ShowTheGameScene();var e=this.getSingleTon(d.AgencyTrial);e.isshiyonging&&(l.SceneControl.Instance.CreatePlayer(this.RoleData.roleCfg),e.isshiyonging=!1)},t.prototype.startGame=function(){var e=this.RoleData.getNowServerLevel().toString().toString(),t="第"+e+"关",a=u.PlayerAccount.CurrentAccount.CurAccountData.UseId;p.WxApi.levelStart(e,t,a),s.GameStateControl.Instance.startGame()},t.key="AgencyInGame",t}(n.AgencyBaseControl);a.AgencyInGame=f},{"../Control/GameStateControl":20,"../Control/SceneControl":26,"../PrefabControl/PropManager":46,"../View/CompletePanel":50,"../View/ViewManager":57,"../WXSDK/PlayerAccount":61,"../WXSDK/Sdk":62,"../utils/GameState":71,"../utils/GameUtils":72,"./AgencyBaseControl":1,"./AgencyTrial":7}],3:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../View/ViewManager"),i=e("../View/LoadingPanel"),o=e("./AgencyUserMessage"),r=e("../WXSDK/WECHATEVENT"),s=e("./AgencyBaseControl"),c=e("./AgencyMain"),l=e("../CFG/RoleCFG"),h=e("../CFG/LevelCFG"),u=e("../CFG/BuildCFG"),p=e("../CFG/NpcCFG"),d=e("../CFG/GameCFG"),f=e("./AgencySkin"),m=e("../WXSDK/Sdk"),g=e("../WXSDK/PlayerAccount"),y=e("../WXSDK/NetworkManager"),_=e("../Global"),v=e("../CFG/LotteryCFG"),w=e("./AgencyLottery"),C=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.initSelf=function(){this.DisOn(r.WECHATEVENT.WECHATEVENT_loginSucceed,this,this.Success)},t.prototype.Login=function(){n.ViewManager.Instance.add(i.LoadingPanel),this.loginprogress(0),Laya.Browser.onWeiXin?this.LoginWX():this.LoginLocal()},t.prototype.LoginWX=function(){var e=this;m.WxApi.recordAldEvent("开始微信登录"),m.WxApi.WXLogin(function(t){"error"!=t?(m.WxApi.recordAldEvent("微信登录成功"),console.log("hplogin:querychannel->"+m.WxApi.querychannel+" referrerInfoappId->"+m.WxApi.referrerInfoappId),e.LoginLocal()):(m.WxApi.recordAldEvent("微信登录失败"),e.LoginWX())})},t.prototype.LoginLocal=function(e){void 0===e&&(e=null),m.WxApi.recordAldEvent("开始本地登录"),e&&new g.PlayerAccount(e.code,"","",0,"","","","",m.WxApi.shareOpenId,m.WxApi.shareOpenId,_.Global.gameVersion),y.NetworkManager.Instance.login(null,Laya.Handler.create(this,this.LoginComplete),null)},t.prototype.LoginComplete=function(){m.WxApi.recordAldEvent("本地服务器登录完成..."),m.WxApi.aldSendOpenid(g.PlayerAccount.CurrentAccount.CurAccountData.openid),this.Success()},t.prototype.loginprogress=function(e){var t=n.ViewManager.Instance.getView(i.LoadingPanel);t&&t.showWord(e)},t.prototype.Success=function(){this.ResolveData(),this.initData(),this.StartMain()},t.prototype.StartMain=function(){console.log("当前配置表总关卡:",h["default"].vec.length),this.getSingleTon(c.AgencyMain).StartMain()},t.prototype.ResolveData=function(){var e=g.PlayerAccount.CurrentAccount.nowConfig.gameConfig[0].config;if(e&&""!=e){var a,n=e.split("%file%"),i=n.length;for(a=0;i>a;a++){var o=n[a].split("%cfg%"),r=t.configClass[o[0]];r&&r.initCfg(o[1])}return!0}return!1},t.prototype.initData=function(){this.getSingleTon(o.AgencyUserMessage).init(),this.getSingleTon(f.AgencySkin).init(),this.getSingleTon(w.AgencyLottery).init()},t.key="AgencyLogin",t.configClass={RoleCFG:l["default"],LevelCFG:h["default"],BuildCFG:u["default"],NpcCFG:p["default"],GameCFG:d["default"],LotteryCFG:v["default"]},t}(s.AgencyBaseControl);a.AgencyLogin=C},{"../CFG/BuildCFG":9,"../CFG/GameCFG":10,"../CFG/LevelCFG":11,"../CFG/LotteryCFG":12,"../CFG/NpcCFG":13,"../CFG/RoleCFG":14,"../Global":38,"../View/LoadingPanel":52,"../View/ViewManager":57,"../WXSDK/NetworkManager":59,"../WXSDK/PlayerAccount":61,"../WXSDK/Sdk":62,"../WXSDK/WECHATEVENT":66,"./AgencyBaseControl":1,"./AgencyLottery":4,"./AgencyMain":5,"./AgencySkin":6,"./AgencyUserMessage":8}],4:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./AgencyBaseControl"),i=e("../View/ViewManager"),o=e("../View/LotteryPanel"),r=e("../CFG/LotteryCFG"),s=e("../utils/GameUtils"),c=e("../utils/GlobalTip"),l=e("../CFG/RoleCFG"),h=e("./AgencySkin"),u=function(e){function t(){var t=e.call(this)||this;return t.mStartX=400,t.mStartY=500,t.mActionIndex=0,t.mCurrIndex=0,t.mCurrSkinIndex=0,t}return __extends(t,e),t.prototype.init=function(){},t.prototype.openView=function(){i.ViewManager.Instance.add(o.LotteryPanel)},t.prototype.createAnimation=function(){var e=new Laya.Animation;e.interval=30,e.index=1,e.play();var t=e.getGraphicBounds();e.pivot(t.width/2,t.height/2),e.pos(Laya.stage.width/2,Laya.stage.height/2),Laya.stage.addChild(e)},t.prototype.getreward=function(e){if(e)switch(e.type){case 1:this.RoleData.Money+=Number(e.value),c.GlobalTip.Instance.showWordTips("恭喜获得"+e.value+"金币!");break;case 2:var t=l["default"].dict[e.value];this.getSingleTon(h.AgencySkin).setRoleState(t,1),c.GlobalTip.Instance.showWordTips("恭喜获得角色"+t.rolename)}},t.prototype.GetReward=function(){var e,t=0,a=r["default"].vec,n=0,i=0;for(i=0;i<a.length;i++)e=a[i],n+=e.weight;var o=s.GameUtils.randRangeint(1,n),c=0;for(i=0;i<a.length;i++)if(e=a[i],c+=e.weight,c>=o){t=i;break}return t},t.prototype.startFun=function(){this.mAniPath="res/spine/spineRes1/dragon.sk"},t.prototype.onError=function(){console.log("error")},t.prototype.parseComplete=function(){this.mArmature=this.mFactory.buildArmature(1),this.mArmature.x=this.mStartX,this.mArmature.y=this.mStartY,this.mArmature.scale(.5,.5),Laya.stage.addChild(this.mArmature),this.play()},t.prototype.completeHandler=function(){this.play()},t.prototype.play=function(){this.mCurrIndex++,this.mCurrIndex>=this.mArmature.getAnimNum()&&(this.mCurrIndex=0),this.mArmature.play(this.mCurrIndex,!1)},t.key="AgencyLottery",t}(n.AgencyBaseControl);a.AgencyLottery=u},{"../CFG/LotteryCFG":12,"../CFG/RoleCFG":14,"../View/LotteryPanel":53,"../View/ViewManager":57,"../utils/GameUtils":72,"../utils/GlobalTip":73,"./AgencyBaseControl":1,"./AgencySkin":6}],5:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./AgencyBaseControl"),i=e("../Control/ResourceControl"),o=e("../View/LoadingPanel"),r=e("../View/ViewManager"),s=e("../Control/ResDataControl"),c=e("../View/MainPanel"),l=e("../Control/SceneControl"),h=e("../Config/AssetPath"),u=e("../Control/GameStateControl"),p=e("../WXSDK/WXGamePlatform"),d=e("../CFG/NpcCFG"),f=e("../PrefabControl/PropManager"),m=function(e){function t(){var t=e.call(this)||this;return t._loadjd=0,t._alljd=0,t}return __extends(t,e),t.prototype.initSelf=function(){},t.prototype.StartMain=function(){this._loadjd=0,this._alljd=20,p.WXGamePlatform.Instance.loadSubpackage("subpackage",this,this.sub1complete,this.loadprogress,null)},t.prototype.sub1complete=function(){this._loadjd=20,this._alljd=30,p.WXGamePlatform.Instance.loadSubpackage("subpackage1",this,this.SubpackageOver,this.loadprogress,null)},t.prototype.onComplete=function(){var e=this.scene.addChild(Laya.Loader.getRes("res/threeDimen/skinModel/dude/dude.lh")),t=new Laya.Vector3(.1,.1,.1);e.transform.localScale=t,e.transform.rotate(new Laya.Vector3(0,3.14,0))},t.prototype.SubpackageOver=function(){this._loadjd=50,this._alljd=40;var e=[],t=[];t.push(h.AssetPath.get3DModel("startpanel")),t.push(h.AssetPath.get3DModel("endpanel")),t.push(h.AssetPath.get3DModel("speedupeffect")),t.push(h.AssetPath.get3DModel("color_white")),t.push(h.AssetPath.get3DModel("color_yellow")),t.push(h.AssetPath.get3DModel("winline")),t.push(h.AssetPath.get3DModel("fireworks")),t.push(h.AssetPath.get3DModel("DirectionalLight")),t.push(h.AssetPath.get3DRoleModel(this.RoleData.roleCfg.name)),t.push(h.AssetPath.get3DRoleModel("Arrow"));var a=this.RoleData.levelmapArr,n=0;for(n=0;n<a.length;n++)-1==t.indexOf(h.AssetPath.get3DModel(a[n]))&&t.push(h.AssetPath.get3DModel(a[n]));var o=this.RoleData.levelcfg.npc;for(n=0;n<o.length;n++)-1==t.indexOf(h.AssetPath.get3DRoleModel(d["default"].dict[o[n].id].name))&&t.push(h.AssetPath.get3DRoleModel(d["default"].dict[o[n].id].name));for(n=0;n<t.length;n++)e.push({url:t[n]});i.ResourceControl.Instance.loader3DArr(e,this,this.load3Dcomplete,this.loadprogress)},t.prototype.load3Dcomplete=function(){this._loadjd=90,this._alljd=10,i.ResourceControl.Instance.loadGroup("main",this,this.loadcomplete,this.loadprogress,!1)},t.prototype.loadprogress=function(e){var t=r.ViewManager.Instance.getView(o.LoadingPanel);t&&(e=this._loadjd+Math.ceil(e/100*this._alljd),t.showWord(e))},t.prototype.loadcomplete=function(){fairygui.UIConfig.buttonSound="ui://lecxynh2iz9y26",u.GameStateControl.Instance.init(),s.ResDataControl.Instance.AddViewPackByName("main"),r.ViewManager.Instance.close(o.LoadingPanel),r.ViewManager.Instance.add(c.MainPanel),l.SceneControl.Instance.SetScene(),f.PropManager.Instance.InitEffect()},t.key="AgencyMain",t}(n.AgencyBaseControl);a.AgencyMain=m},{"../CFG/NpcCFG":13,"../Config/AssetPath":15,"../Control/GameStateControl":20,"../Control/ResDataControl":24,"../Control/ResourceControl":25,"../Control/SceneControl":26,"../PrefabControl/PropManager":46,"../View/LoadingPanel":52,"../View/MainPanel":54,"../View/ViewManager":57,"../WXSDK/WXGamePlatform":67,"./AgencyBaseControl":1}],6:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./AgencyBaseControl"),i=e("../Control/LocalDataControl"),o=e("../Data/UserDataInfo"),r=e("../Data/SkinData"),s=e("../CFG/RoleCFG"),c=e("../View/ViewManager"),l=e("../View/SkinPanel"),h=e("../utils/GlobalTip"),u=e("../utils/GameState"),p=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.initSelf=function(){},t.prototype.init=function(){this.localdata=i.LocalDataControl.Instance.GetLocalCaCheData(o.UserDataInfo.skin);var e;this.localdata.hasOwnProperty("pifu")||(this.localdata.pifu={}),e=this.localdata.pifu,this.pifuArr=[],this.pifuDict={};var t=0,a=s["default"].vec.length;for(t=0;a>t;t++){var n=new r.SkinData,c=s["default"].vec[t];n.roleCFG=c;var l=e[c.id];l?(n.state=Number(l.state),n.hasnum=Number(l.hasnum)):(n.state=0,n.hasnum=0),0==c.getState&&(n.state=1),this.pifuArr.push(n),this.pifuDict[n.roleCFG.id]=n}},t.prototype.openview=function(){c.ViewManager.Instance.add(l.SkinPanel)},t.prototype.setRoleState=function(e,t){var a=this.pifuDict[e.id];a&&(a.state=1,this.AddLocalSkinData(a.roleCFG.id,a.state,a.hasnum))},t.prototype.AddLocalSkinData=function(e,t,a){this.localdata.pifu[e]={},this.localdata.pifu[e].state=t,this.localdata.pifu[e].hasnum=a,i.LocalDataControl.Instance.AddData(o.UserDataInfo.skin,this.localdata)},t.prototype.createCantralRect=function(){this.rect=new Laya.Sprite,this.rect.graphics.drawRect(-100,-100,200,200,"gray"),Laya.stage.addChild(this.rect),this.updateRectPos()},t.prototype.updateRectPos=function(){this.rect.x=Laya.stage.width/2,this.rect.y=Laya.stage.height/2},t.prototype.GainPifu=function(e){if(1==e.state)this.RoleData.CharacterID=e.roleCFG.id,this.DisTrigger(u.GameState.updateSKinView);else switch(e.roleCFG.getState){case 1:e.hasnum++,e.roleCFG.need<=e.hasnum&&(e.state=1),this.AddLocalSkinData(e.roleCFG.id,e.state,e.hasnum),this.DisTrigger(u.GameState.updateSKinView);break;case 2:this.RoleData.Money>=e.roleCFG.need?(this.RoleData.Money-=e.roleCFG.need,e.state=1,this.AddLocalSkinData(e.roleCFG.id,e.state,e.hasnum),this.DisTrigger(u.GameState.updateSKinView),h.GlobalTip.Instance.showWordTips("购买成功")):h.GlobalTip.Instance.showWordTips("金币不足");break;case 3:}},t.prototype.GainNoHaveSkin=function(){var e=[];for(var t in this.pifuDict)0==this.pifuDict[t].state&&e.push(this.pifuDict[t]);return e},t.key="AgencySkin",t}(n.AgencyBaseControl);a.AgencySkin=p},{"../CFG/RoleCFG":14,"../Control/LocalDataControl":22,"../Data/SkinData":31,"../Data/UserDataInfo":32,"../View/SkinPanel":55,"../View/ViewManager":57,"../utils/GameState":71,"../utils/GlobalTip":73,"./AgencyBaseControl":1}],7:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./AgencyBaseControl"),i=e("../View/ViewManager"),o=e("../View/TrialPanel"),r=e("../Control/GameStateControl"),s=e("../Config/AssetPath"),c=e("../Control/ResourceControl"),l=e("../Control/SceneControl"),h=function(e){function t(){var t=e.call(this)||this;return t.isshiyonging=!1,t}return __extends(t,e),t.prototype.openview=function(e){i.ViewManager.Instance.add(o.TrialPanel,e)},t.prototype.ExitPanel=function(e){if(this.isshiyonging=e?!0:!1,this._selectvo=e,e){var t=[];t.push({url:s.AssetPath.get3DRoleModel(e.roleCFG.name)}),c.ResourceControl.Instance.loader3DArr(t,this,this.SceneCreateComplete,null,!0)}else r.GameStateControl.Instance.entergame();i.ViewManager.Instance.close(o.TrialPanel)},t.prototype.createSprite=function(){this.sprit=new Laya.Sprite,this.sprit.graphics.drawRect(0,0,200,200,"#D2691E"),this.sprit.pivot(100,100),this.sprit.x=Laya.stage.width/2,this.sprit.y=Laya.stage.height/2,this.sprit.size(200,200),Laya.stage.addChild(this.sprit)},t.prototype.onSpriteClick=function(e){180*Math.random()},t.prototype.onRotate=function(e){},t.prototype.SceneCreateComplete=function(){l.SceneControl.Instance.CreatePlayer(this._selectvo.roleCFG),r.GameStateControl.Instance.entergame()},t.prototype.createText=function(){var e=new Laya.Text;e.text="Layabox是性能最强的HTML5引擎技术提供商与优秀的游戏发行商,面向Flash开发者提供HTML5开发技术方案!",e.width=400,e.wordWrap=!0,e.align="center",e.fontSize=40,e.font="Microsoft YaHei",e.color="#ff0000",e.bold=!0,e.leading=5,e.stroke=2,e.strokeColor="#ffffff",e.borderColor="#00ff00",e.x=(Laya.stage.width-e.textWidth)/2,e.y=(Laya.stage.height-e.textHeight)/2,Laya.stage.addChild(e)},t.prototype.createInput=function(){var e=new Laya.Input;e.prompt="Type some word...",e.multiline=!0,e.wordWrap=!0,e.size(350,100),e.x=Laya.stage.width-e.width>>1,e.y=Laya.stage.height-e.height>>1,e.padding=[2,2,2,2],e.bgColor="#666666",e.color="#ffffff",e.fontSize=20,Laya.stage.addChild(e)},t.key="AgencyTrial",t}(n.AgencyBaseControl);a.AgencyTrial=h},{"../Config/AssetPath":15,"../Control/GameStateControl":20,"../Control/ResourceControl":25,"../Control/SceneControl":26,"../View/TrialPanel":56,"../View/ViewManager":57,"./AgencyBaseControl":1}],8:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./AgencyBaseControl"),i=function(e){function t(){var t=e.call(this)||this;return t.roleisinit=!1,t}return __extends(t,e),t.prototype.initSelf=function(){},t.prototype.GoldUp=function(e){this.RoleData.Money+=e},t.prototype.createInput=function(){var e=new Laya.Input;e.size(350,100),e.x=Laya.stage.width-e.width>>1,e.y=Laya.stage.height-e.height>>1,e.text="这段文本不可编辑,但可复制",e.editable=!1,e.bold=!0,e.bgColor="#666666",e.color="#ffffff",e.fontSize=20,Laya.stage.addChild(e)},t.prototype.init=function(){this.RoleData.init(),this.roleisinit=!0},t.prototype.createText=function(){var e=new Laya.Text;return e.text="Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!\nLayabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!\nLayabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!",e.borderColor="#FFFF00",e.size(300,50),e.fontSize=20,e.color="#ffffff",Laya.stage.addChild(e),e},t.prototype.LevelUp=function(){this.RoleData.LevelUp()},t.key="AgencyUserMessage",t}(n.AgencyBaseControl);a.AgencyUserMessage=i},{"./AgencyBaseControl":1}],9:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.initCfg=function(t){var a=0,n=t.split("\n"),a=0;for(a=0;a<n.length;a++){var i=n[a],o=i.split("&");if(!e.dict[o[0]]){var r=new e;r.name=o[0],r.buffx=Number(o[1]),r.buffy=Number(o[2]),r.buffz=Number(o[3]),r.time=Number(o[4]),e.dict[r.name]=r,e.vec.push(r)}}},e.dict={},e.vec=[],e}();a["default"]=n},{}],10:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.initCfg=function(t){var a=0,n=t.split("\n"),a=0;for(a=0;a<n.length;a++){var i=n[a],o=i.split("&");if(!e.dict[o[0]]){var r=new e;r.id=Number(o[0]),r.value=o[1],e.dict[r.id]=r,e.vec.push(r)}}},e.dict={},e.vec=[],e}();a["default"]=n},{}],11:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.initCfg=function(t){var a=0,n=t.split("\n"),a=0;for(a=0;a<n.length;a++){var i=n[a],o=i.split("&");if(!e.dict[o[0]]){var r=new e;r.id=Number(o[0]),r.road=o[1],r.roleinitpos=JSON.parse(o[2]),r.npc=JSON.parse(o[3]),r.firstScenepos=o[4],r.winGold=Number(o[5]),r.failGod=o[6],e.dict[r.id]=r,e.vec.push(r)}}},e.dict={},e.vec=[],e}();a["default"]=n},{}],12:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.initCfg=function(t){var a=0,n=t.split("\n"),a=0;for(a=0;a<n.length;a++){var i=n[a],o=i.split("&");if(!e.dict[o[0]]){var r=new e;r.id=Number(o[0]),r.type=Number(o[1]),r.value=o[2],r.weight=Number(o[3]),e.dict[r.id]=r,e.vec.push(r)}}},e.dict={},e.vec=[],e}();a["default"]=n},{}],13:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.initCfg=function(t){var a=0,n=t.split("\n"),a=0;for(a=0;a<n.length;a++){var i=n[a],o=i.split("&");if(!e.dict[o[0]]){var r=new e;r.id=Number(o[0]),r.name=o[1],r.speed=Number(o[2]),r.frontjump=JSON.parse(o[3]),r.leftjump=JSON.parse(o[4]),r.rightjump=JSON.parse(o[5]),r.upclimb=Number(o[6]),r.slideclimb=JSON.parse(o[7]),r.jump_left=Number(o[8]),r.jump_right=Number(o[9]),r.start_ahead=Number(o[10]),r.distance=Number(o[11]),r.gravity=Number(o[12]),e.dict[r.id]=r,e.vec.push(r)}}},e.dict={},e.vec=[],e}();a["default"]=n},{}],14:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.initCfg=function(t){var a=0,n=t.split("\n"),a=0;for(a=0;a<n.length;a++){var i=n[a],o=i.split("&");if(!e.dict[o[0]]){var r=new e;r.id=Number(o[0]),r.name=o[1],r.speed=Number(o[2]),r.frontjump=JSON.parse(o[3]),r.leftjump=JSON.parse(o[4]),r.rightjump=JSON.parse(o[5]),r.upclimb=Number(o[6]),r.slideclimb=JSON.parse(o[7]),r.getState=Number(o[8]),r.need=Number(o[9]),r.icon=o[10],r.gravity=Number(o[11]),r.rolename=o[12],e.dict[r.id]=r,e.vec.push(r)}}},e.dict={},e.vec=[],e}();a["default"]=n},{}],15:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Global"),i=function(){function e(){}return e.init=function(){e.versionrandom="?v="+Math.random()},e.getsound=function(t){return n.Global.getUrl(e.resources+e.music+t+".mp3")},e.getResConfig=function(){return n.Global.getUrl(e.resources+"resConfig.json")},e.getConfig=function(t){return n.Global.getUrl(e.resources+t+".bin")},e.get3Dscene=function(t){return n.Global.getUrl(e.res+e.prop+"Conventional/"+t+".ls")},e.get3DModel=function(t){return n.Global.getUrl(e.res+e.prop+"Conventional/"+t+".lh")},e.get3DRoleModel=function(t){return n.Global.getUrl(e.res+"character/Conventional/"+t+".lh")},e.getroleicon=function(t){return n.Global.getUrl(e.res+"skinicon/"+t+".png")},e.getVerisonurl=function(){return n.Global.isdebug?n.Global.getUrl(e.res+"version.json")+e.versionrandom:n.Global.getUrl(e.res+"version"+n.Global.resconfigVersion+".json")},e.getGameVersion=function(){return n.Global.getUrl("gameversion.json")},e.res="res/",e.resources="resources/",e.ui="ui/",e.music="music/",e.versionrandom="",e.prop="prop/",e.skinicon="skinicon/",e}();a.AssetPath=i},{"../Global":38}],16:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./AssetPath"),i=e("../Global"),o=function(e){function t(){var a=e.call(this)||this;return t.ins=a,a}return __extends(t,e),Object.defineProperty(t,"Instance",{get:function(){return null==t.ins?new t:t.ins},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.ResDic={}},t.prototype.loadUI=function(){Laya.loader.load(["res/threeDimen/ui/button.png"],Laya.Handler.create(this,function(){var e=Laya.stage.addChild(new Laya.Button("res/threeDimen/ui/button.png","正常模式"));e.size(160,40),e.labelBold=!0,e.labelSize=30,e.sizeGrid="4,4,4,4",e.scale(Laya.Browser.pixelRatio,Laya.Browser.pixelRatio),e.pos(Laya.stage.width/2-e.width*Laya.Browser.pixelRatio/2,Laya.stage.height-100*Laya.Browser.pixelRatio),e.on(Laya.Event.CLICK,this,function(){++this.curStateIndex%2==1?(this.sprite3D.active=!1,this.lineSprite3D.active=!0,e.label="网格模式"):(this.sprite3D.active=!0,this.lineSprite3D.active=!1,e.label="正常模式")})}))},t.prototype.initRec=function(e){if(null!=e&&!t.inited){t.inited=!0;var a=e.groups,o=e.resources,r={};for(var s in o){var c=o[s];switch(c.type){case"bin":c.type=Laya.Loader.BUFFER;break;case"ls":c.type=Laya.Scene;break;case"lh":c.type=Laya.Sprite3D;break;case"lm":c.type=Laya.MeshSprite3D}r[c.name]=c}for(var l in a){var h,u=a[l],p=u.keys.split(","),d=[];for(h in p){var f=p[h];if(""!=f){var m=r[f].url;m=m.replace("res/",n.AssetPath.res),d.push({url:i.Global.getUrl(m),type:r[f].type})}}this.ResDic[u.name]=d}Laya.loader.clearRes(n.AssetPath.getResConfig())}},t.inited=!1,t}(Laya.EventDispatcher);a.RecConfigs=o},{"../Global":38,"./AssetPath":15}],17:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Config/AssetPath"),i=function(e){function t(){var a=e.call(this)||this;return a._isbgOpen=!0,a.open=!0,a._isAllOpen=!0,a._nowBgName="",a._isPlaybging=!1,a._soundIndex=0,t.ins=a,a}return __extends(t,e),Object.defineProperty(t,"Instance",{get:function(){return null==t.ins?new t:t.ins},enumerable:!0,configurable:!0}),t.prototype.init=function(){Laya.SoundManager.autoReleaseSound=!1,Laya.SoundManager.autoStopMusic=!0},Object.defineProperty(t.prototype,"gamesoundOpen",{set:function(e){this.open=e,Laya.SoundManager.soundMuted=!e,1==e?fairygui.UIConfig.buttonSoundVolumeScale=1:fairygui.UIConfig.buttonSoundVolumeScale=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"GetSoundSwitch",{get:function(){return this.open},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isbgOpen",{get:function(){return this._isbgOpen},set:function(e){this._isbgOpen=e,Laya.SoundManager.musicMuted=!e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAllOpen",{get:function(){return this._isAllOpen},set:function(e){e?(this._soundIndex--,this._soundIndex<0&&(this._soundIndex=0),this._isPlaybging||0!=this._soundIndex?this._isAllOpen=!1:(this._isAllOpen=!0,this.setGameVolume(1),this.playbgSound(this._nowBgName),fairygui.UIConfig.buttonSoundVolumeScale=1)):(this._isAllOpen=!1,this._soundIndex<0&&(this._soundIndex=0),this._soundIndex++,this._isPlaybging&&this.stopbgSound(),this.setGameVolume(0),fairygui.UIConfig.buttonSoundVolumeScale=0)},enumerable:!0,configurable:!0}),t.prototype.stopGameSound=function(){Laya.SoundManager.stopAllSound()},t.prototype.ClearAllSOUND=function(){this.stopGameSound(),this.stopbgSound()},t.prototype.playbgSound=function(e){this._nowBgName=e,this._isAllOpen&&""!=this._nowBgName&&this._soundIndex<=0&&!this._isPlaybging&&(this._isPlaybging=!0,Laya.SoundManager.playMusic(n.AssetPath.getsound(this._nowBgName)),this.bgSoundVolume=.4)},t.prototype.stopbgSound=function(){this._isPlaybging=!1,Laya.SoundManager.stopMusic()},Object.defineProperty(t.prototype,"bgSoundVolume",{get:function(){return Laya.SoundManager.musicVolume},set:function(e){Laya.SoundManager.setMusicVolume(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"soundVolume",{get:function(){return Laya.SoundManager.soundVolume},set:function(e){Laya.SoundManager.setSoundVolume(e)},enumerable:!0,configurable:!0}),t.prototype.setGameVolume=function(e){this.bgSoundVolume=e,this.soundVolume=e},t.prototype.playGameSound=function(e,t){void 0===t&&(t=1),this._isAllOpen&&""!=e&&0!=Laya.SoundManager.soundVolume&&Laya.SoundManager.playSound(n.AssetPath.getsound(e),t)},t}(Laya.EventDispatcher);a.AudioControl=i},{"../Config/AssetPath":15}],18:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./ResourceControl"),i=e("../utils/SkinItem"),o=function(e){function t(){var t=e.call(this)||this;return t.motionCross=!1,t.blendType=0,t.motionIndex=0,t.motions=["run","run_2","attack","attack_1","attack_2","dead","idle_2","idle_3","idle_4","idle4","reload","replace","replace_2","stop"],t}return __extends(t,e),t.ConnectComponent=function(){fairygui.UIObjectFactory.setPackageItemExtension("ui://lecxynh2pwlk1a",i.SkinItem)},t.prototype.sceneLoaded=function(e){Laya.stage.addChild(e);var t=e.getChildAt(2).getComponent(Laya.Animator);this.addButton(100,100,160,30,"动画过渡:否",20,function(e){this.motionCross=!this.motionCross,this.motionCross?e.target.label="动画过渡:是":e.target.label="动画过渡:否"}),this.addButton(100,160,160,30,"混合模式:全身",20,function(e){switch(this.blendType++,3===this.blendType&&(this.blendType=0),this.blendType){case 0:e.target.label="混合模式:全身";break;case 1:e.target.label="混合模式:上身";break;case 2:e.target.label="混合模式:下身"}}),this.addButton(100,220,260,40,"切换动作:attack_2",28,function(e){switch(this.blendType){case 0:this.motionCross?(t.crossFade(this.motions[this.motionIndex],.2,0),t.crossFade(this.motions[this.motionIndex],.2,1)):(t.play(this.motions[this.motionIndex],0),t.play(this.motions[this.motionIndex],1));break;case 1:this.motionCross?t.crossFade(this.motions[this.motionIndex],.2,0):t.play(this.motions[this.motionIndex],0);break;case 2:this.motionCross?t.crossFade(this.motions[this.motionIndex],.2,1):t.play(this.motions[this.motionIndex],1)}e.target.label="切换动作:"+this.motions[this.motionIndex],this.motionIndex++,this.motionIndex===this.motions.length&&(this.motionIndex=0)})},t.prototype.addButton=function(e,t,a,n,i,o,r){var s=this;Laya.loader.load(["res/threeDimen/ui/button.png"],Laya.Handler.create(null,function(){var c=Laya.stage.addChild(new Laya.Button("res/threeDimen/ui/button.png",i));c.size(a,n),c.labelBold=!0,c.labelSize=o,c.sizeGrid="4,4,4,4",c.scale(Laya.Browser.pixelRatio,Laya.Browser.pixelRatio),c.pos(e,t),c.on(Laya.Event.CLICK,s,r)}))},t.Connnect=function(){this.ConnectFairygui(),this.ConnectComponent()},t.ConnectFairygui=function(){fairygui.UIConfig.gameLoaderManager=n.ResourceControl.Instance,fairygui.UIConfig.gameEffectDict={}},t}(Laya.EventDispatcher);a.ConnectControl=o},{"../utils/SkinItem":77,"./ResourceControl":25}],19:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./LocalDataControl"),i=e("../Time/TimeUtils"),o=e("../Data/UserDataInfo"),r=e("../Time/TimesTamper"),s=function(){function e(){e.ins=this}return Object.defineProperty(e,"Instance",{get:function(){return null==e.ins?new e:e.ins},enumerable:!0,configurable:!0}),e.prototype.loadUI=function(){Laya.loader.load(["res/threeDimen/ui/button.png"],Laya.Handler.create(this,function(){var e=Laya.stage.addChild(new Laya.Button("res/threeDimen/ui/button.png","关闭HDR"));e.size(200,40),e.labelBold=!0,e.labelSize=30,e.sizeGrid="4,4,4,4",e.scale(Laya.Browser.pixelRatio,Laya.Browser.pixelRatio),e.pos(Laya.stage.width/2-e.width*Laya.Browser.pixelRatio/2,Laya.stage.height-60*Laya.Browser.pixelRatio),e.on(Laya.Event.CLICK,this,function(){var t=this.camera.enableHDR;t?e.label="开启HDR":e.label="关闭HDR",this.camera.enableHDR=!t})}))},e.prototype.SetSelf=function(){var t=n.LocalDataControl.Instance.getstr(o.UserDataInfo.lastDay),a=i.TimeUtils.formatYearMonthDate1(r.TimesTamper.Instance.serverTime);t!=a?(n.LocalDataControl.Instance.addstr(o.UserDataInfo.lastDay,a),e.Fresh=!0):e.Fresh=!1},e}();a.DateControl=s},{"../Data/UserDataInfo":32,"../Time/TimeUtils":47,
  2. "../Time/TimesTamper":49,"./LocalDataControl":22}],20:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../JoystickModule"),i=e("../utils/DispatcherManager"),o=e("../utils/GameState"),r=e("../Control/SceneControl"),s=e("../PrefabControl/PropManager"),c=e("../Time/TimerService"),l=e("../CFG/GameCFG"),h=e("../Control/AudioControl"),u=e("../WXSDK/Sdk"),p=e("../PrefabControl/PanelResDic"),d=e("../Agency/AgencyUserMessage"),f=e("../Agency/AgencyTrial"),m=e("../Agency/AgencySkin"),g=function(){function e(){this.nowGameState=0,this._zhuanxiangbeishu=0,this._huadongSpeedX=0,this._huadongClimbSpeedX=0,this.endGamePlayerArr=[],this._isneedShunyiX=!1,this._nowTime=0,this._lastAngle=0,this._time=0,this.nowMingCi=0,this._nums=0,this._all=0,e.ins=this}return Object.defineProperty(e,"Instance",{get:function(){return null==e.ins?new e:e.ins},enumerable:!0,configurable:!0}),e.prototype.init=function(){this._huadongSpeedX=Number(l["default"].dict[4].value),this._huadongClimbSpeedX=Number(l["default"].dict[5].value),l["default"].dict[7]?this._zhuanxiangbeishu=Number(l["default"].dict[7].value):this._zhuanxiangbeishu=2,this.initEvent()},e.prototype.initEvent=function(){i.DispatcherManager.addEventListener(o.GameState.end,this,this.endGame),i.DispatcherManager.addEventListener(o.GameState.npcend,this,this.npcendGameHandler)},e.prototype.npcendGameHandler=function(e){this.endGamePlayerArr.push(e)},e.prototype.setClickPanel=function(e){this._joystickModule=new n.JoystickModule(e),this._joystickModule.setEventCallback(this,this.ondownfun,this.onmovefun,this.onupfun)},e.prototype.ondownfun=function(){this._lastAngle=0,this._nowTime=Laya.Browser.now()/1e3},e.prototype.onmovefun=function(e){if(1==this.nowGameState){var t=this._joystickModule.angle-this._lastAngle;this._lastAngle=this._joystickModule.angle,s.PropManager.iscarmanpc?s.PropManager.npcscriptDict.npc_0.Joy(e>0?this._huadongSpeedX:-this._huadongSpeedX,t*this._zhuanxiangbeishu):r.SceneControl.Instance.PlayerScript.Joy(e>0?this._huadongSpeedX:-this._huadongSpeedX,e>0?this._huadongClimbSpeedX:-this._huadongClimbSpeedX,t*this._zhuanxiangbeishu)}},e.prototype.onupfun=function(){s.PropManager.iscarmanpc?s.PropManager.npcscriptDict.npc_0.Joy(0,0):1==this.nowGameState&&r.SceneControl.Instance.PlayerScript.Joy(0,0,0)},e.prototype.update=function(e){if(1==this.nowGameState){this._time=0;var t=s.PropManager.npcscriptDict;this._nums=0,this._all=0;var a,n;for(a in t)n=t[a],1==n.getAction()&&(s.PropManager.mainRole.transform.position.z<n.getPostion().z&&this._nums++,this._all++);this.nowMingCi=this.endGamePlayerArr.length+(this._all+1-this._nums),s.PropManager.txt_mingci.text="第"+this.nowMingCi+"名"}},e.prototype.startGame=function(){var e=p.PanelResDic.Instance.getSingleTon(d.AgencyUserMessage).RoleData,t=p.PanelResDic.Instance.getSingleTon(m.AgencySkin),a=t.GainNoHaveSkin();e.LevelID<3||0==a.length?this.entergame():p.PanelResDic.Instance.getSingleTon(f.AgencyTrial).openview(a)},e.prototype.entergame=function(){this.nowMingCi=0,this.endGamePlayerArr.length=0,this.nowGameState=1,c.TimerService.Instance.addUpdateTarget(this),this.update(500),i.DispatcherManager.dispatchEvent(o.GameState.start),h.AudioControl.Instance.playbgSound("bgm"),u.WxApi.recordAldEvent("主界面点击开始游戏...")},e.prototype.stopGame=function(){this.nowGameState=2,this.onupfun()},e.prototype.endGame=function(){if(s.PropManager.jiantouArr&&s.PropManager.jiantouArr.length>0)for(var e=s.PropManager.jiantouArr,t=e.length-1;t>=0;t--)e[t].destroy(),e.splice(t,1);s.PropManager.jiantouArr.length=0,this.nowGameState=0,c.TimerService.Instance.removeUpdateTarget(this);var a=s.PropManager.npcscriptDict;if(a)for(var n in a)a[n].stop();this.onupfun(),h.AudioControl.Instance.stopbgSound()},e}();a.GameStateControl=g},{"../Agency/AgencySkin":6,"../Agency/AgencyTrial":7,"../Agency/AgencyUserMessage":8,"../CFG/GameCFG":10,"../Control/AudioControl":17,"../Control/SceneControl":26,"../JoystickModule":40,"../PrefabControl/PanelResDic":45,"../PrefabControl/PropManager":46,"../Time/TimerService":48,"../WXSDK/Sdk":62,"../utils/DispatcherManager":70,"../utils/GameState":71}],21:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Global"),i=e("../utils/LayOUT"),o=function(e){function t(){var a=e.call(this)||this;return a._uilayerZorder=0,a._upuilayerZorder=200,a._tipslayerZorder=1e3,a._guidelayerZorder=600,a.uiLayer=new fairygui.GComponent,a.topLayer=new fairygui.GComponent,a.background=new fairygui.GComponent,a._position=new Laya.Vector3,a._outPos=new Laya.Vector3,a.scaleDelta=0,t.ins=a,a}return __extends(t,e),Object.defineProperty(t,"Instance",{get:function(){return null==t.ins?new t:t.ins},enumerable:!0,configurable:!0}),t.prototype.AddLayerByName=function(e,a){a==i.LayOUT.BG?t.Instance.background.addChild(e):a==i.LayOUT.UI?(this._uilayerZorder++,t.Instance.uiLayer.addChild(e),e.sortingOrder=this._uilayerZorder):a==i.LayOUT.UITop?(this._upuilayerZorder++,t.Instance.uiLayer.addChild(e),e.sortingOrder=this._upuilayerZorder):a==i.LayOUT.TIP?(this._tipslayerZorder++,t.Instance.uiLayer.addChild(e),e.sortingOrder=this._tipslayerZorder):a==i.LayOUT.GUIDE&&(this._guidelayerZorder++,t.Instance.uiLayer.addChild(e),e.sortingOrder=this._guidelayerZorder)},t.prototype.initlayer=function(){n.Global.stage.addChild(fairygui.GRoot.inst.displayObject),fairygui.GRoot.inst.addChild(this.background),fairygui.GRoot.inst.addChild(this.uiLayer),fairygui.GRoot.inst.addChild(this.topLayer)},t.prototype.addHorizontalBox=function(e,t,a){var n=this.scene.addChild(new Laya.MeshSprite3D(this.mesh2));n.meshRenderer.material=this.mat1,n.meshRenderer.castShadow=!0,n.meshRenderer.receiveShadow=!0,this.tmpVector.setValue(e,t,a),n.transform.position=this.tmpVector;var i=n.addComponent(Laya.Rigidbody3D);i.mass=10,i.friction=1,i.restitution=.2;var o=new Laya.BoxColliderShape(2,.33,.5);i.colliderShape=o},t.prototype.ClearLayerByName=function(e){switch(e){case i.LayOUT.UI:this._uilayerZorder--,this._uilayerZorder<0&&(this._uilayerZorder=0);break;case i.LayOUT.UITop:this._upuilayerZorder--,this._upuilayerZorder<200&&(this._upuilayerZorder=200);break;case i.LayOUT.TIP:this._tipslayerZorder--,this._tipslayerZorder<1e3&&(this._tipslayerZorder=1e3);break;case i.LayOUT.GUIDE:this._tipslayerZorder--,this._tipslayerZorder<600&&(this._tipslayerZorder=600)}},t.prototype.onComplete=function(){this.scene.addChild(Laya.Loader.getRes("res/threeDimen/staticModel/grid/plane.lh"));this.layaMonkey2D=Laya.stage.addChild(new Laya.Image("res/threeDimen/monkey.png")),Laya.timer.frameLoop(1,this,this.animate)},t.prototype.animate=function(){this._position.x=Math.sin(this.scaleDelta+=.01),this.camera.viewport.project(this._position,this.camera.projectionViewMatrix,this._outPos),this.layaMonkey2D.pos(this._outPos.x/Laya.stage.clientScaleX,this._outPos.y/Laya.stage.clientScaleY)},t}(Laya.EventDispatcher);a.LayoutControl=o},{"../Global":38,"../utils/LayOUT":75}],22:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Global"),i=e("../WXSDK/PlatfromType"),o=function(e){function t(){var a=e.call(this)||this;return t.ins=a,a}return __extends(t,e),Object.defineProperty(t,"Instance",{get:function(){return null==t.ins?new t:t.ins},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.AddData=function(e,t){this.AddLocalData(e,t)},t.prototype.getObj=function(e){return this.GetLocalCaCheData(e)},t.prototype.addstr=function(e,t){this.addCacheStr(e,t)},t.prototype.addnum=function(e,t){this.addCacheStr(e,t.toString())},t.prototype.getstr=function(e){return this.getCachestr(e)},t.prototype.getnum=function(e){return Number(this.getCachestr(e))},t.prototype.removeCache=function(e){this.removeselectCache(e)},t.prototype.clearAll=function(){this.clearAllCache()},t.prototype.AddLocalData=function(e,t){switch(n.Global.nowplatfrom){case i.PlatfromType.wx:this.setStorageSyncWX(e,t);break;default:Laya.LocalStorage.setJSON(e,t)}},t.prototype.GetLocalCaCheData=function(e){var t;switch(n.Global.nowplatfrom){case i.PlatfromType.wx:t=this.getStorageSyncWX(e);break;default:t=Laya.LocalStorage.getJSON(e)}return t||(t={}),t},t.prototype.addCacheStr=function(e,t){switch(n.Global.nowplatfrom){case i.PlatfromType.wx:this.setStorageSyncWX(e,t);break;default:Laya.LocalStorage.setItem(e,t)}},t.prototype.getCachestr=function(e){var t="0";switch(n.Global.nowplatfrom){case i.PlatfromType.wx:t=this.getStorageSyncWX(e);break;default:t=Laya.LocalStorage.getItem(e)}return(null==t||""==t)&&(t="0"),t},t.prototype.removeselectCache=function(e){switch(n.Global.nowplatfrom){case i.PlatfromType.wx:this.removeStorageWX(e);break;default:Laya.LocalStorage.removeItem(e)}},t.prototype.clearAllCache=function(){switch(n.Global.nowplatfrom){case i.PlatfromType.wx:this.clearStorageWX();break;default:Laya.LocalStorage.clear()}},t.prototype.setStorageSyncWX=function(e,t){var a=Laya.Browser.window.wx;a&&a.setStorageSync(e,t)},t.prototype.getStorageSyncWX=function(e){var t=Laya.Browser.window.wx;return t?t.getStorageSync(e):null},t.prototype.removeStorageWX=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.removeStorage(e)},t.prototype.clearStorageWX=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.clearStorageSync()},t}(Laya.EventDispatcher);a.LocalDataControl=o},{"../Global":38,"../WXSDK/PlatfromType":60}],23:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/ResDataControl"),i=e("../Control/ResourceControl"),o=e("../utils/DispatcherManager"),r=e("../PrefabControl/PanelResDic"),s=e("../utils/ViewAction"),c=e("../View/ViewManager"),l=e("../Data/ComponentEventData"),h=e("../PrefabControl/GamePool"),u=function(e){function t(t,a,n,i,o,r){void 0===t&&(t=""),void 0===a&&(a=""),void 0===n&&(n=!1),void 0===i&&(i=s.ViewAction.ActionType_none),void 0===o&&(o=0),void 0===r&&(r=!0);var c=e.call(this)||this;return c.isguideing=!1,c.PackageName="",c.ResourcesName="",c._iscache=!0,c._ActionType=s.ViewAction.ActionType_none,c._clickBgIsColse=0,c.EventResDic={},c.EventGlobal={},c._iscache=r,c.PackageName=t,c.ResourcesName=a,c._isAddpackage=n,c._ActionType=i,c._clickBgIsColse=o,c.showModalWait(),c}return __extends(t,e),t.prototype.ResolveUI=function(e,t,a,i,o,r){void 0===i&&(i=s.ViewAction.ActionType_none),void 0===o&&(o=0),void 0===r&&(r=!0),this.PackageName=e,this.ResourcesName=t,this._ActionType=i,this._clickBgIsColse=o,n.ResDataControl.Instance.AddViewPackByName(e,a,r),this.contentPane=fairygui.UIPackage.createObject(e,t).asCom;for(var c in this.contentPane._children){var l=this.contentPane._children[c];if("item_panel"==l.name){var h=l;if(h)for(var u in h._children){var p=h._children[u];this[p.name]=p}this.item_panel=l}else this[l.name]=l}this.setSize(fairygui.GRoot.inst.width,fairygui.GRoot.inst.height),this.contentPane.setPivot(.5,.5),this.setPivot(.5,.5),this.setclickBgIsColse(),this.initView(),this.initEvent(),this.ShowViewACTION()},t.prototype.LoadViewUI=function(e,t,a){this._loadTarget=t,this._onLoadedHandler=a,i.ResourceControl.Instance.loadGroup(e,this,this.LoadComplete)},t.prototype.createLabel=function(e,t){var a=4,n=new Laya.Label;return n.font="Microsoft YaHei",n.text="SAMPLE DEMO",n.fontSize=30,n.color=e,t&&(n.stroke=a,n.strokeColor=t),Laya.stage.addChild(n),n},t.prototype.loadUibyArr=function(e,t,a){this._loadTarget=t,this._onLoadedHandler=a,i.ResourceControl.Instance.Loaders(e,this,this.LoadComplete)},t.prototype.createRadioGroup=function(e){var t=new Laya.RadioGroup;return t.skin=e,t.space=70,t.direction="v",t.labels="Item1, Item2, Item3",t.labelColors="#787878,#d3d3d3,#FFFFFF",t.labelSize=20,t.labelBold=!0,t.labelPadding="5,0,0,5",t.selectHandler=new Laya.Handler(this,this.onSelectChange),Laya.stage.addChild(t),t},t.prototype.onSelectChange=function(e){console.log("你选择了第 "+(e+1)+" 项")},t.prototype.LoadComplete=function(){this._loadTarget&&this._onLoadedHandler&&this._onLoadedHandler.call(this._loadTarget)},t.prototype.removeEffectPackage=function(e){n.ResDataControl.Instance.ClearPackByName(e,!0)},t.prototype.getpanelController=function(e){return this.item_panel?this.item_panel.getController(e):null},t.prototype.setup=function(){this.createLabel("#FFFFFF",null).pos(30,50),this.createLabel("#00FFFF",null).pos(290,50),this.createLabel("#FFFF00","#FFFFFF").pos(30,100),this.createLabel("#000000","#FFFFFF").pos(290,100),this.createLabel("#FFFFFF","#00FFFF").pos(30,150),this.createLabel("#0080FF","#00FFFF").pos(290,150)},t.prototype.getpanelTransition=function(e){return this.item_panel?this.item_panel.getTransition(e):null},t.prototype.getChildformContentPanel=function(e){return this.contentPane?this.contentPane.getChild(e):null},t.prototype.onInit=function(){e.prototype.onInit.call(this),""!=this.PackageName&&""!=this.ResourcesName&&this.ResolveUI(this.PackageName,this.ResourcesName,this._isAddpackage,this._ActionType,this._clickBgIsColse,this._iscache)},t.prototype.initView=function(){},t.prototype.initEvent=function(){},t.prototype.ShowViewACTION=function(){switch(this._ActionType){case s.ViewAction.ActionType_none:this.windowanmoend();break;case s.ViewAction.ActionType_addmoveToMiddle:this.contentPane.x=fairygui.GRoot.inst.width,Laya.Tween.to(this.contentPane,{x:0},300,laya.utils.Ease.quadInOut,Laya.Handler.create(this,this.windowanmoend));break;case s.ViewAction.ActionType_addmoveFromBottom:this.contentPane.y=fairygui.GRoot.inst.height,Laya.Tween.to(this.contentPane,{y:0},300,laya.utils.Ease.quadInOut,Laya.Handler.create(this,this.windowanmoend));break;case s.ViewAction.ActionType_addscaleMinToMax:this.contentPane.scaleX=this.contentPane.scaleY=.01,Laya.Tween.to(this.contentPane,{scaleX:1,scaleY:1},300,laya.utils.Ease.quadInOut,Laya.Handler.create(this,this.windowanmoend))}},t.prototype.createCheckBox=function(e){var t=new Laya.CheckBox(e);return Laya.stage.addChild(t),t.labelColors="white",t.labelSize=20,t.labelFont="Microsoft YaHei",t.labelPadding="3,0,0,5",t},t.prototype.updateLabel=function(e){e.label=e.selected?"已选中":"未选中"},t.prototype.windowanmoend=function(){Laya.timer.callLater(this,this.onShowView)},t.prototype.onShowView=function(){this.closeModalWait(),this.showClickBg()},t.prototype.showClickBg=function(){this._clickBg&&(this._clickBg.alpha=.55,2!=this._clickBgIsColse||this.hasClickListener()||this._clickBg.onClick(this,this.ClickExitView))},t.prototype.ClickExitView=function(){c.ViewManager.Instance.close(this.viewKey,!0)},t.prototype.getProxy=function(e){return r.PanelResDic.Instance.getSingleTon(e)},t.prototype.ExitView=function(e){if(void 0===e&&(e=""),this._clickBg&&(this._clickBg.visible=!1),""==e)switch(this._ActionType){case s.ViewAction.ActionType_none:this.destory();break;case s.ViewAction.ActionType_addmoveToMiddle:Laya.Tween.to(this,{x:fairygui.GRoot.inst.width},300,laya.utils.Ease.quadInOut,Laya.Handler.create(this,this.destory));break;case s.ViewAction.ActionType_addmoveFromBottom:Laya.Tween.to(this,{y:fairygui.GRoot.inst.height},300,laya.utils.Ease.quadInOut,Laya.Handler.create(this,this.destory));break;case s.ViewAction.ActionType_addscaleMinToMax:Laya.Tween.to(this,{scaleX:.01,scaleY:.01},300,laya.utils.Ease.quadInOut,Laya.Handler.create(this,this.destory))}else switch(e){case s.ViewAction.ActionType_none:this.destory();break;case s.ViewAction.ActionType_removescaleMaxToMin:Laya.Tween.to(this,{scaleX:.01,scaleY:.01},300,laya.utils.Ease.quadInOut,Laya.Handler.create(this,this.destory));break;case s.ViewAction.ActionType_removemoveToRight:Laya.Tween.to(this,{x:fairygui.GRoot.inst.width},300,laya.utils.Ease.quadInOut,Laya.Handler.create(this,this.destory))}},t.prototype.getTransitionByName=function(e){return this.contentPane.getTransition(e)},t.prototype.dispacheDatatrigger=function(e,t){void 0===t&&(t=null),o.DispatcherManager.dispatchEvent(e,t)},t.prototype.addDataEvent=function(e,t,a){if(!this.EventGlobal.hasOwnProperty(e)){var n=h.GamePool.GetItem(l.ComponentEventData.ResDicValue);this.EventGlobal[e]=n,n.type=e,n.thisObject=t,n.listener=a,o.DispatcherManager.addEventListener(e,t,a)}},t.prototype.ClearEventData=function(e,t,a){if(this.EventGlobal[e]){var n=this.EventGlobal[e];o.DispatcherManager.removeEventListener(e,t,a),n.clear(),delete this.EventGlobal[e]}},t.prototype.ClearEventByType=function(e,t,a,n){if(e&&this.EventResDic[e.name]){var i,o=this.EventResDic[e.name],r=0,s=o.length;for(r;s>r;r++)if(i=o[r],i&&i.type==t&&i.thisObject==a&&i.listener==n){e.off(t,a,n),i.clear(),o.splice(r,1);break}}},t.prototype.AddEventByType=function(e,t,a,n,i){if(void 0===i&&(i=null),e){if(null==e.name||""==e.name)throw"baseview addListener target.name is null";var o=h.GamePool.GetItem(l.ComponentEventData.ResDicValue);o.target=e,o.type=t,o.thisObject=a,o.listener=n,this.EventResDic.hasOwnProperty(e.name)||(this.EventResDic[e.name]=[]);var r=this.JudgeIsHaveEvent(e,t);r||(e.on(t,a,n,i),this.EventResDic[e.name].push(o))}},t.prototype.JudgeIsHaveEvent=function(e,t){var a;a=this.EventResDic[e.name];var n;for(var i in a)if(n=a[i],n&&n.type==t)return!0;return!1},t.prototype.getComById=function(e){return this.contentPane.getChild(e).asCom},t.prototype.getControllerByBame=function(e){return this.contentPane.getController(e)},t.prototype.ClearEvent=function(){if(this.EventResDic){var e,t,a,n,i=this.EventResDic,o=0;for(e in i){if(t=i[e],t&&t.length>0)for(a=0,o=t.length,a=o-1;a>=0;a--)n=t[a],n&&(n.target&&n.target.off(n.type,n.thisObject,n.listener),n.clear()),t.splice(a,1);delete this.EventResDic[e]}}this.EventResDic={}},t.prototype.clearEvent=function(){},t.prototype.destory=function(){this.clearEvent(),this.closeModalWait(),this.ClearGlobalEvent(),this.ClearEvent(),this._loadTarget=null,this._onLoadedHandler=null,Laya.Tween.clearTween(this),n.ResDataControl.Instance.ClearPackByName(this.PackageName,!1),this.PackageName=null,this.ResourcesName=null,this._clickBg&&(this._clickBg.offClick(this,this.ClickExitView),this._clickBg.dispose(),this._clickBg=null),this.viewKey=null,this.dispose()},t.prototype.setclickBgIsColse=function(){this.isShowing&&this._clickBgIsColse>0&&this.contentPane&&(this._clickBg||""==t.viewbgUrl||(this._clickBg=new fairygui.GLoader,this._clickBg.touchable=!0,this._clickBg.setSize(fairygui.GRoot.inst.width,fairygui.GRoot.inst.height),this._clickBg.url=t.viewbgUrl,this._clickBg.fill=fairygui.LoaderFillType.ScaleFree,this._clickBg.alpha=0,this.contentPane.addChildAt(this._clickBg,0)))},t.prototype.ClearGlobalEvent=function(){if(this.EventGlobal){var e,t=this.EventGlobal;for(e in t){var a=t[e];a&&this.ClearEventData(a.type,a.thisObject,a.listener)}}this.EventGlobal={}},t.viewbgUrl="",t}(fairygui.Window);a.PanelBaseControl=u},{"../Control/ResDataControl":24,"../Control/ResourceControl":25,"../Data/ComponentEventData":27,"../PrefabControl/GamePool":44,"../PrefabControl/PanelResDic":45,"../View/ViewManager":57,"../utils/DispatcherManager":70,"../utils/ViewAction":78}],24:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./ResourceControl"),i=e("../Data/LocalData"),o=e("../PrefabControl/GamePool"),r=e("../Config/AssetPath"),s=e("../Time/TimerService"),c=Laya.Tab,l=function(){function e(){this._time=0,this.ClearInterval=5e4,this.CheckInterval=2e4,this.skins=["res/ui/tab1.png","res/ui/tab2.png"],e.ins=this}return Object.defineProperty(e,"Instance",{get:function(){return null==e.ins?new e:e.ins},enumerable:!0,configurable:!0}),e.prototype.AddPackByName=function(e,t,a,n){void 0===a&&(a=!0),void 0===n&&(n=!0),a&&fairygui.UIPackage.addPackage(e+t,t),this.AddLocalLiveData(t,n)},e.prototype.init=function(){o.GamePool.Mark(i.LocalData.ResDicValue,i.LocalData),this.urlRes={},this.packageRes={},this.NoLiveData={loading:!0,main:!0,uicomponent:!0},s.TimerService.Instance.addUpdateTarget(this)},e.prototype.RemoveResources=function(e,t){void 0===t&&(t=""),""!=t&&fairygui.UIPackage.removePackage(t);for(var a in e)this.RemoveResourcesByurl(e[a].url,!0)},e.prototype.placeHSlider=function(){var e=new Laya.HSlider;e.skin="res/ui/hslider.png",e.width=300,e.pos(50,170),e.min=0,e.max=100,e.value=50,e.tick=1,Laya.stage.addChild(e)},e.prototype.placeVSlider=function(){var e=new Laya.VSlider;e.skin="res/ui/vslider.png",e.height=300,e.pos(400,50),e.min=0,e.max=100,e.value=50,e.tick=1,Laya.stage.addChild(e)},e.prototype.update=function(e){if(this._time+=e,this._time>this.CheckInterval){if(n.ResourceControl.Instance.running)return void(this._time-=1e3);this.RefreshGroupRes(),this._time=0}},e.prototype.RemoveResourcesByurl=function(e,t){void 0===t&&(t=!1),this.urlRes.hasOwnProperty(e)?t?(Laya.loader.clearRes(e),delete this.urlRes[e]):this.urlRes[e]--:Laya.loader.clearRes(e)},e.prototype.ClearLiveDataByPackName=function(e){if(this.packageRes[e]){var t=this.packageRes[e];t.clear(),delete this.packageRes[e]}},e.prototype.AddViewPackByName=function(e,t,a){void 0===t&&(t=!0),void 0===a&&(a=!0),t&&("main"==e?fairygui.UIPackage.addPackage(r.AssetPath.res+r.AssetPath.ui+e,e):fairygui.UIPackage.addPackage(r.AssetPath.resources+r.AssetPath.ui+e,e)),this.AddLocalLiveData(e,a)},e.prototype.ClearPackByName=function(e,t){if(void 0===t&&(t=!1),""!=e&&null!=e)if(t)fairygui.UIPackage.removePackage(e),this.packageRes.hasOwnProperty(e)&&delete this.packageRes[e];else if(this.packageRes.hasOwnProperty(e)){var a=this.packageRes[e];a&&a.ref--}},e.prototype.RefreshGroupRes=function(){var e,t=Laya.Browser.now();if(this.packageRes){var a;for(e in this.packageRes)a=this.packageRes[e],a.ref<=0&&t-a.time>this.ClearInterval&&(this.ClearPackByName(a.packageName,!0),this.ClearLiveDataByPackName(a.packageName))}if(this.urlRes){var n=this.urlRes;for(e in n)n[e]<=0&&this.RemoveResourcesByurl(e,!0)}},e.prototype.onSkinLoaded=function(){var e=this.createTab(this.skins[0]);e.pos(40,120),e.labelColors="#000000,#d3d3d3,#333333";var t=this.createTab(this.skins[1]);t.pos(40,220),t.labelColors="#FFFFFF,#8FB299,#FFFFFF"},e.prototype.createTab=function(e){var t=new c;return t.skin=e,t.labelBold=!0,t.labelSize=20,t.labelStrokeColor="#000000",t.labels="Tab Control 1,Tab Control 2,Tab Control 3",t.labelPadding="0,0,0,0",t.selectedIndex=1,Laya.stage.addChild(t),t},e.prototype.GainResources=function(e,t){return void 0===t&&(t=!0),t&&(null==this.urlRes[e]&&(this.urlRes[e]=0),this.urlRes[e]++),Laya.loader.getRes(e)},e.prototype.AddLocalLiveData=function(e,t){if(t&&!this.NoLiveData.hasOwnProperty(e)){var a;this.packageRes.hasOwnProperty(e)?a=this.packageRes[e]:(a=o.GamePool.GetItem(i.LocalData.ResDicValue),a.packageName=e,this.packageRes[e]=a),a.ref++,a.time=Laya.Browser.now()}},e}();a.ResDataControl=l},{"../Config/AssetPath":15,"../Data/LocalData":29,"../PrefabControl/GamePool":44,"../Time/TimerService":48,"./ResourceControl":25}],25:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=Laya.Handler,i=e("../utils/DispatcherManager"),o=e("../Config/RecConfigs"),r=function(e){function t(){var a=e.call(this)||this;return a._groupIndex=0,a.running=!1,a._loadNum=0,a._loadedNum=0,a._preloadNum=0,a._cut=0,a._nowLoadArr=null,t.ins=a,a}return __extends(t,e),Object.defineProperty(t,"Instance",{get:function(){return null==t.ins?new t:t.ins},enumerable:!0,configurable:!0}),t.prototype.init=function(){this._configs=new Array,this._groups={},Laya.loader.retryNum=4,Laya.loader.on(Laya.Event.ERROR,this,this.onError),Laya.loader.on("errorsMsg",this,this.errorsMsghandler),Laya.loader.on("gameerrorsMsg",this,this.gameerrorsMsghandler)},t.prototype.onLoadConfigComplete=function(){null!=this._onConfigCompleteTarget&&null!=this._onConfigComplete&&this._onConfigComplete.call(this._onConfigCompleteTarget)},t.prototype.errorsMsghandler=function(e){i.DispatcherManager.dispatchEvent("loadfailEvent",e)},t.prototype.gameerrorsMsghandler=function(e){i.DispatcherManager.dispatchEvent("gameserrosEvent",e)},t.prototype.loadGroup=function(e,t,a,n,i,r){void 0===n&&(n=null),void 0===i&&(i=!0),void 0===r&&(r=null);var s={};s.complete=a,s.completeTarget=t,s.progress=n,s.urls=o.RecConfigs.Instance.ResDic[e],s.isShow=i,s.args=r,s.type="group",s.resouseType="2D",this._configs.push(s),this.loadStart()},t.prototype.Loader=function(e,t,a,n,i,o,r){void 0===i&&(i=null),void 0===o&&(o=!0),void 0===r&&(r=null);var s={};s.complete=n,s.completeTarget=a,s.progress=i,s.urls=[{url:e,type:t}],s.isShow=o,s.args=r,s.type="single",s.resouseType="2D",this._configs.push(s),this.loadStart()},t.prototype.Loaders=function(e,t,a,n,i,o){void 0===n&&(n=null),void 0===i&&(i=!0),void 0===o&&(o=null);var r={};r.complete=a,r.completeTarget=t,r.progress=n,r.urls=e,r.isShow=i,r.type="arr",r.args=o,r.resouseType="2D",this._configs.push(r),this.loadStart()},t.prototype.loaderArr=function(e,t,a,n,i){void 0===n&&(n=null),void 0===i&&(i=3);var o={};o.complete=a,o.completeTarget=t,o.progress=n,o.urls=e,o.isShow=!1,o.type="loaderArr",o.cut=i,o.resouseType="2D",this._configs.push(o),this.startLoad1()},t.prototype.startLoad1=function(){!this.running&&this._configs.length>0&&(this._nowLoadData=this._configs.shift(),this._nowLoadArr=this._nowLoadData.urls.concat().reverse(),this._loadNum=this._nowLoadArr.length,this._loadedNum=0,this._preloadNum=this._loadedNum,this._cut=Number(this._nowLoadData.cut),this.loadStart1())},t.prototype.loadStart1=function(){if(!this.running)if(this._nowLoadArr&&this._nowLoadArr.length>0){this.running=!0;var e;e=this._nowLoadArr.length>this._cut?this._nowLoadArr.splice(0,this._cut):this._nowLoadArr.splice(0),this._cut=e.length,this._preloadNum=this._loadedNum,this.onLoadingArr(0);var t=this._nowLoadData.resouseType;"2D"==t||null==t?Laya.loader.load(e,n.create(this,this.onLoadCompleteArr),n.create(this,this.onLoadingArr,null,!1)):Laya.loader.create(e,n.create(this,this.onLoadCompleteArr),n.create(this,this.onLoadingArr,null,!1))}else this._nowLoadData=null,this.startLoad1()},t.prototype.onLoadingArr=function(e){if(this._loadedNum=this._preloadNum+e*this._cut,this._nowLoadData){var t=Math.ceil(this._loadedNum/this._loadNum*100);null!=this._nowLoadData.progress&&this._nowLoadData.progress.call(this._nowLoadData.completeTarget,t,Math.floor(100*e))}},t.prototype.onLoadCompleteArr=function(){this.onLoadingArr(1),this._loadedNum=this._preloadNum+this._cut,this.running=!1,this._loadedNum==this._loadNum&&this._nowLoadData&&this._nowLoadData.complete&&this._nowLoadData.complete.call(this._nowLoadData.completeTarget),Laya.timer.callLater(this,this.loadStart1)},t.prototype.loadStart=function(){if(!this.running&&0!=this._configs.length){this.running=!0,this._nowLoadData=this._configs[0];var e=this._nowLoadData.urls,t=this._nowLoadData.isShow;t&&fairygui.GRoot.inst.showModalWait();var a=this._nowLoadData.resouseType;null!=e&&("2D"==a||null==a?Laya.loader.load(e,n.create(this,this.onLoadComplete),n.create(this,this.onLoading,null,!1)):Laya.loader.create(e,n.create(this,this.onLoadComplete),n.create(this,this.onLoading,null,!1)))}},t.prototype.onLoading=function(e){this._nowLoadData&&(e=Math.ceil(Number(100*e)),null!=this._nowLoadData.progress&&this._nowLoadData.progress.call(this._nowLoadData.completeTarget,e))},t.prototype.onLoadComplete=function(e){void 0===e&&(e=null),fairygui.GRoot.inst.closeModalWait(),this._nowLoadData&&this._nowLoadData.complete&&(this._nowLoadData.args?this._nowLoadData.complete.call(this._nowLoadData.completeTarget,this._nowLoadData.args):this._nowLoadData.complete.call(this._nowLoadData.completeTarget)),this.running=!1,this._nowLoadData=null,this._configs.shift(),this.loadStart()},t.prototype.onError=function(e){fairygui.GRoot.inst.closeModalWait()},t.prototype.Loader3D=function(e,t,a,n,i,o){void 0===i&&(i=null),void 0===o&&(o=!0);var r={};r.complete=n,r.completeTarget=a,r.progress=i,r.urls=[{url:e,type:t}],r.isShow=o,r.type="single",r.resouseType="3D",this._configs.push(r),this.loadStart()},t.prototype.loadGroup3D=function(e,t,a,n,i,r){void 0===n&&(n=null),void 0===i&&(i=!0),void 0===r&&(r=null);var s={};s.complete=a,s.completeTarget=t,s.progress=n,s.urls=o.RecConfigs.Instance.ResDic[e],s.isShow=i,s.args=r,s.type="group",s.resouseType="3D",this._configs.push(s),this.loadStart()},t.prototype.loader3DArr=function(e,t,a,n,i,o){void 0===n&&(n=null),void 0===i&&(i=!1),void 0===o&&(o=null);var r={};r.complete=a,r.completeTarget=t,r.progress=n,r.urls=e,r.isShow=i,r.args=o,r.type="loaderArr",r.resouseType="3D",this._configs.push(r),this.loadStart()},t.prototype.loadEffect=function(e,t,a,i){void 0===i&&(i=null);var r=o.RecConfigs.Instance.ResDic[e];r&&r.length>0&&Laya.loader.load(r,n.create(t,a,[i]))},t}(Laya.EventDispatcher);a.ResourceControl=r},{"../Config/RecConfigs":16,"../utils/DispatcherManager":70}],26:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./LayoutControl"),i=e("../Config/AssetPath"),o=e("../Game/CameraManager"),r=e("../PrefabControl/PropManager"),s=e("../Game/Player"),c=e("../utils/DispatcherManager"),l=e("../utils/GameState"),h=e("../Agency/AgencyUserMessage"),u=e("../PrefabControl/PanelResDic"),p=e("../utils/GameUtils"),d=e("../CFG/NpcCFG"),f=e("../Game/NpcScript"),m=e("./ResourceControl"),g=e("../CFG/GameCFG"),y=e("../PrefabControl/CharacterState"),_=e("../Data/UserInfoEvent"),v=e("../PrefabControl/CharacterPool"),w=Laya.Sprite,C=Laya.Event,b=function(){function e(){this._initPosY=1,this.preRadian=0,e.ins=this}return Object.defineProperty(e,"Instance",{get:function(){return null==e.ins?new e:e.ins},enumerable:!0,configurable:!0}),e.prototype.CreatePlayer=function(e){var t=!1;r.PropManager.mainRole?r.PropManager.mainRole.name!="Character"+e.name&&(t=!0,this.ClearMomentCharacter()):t=!0,t&&(r.PropManager.mainRole=v.CharacterPool.AddCharacter(e.name,s.Player,r.PropManager.scene3D),r.PropManager.mainRole.name="Character"+e.name,this.PlayerScript=r.PropManager.mainRole.getComponent(s.Player));var a,n=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage),i=n.RoleData,o=i.levelcfg.roleinitpos,c=p.GameUtils.cutstrtoArr(o.offsetPos),l=new Laya.Vector3(Number(c[0]),Number(c[1]),Number(c[2])),d=new Laya.Vector3;if("startpanel"==o.initbuild)d.x=r.PropManager.startPlane.transform.position.x+l.x,d.y=r.PropManager.startPlane.transform.position.y+l.y,d.z=r.PropManager.startPlane.transform.position.z+l.z,a=r.PropManager.startPlane.getChildByName("child_pos").transform.position;else{var f=r.PropManager.getPosVecbyScene(i.levelmapArr[0],o.initbuild);d.x=f.x+l.x,d.y=f.y+l.y,d.z=f.z+l.z,a=f}r.PropManager.mainRole.transform.position=d,this.cameraScript.SetCameraPosition(r.PropManager.mainRole.transform.position),this.PlayerScript.setnowSelectVec(a),this.PlayerScript.nowAction=y.CharacterState.stand,this.PlayerScript.PlayAnimator(y.CharacterState.stand)},e.prototype.createNpc=function(){this.ClearNpc();var e,t=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage),a=t.RoleData,n=a.levelcfg.npc,o=0;r.PropManager.npcnum=n.length;for(var s in n){e=n[s];var c=null,l=d["default"].dict[e.id],m=(Laya.Loader.getRes(i.AssetPath.get3DRoleModel(l.name)),p.GameUtils.cutstrtoArr(e.offsetPos)),g=new Laya.Vector3(Number(m[0]),Number(m[1]),Number(m[2])),_=new Laya.Vector3;if("startpanel"==e.scene)_.x=r.PropManager.startPlane.transform.position.x+g.x,_.y=r.PropManager.startPlane.transform.position.y+1+g.y,_.z=r.PropManager.startPlane.transform.position.z+g.z,c=r.PropManager.startPlane.getChildByName("child_pos").transform.position;else{var w=r.PropManager.getPosVecbyScene(e.scene,e.initbuild);_.x=w.x+g.x,_.y=w.y+g.y,_.z=w.z+g.z,c=w}var C=v.CharacterPool.AddCharacter(l.name,f.NpcScript,r.PropManager.scene3D);C.name="npc_"+o,C.transform.position=_;var b=C.getComponent(f.NpcScript);b.setnowSelectVec(c),b.npcinfo(l),r.PropManager.npcDict[C.name]=C,r.PropManager.npcscriptDict[C.name]=b,b.PlayAnimator(y.CharacterState.stand),o++}},e.prototype.ShowTheGameScene=function(){var e=[],t=[];this.cameraScript.iscanfollow=!0;var a=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage).RoleData,n=a.levelmapArr,o=0;for(o=0;o<n.length;o++)-1==t.indexOf(i.AssetPath.get3DModel(n[o]))&&t.push(i.AssetPath.get3DModel(n[o]));var r=a.levelcfg.npc;for(o=0;o<r.length;o++)-1==t.indexOf(i.AssetPath.get3DRoleModel(d["default"].dict[r[o].id].name))&&t.push(i.AssetPath.get3DRoleModel(d["default"].dict[r[o].id].name));
  3. for(o=0;o<t.length;o++)e.push({url:t[o]});m.ResourceControl.Instance.loader3DArr(e,this,this.SceneCreatComplete,null,!0)},e.prototype.SceneCreatComplete=function(){this.RefreshTerrain();var e=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage),t=e.RoleData;this.CreatePlayer(t.roleCfg),this.createNpc()},e.prototype.ListenOnEvent=function(){c.DispatcherManager.addEventListener(l.GameState.start,this,this.EnterGame),c.DispatcherManager.addEventListener(l.GameState.jump,this,this.Jump),c.DispatcherManager.addEventListener(_.UserInfoEvent.userinfoEvent_updateroleid,this,this.RefreshCharacterModel)},e.prototype.CharacterLoadEnd=function(e){var t=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage),a=t.RoleData;i.AssetPath.get3DModel(a.roleCfg.name)==e&&this.CreatePlayer(a.roleCfg)},e.prototype.Jump=function(){this.PlayerScript.TestJump()},e.prototype.setup=function(){this.createSprite(),Laya.stage.on(C.MOUSE_UP,this,this.onMouseUp),Laya.stage.on(C.MOUSE_OUT,this,this.onMouseUp)},e.prototype.createSprite=function(){this.sp=new w;var e=200,t=300;this.sp.graphics.drawRect(0,0,e,t,"#FF7F50"),this.sp.size(e,t),this.sp.pivot(e/2,t/2),this.sp.pos(Laya.stage.width/2,Laya.stage.height/2),Laya.stage.addChild(this.sp),this.sp.on(C.MOUSE_DOWN,this,this.onMouseDown)},e.prototype.onMouseDown=function(e){var t=e.touches;t&&2==t.length&&(this.preRadian=Math.atan2(t[0].stageY-t[1].stageY,t[0].stageX-t[1].stageX),Laya.stage.on(C.MOUSE_MOVE,this,this.onMouseMove))},e.prototype.onMouseMove=function(e){var t=e.touches;if(t&&2==t.length){var a=Math.atan2(t[0].stageY-t[1].stageY,t[0].stageX-t[1].stageX);this.sp.rotation+=180/Math.PI*(a-this.preRadian),this.preRadian=a}},e.prototype.onMouseUp=function(e){Laya.stage.off(C.MOUSE_MOVE,this,this.onMouseMove)},e.prototype.EnterGame=function(){this.PlayerScript.startRun();var e=r.PropManager.npcscriptDict;for(var t in e){var a=e[t];a.startRun()}},e.prototype.ClearMomentCharacter=function(){r.PropManager.mainRole&&this.PlayerScript&&(v.CharacterPool.ClearCharacter(r.PropManager.mainRole,this.PlayerScript.resouseName,this.PlayerScript),this.PlayerScript=null,r.PropManager.mainRole=null)},e.prototype.SetScene=function(){var e=n.LayoutControl.Instance.background.displayObject,t=fairygui.UIPackage.createObject("main","gambg");t.setSize(fairygui.GRoot.inst.width,fairygui.GRoot.inst.height),n.LayoutControl.Instance.background.addChild(t),r.PropManager.scene3D=e.addChild(new Laya.Scene3D),r.PropManager.scene3D.physicsSimulation.continuousCollisionDetection=!0,r.PropManager.carma=r.PropManager.scene3D.addChild(new Laya.Camera(0,.1,70)),this.cameraScript=r.PropManager.carma.addComponent(o.CameraManager),r.PropManager.carma.clearFlag=Laya.BaseCamera.CLEARFLAG_DEPTHONLY;var a=Laya.Loader.getRes(i.AssetPath.get3DModel("DirectionalLight"));r.PropManager.scene3D.addChild(a),r.PropManager.startPlane=Laya.Loader.getRes(i.AssetPath.get3DModel("startpanel")),console.log(r.PropManager.startPlane),r.PropManager.scene3D.addChild(r.PropManager.startPlane),r.PropManager.endPlane=Laya.Loader.getRes(i.AssetPath.get3DModel("endpanel")),r.PropManager.scene3D.addChild(r.PropManager.endPlane),r.PropManager.scene3D.enableFog=!0;p.GameUtils.cutstrtoArr(g["default"].dict[2].value);if(g["default"].dict[8]){var s=p.GameUtils.cutstrtoArr(g["default"].dict[8].value);r.PropManager.scene3D.fogColor=new Laya.Vector3(Number(s[0]),Number(s[1]),Number(s[2]))}else r.PropManager.scene3D.fogColor=new Laya.Vector3(0,0,.6);var c=p.GameUtils.cutstrtoArr(g["default"].dict[3].value);r.PropManager.scene3D.fogStart=Number(c[0]),r.PropManager.scene3D.fogRange=Number(c[1]),this.ShowTheGameScene(),this.ListenOnEvent()},e.prototype.ClearNpc=function(){var e,t=r.PropManager.npcDict;for(e in t){var a=t[e],n=r.PropManager.npcscriptDict[e],i=n.resouseName;v.CharacterPool.ClearCharacter(a,i,n),delete r.PropManager.npcscriptDict[e],delete t[e]}},e.prototype.Pattern=function(e){r.PropManager.patternDict[e.name]&&delete r.PropManager.patternDict[e.name];for(var t,a,n=e.getChildByName("Blocks"),o={},s=0;n.getChildByName("build_all_"+s);)a=n.getChildByName("build_all_"+s),t=a.getChildByName("child_pos"),o["build_all_"+s]=t.transform.position,r.PropManager.diePosY>a.transform.position.y&&(r.PropManager.diePosY=a.transform.position.y),s++;for(s=0;n.getChildByName("build_front_"+s);)a=n.getChildByName("build_front_"+s),t=a.getChildByName("child_pos"),o["build_front_"+s]=t.transform.position,r.PropManager.diePosY>a.transform.position.y&&(r.PropManager.diePosY=a.transform.position.y),s++;for(s=0;n.getChildByName("build_left_"+s);)a=n.getChildByName("build_left_"+s),t=a.getChildByName("child_pos"),o["build_left_"+s]=t.transform.position,r.PropManager.diePosY>a.transform.position.y&&(r.PropManager.diePosY=a.transform.position.y),s++;for(s=0;n.getChildByName("build_right_"+s);)a=n.getChildByName("build_right_"+s),t=a.getChildByName("child_pos"),o["build_right_"+s]=t.transform.position,r.PropManager.diePosY>a.transform.position.y&&(r.PropManager.diePosY=a.transform.position.y),s++;for(s=0;n.getChildByName("build_frontleft_"+s);)a=n.getChildByName("build_frontleft_"+s),t=a.getChildByName("child_pos"),o["build_frontleft_"+s]=t.transform.position,r.PropManager.diePosY>a.transform.position.y&&(r.PropManager.diePosY=a.transform.position.y),s++;for(s=0;n.getChildByName("build_frontright_"+s);)a=n.getChildByName("build_frontright_"+s),t=a.getChildByName("child_pos"),o["build_frontright_"+s]=t.transform.position,r.PropManager.diePosY>a.transform.position.y&&(r.PropManager.diePosY=a.transform.position.y),s++;for(s=0;n.getChildByName("build_leftright_"+s);)a=n.getChildByName("build_leftright_"+s),t=a.getChildByName("child_pos"),o["build_leftright_"+s]=t.transform.position,r.PropManager.diePosY>a.transform.position.y&&(r.PropManager.diePosY=a.transform.position.y),s++;s=0;for(var c=e.getChildByName("Props");c.getChildByName("Scaffolding_"+s);)t=c.getChildByName("Scaffolding_"+s).getChildByName("child_pos"),o["Scaffolding_"+s]=t.transform.position,s++;for(s=0;c.getChildByName("grilling_"+s);)t=c.getChildByName("grilling_"+s).getChildByName("child_pos"),o["grilling_"+s]=t.transform.position,s++;s=0;for(var l,p=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage).RoleData.LevelID<3?!0:!1;c.getChildByName("JumpBoost_"+s);){if(l=c.getChildByName("JumpBoost_"+s),p){var d=l.transform.position.clone();d.y+=3;var f=Laya.Sprite3D.instantiate(Laya.loader.getRes(i.AssetPath.get3DRoleModel("Arrow")),r.PropManager.scene3D,!1,d);r.PropManager.jiantouArr.push(f)}s++}r.PropManager.patternDict[e.name]=o},e.prototype.onSpriteClick=function(e){180*Math.random()},e.prototype.onRotate=function(e){Laya.Tween.to(this.sp,{rotation:e},1e3,Laya.Ease.elasticOut)},e.prototype.RefreshCharacterModel=function(){var e=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage),t=e.RoleData,a=[];a.push({url:i.AssetPath.get3DRoleModel(t.roleCfg.name)}),m.ResourceControl.Instance.loader3DArr(a,this,this.CharacterLoadEnd,null,!0,i.AssetPath.get3DModel(t.roleCfg.name))},e.prototype.RefreshTerrain=function(){var e,t,a,n=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage),o=n.RoleData,s=o.levelcfg,c=o.levelmapArr;for(var l in r.PropManager.nowmapDict)r.PropManager.nowmapDict[l].active=!1;for(var d=0;d<c.length;d++){if(t=c[d],r.PropManager.nowmapDict[t])e=r.PropManager.nowmapDict[t],e.active=!0;else{var f=Laya.Loader.getRes(i.AssetPath.get3DModel(t));e=Laya.Sprite3D.instantiate(f,r.PropManager.scene3D,!1,null),r.PropManager.nowmapDict[t]=e}if(0==d){var m=p.GameUtils.cutstrtoArr(s.firstScenepos);e.transform.position=new Laya.Vector3(Number(m[0]),Number(m[1]),Number(m[2]))}else{var y=a.getChildByName("END").transform.position.clone();y.x=0,y.y=0,e.transform.position=y}this.Pattern(e),a=e;var _=e.getChildByName("END").transform.position.clone();_.z+=Number(g["default"].dict[6].value),r.PropManager.endPlane.transform.position=_,r.PropManager.gamewinPosZ=_.z,r.PropManager.gamewinPosZ-=2}},e}();a.SceneControl=b},{"../Agency/AgencyUserMessage":8,"../CFG/GameCFG":10,"../CFG/NpcCFG":13,"../Config/AssetPath":15,"../Data/UserInfoEvent":33,"../Game/CameraManager":35,"../Game/NpcScript":36,"../Game/Player":37,"../PrefabControl/CharacterPool":42,"../PrefabControl/CharacterState":43,"../PrefabControl/PanelResDic":45,"../PrefabControl/PropManager":46,"../utils/DispatcherManager":70,"../utils/GameState":71,"../utils/GameUtils":72,"./LayoutControl":21,"./ResourceControl":25}],27:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../PrefabControl/GamePool"),i=function(){function e(){}return e.prototype.listenKeyboard=function(){this.keyDownList=[],Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onKeyDown),Laya.stage.on(Laya.Event.KEY_UP,this,this.onKeyUp)},e.prototype.onKeyDown=function(e){var t=e.keyCode;this.keyDownList[t]=!0},e.prototype.clear=function(){this.target=null,this.type=null,this.thisObject=null,this.listener=null,n.GamePool.RemoveItem(e.ResDicValue,this)},e.prototype.onKeyUp=function(e){delete this.keyDownList[e.keyCode]},e.ResDicValue="ComponentEventData",e}();a.ComponentEventData=i},{"../PrefabControl/GamePool":44}],28:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.showApe=function(){var e="./res/apes/monkey1.png",t="./res/apes/monkey2.png",a=new Laya.Sprite;Laya.stage.addChild(a),a.loadImage(e),Laya.loader.load(t,Laya.Handler.create(this,function(){var e=Laya.loader.getRes(t),a=new Laya.Sprite;Laya.stage.addChild(a),a.graphics.drawTexture(e,100,0)}))},t.prototype.DataInfo=function(e){if(e)for(var t in e){var a=this[t];null!=a&&(this[t]=e[t])}},t.prototype.createButton=function(e,t,a,n){var i=new Laya.Button(e,t);return Laya.stage.addChild(i),i.on(Laya.Event.CLICK,this,a),i.size(147,55),i.name=t,i.right=10,i.top=n*(i.height+10),i},t.prototype.dispatchEvent=function(e,t){this.event(e,t)},t}(Laya.EventDispatcher);a.DataInfoBase=n},{}],29:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../PrefabControl/GamePool"),i=Laya.Sprite,o=Laya.Event,r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ref=0,t.time=0,t.packageName="",t}return __extends(t,e),t.prototype.createCoralRect=function(){var e=new i;e.graphics.drawRect(0,0,Laya.stage.width,Laya.stage.height/2,"#FF7F50"),e.name="珊瑚色容器",e.size(Laya.stage.width,Laya.stage.height/2),Laya.stage.addChild(e),e.on(o.MOUSE_DOWN,this,this.onDown)},t.prototype.createDeepSkyblueRect=function(){var e=new i;e.graphics.drawRect(0,0,100,100,"#00BFFF"),e.name="天蓝色矩形",e.size(100,100),e.pos(10,10),Laya.stage.addChild(e),e.on(o.MOUSE_DOWN,this,this.onDown)},t.prototype.clear=function(){this.ref=0,this.time=0,this.packageName="",n.GamePool.RemoveItem(t.ResDicValue,this)},t.prototype.onDown=function(e){this.logger.text+="点击 - "+e.target.name+"\n"},t.ResDicValue="LocalData",t}(Laya.EventDispatcher);a.LocalData=r},{"../PrefabControl/GamePool":44}],30:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../utils/DispatcherManager"),i=e("../Data/UserInfoEvent"),o=e("../Control/LocalDataControl"),r=e("../Data/UserDataInfo"),s=e("../CFG/RoleCFG"),c=e("../CFG/LevelCFG"),l=e("../utils/GameUtils"),h=e("./DataInfoBase"),u=Laya.Templet,p=Laya.Event,d=function(e){function t(){var a=e.call(this)||this;return a._Gold=0,a._roleid=0,a._leveid=0,a.mStartX=400,a.mStartY=500,a.mActionIndex=0,a.mCurrIndex=0,a.mCurrSkinIndex=0,a.movespeed=0,a.frontjump=new Laya.Vector3,a.leftjump=new Laya.Vector3,a.rightjump=new Laya.Vector3,a.upclimb=0,a.slideclimb=new Laya.Vector3,t.ins=a,a}return __extends(t,e),Object.defineProperty(t,"Instance",{get:function(){return null==t.ins?new t:t.ins},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=o.LocalDataControl.Instance;this.Money=e.getnum(r.UserDataInfo.gold),this._roleid=e.getnum(r.UserDataInfo.roleid),0==this.CharacterID?this.CharacterID=1:this.InitCharacterInfo(),this._leveid=e.getnum(r.UserDataInfo.levelid),0==this._leveid&&(this._leveid=1),this.RefreshLevel()},Object.defineProperty(t.prototype,"nowlevel",{get:function(){return this._leveid},enumerable:!0,configurable:!0}),t.prototype.getNowServerLevel=function(){return this._leveid},t.prototype.LevelUp=function(){this._leveid++,o.LocalDataControl.Instance.addstr(r.UserDataInfo.levelid,this._leveid.toString()),this.RefreshLevel()},t.prototype.startFun=function(){this.mAniPath="res/spine/spineRes6/alien.sk",this.mFactory=new u,this.mFactory.on(p.COMPLETE,this,this.parseComplete),this.mFactory.on(p.ERROR,this,this.onError),this.mFactory.loadAni(this.mAniPath)},t.prototype.onError=function(){console.log("error")},t.prototype.parseComplete=function(){this.mArmature=this.mFactory.buildArmature(1),this.mArmature.x=this.mStartX,this.mArmature.y=this.mStartY,this.mArmature.scale(.5,.5),Laya.stage.addChild(this.mArmature),this.mArmature.on(p.LABEL,this,this.onEvent),this.play()},t.prototype.RefreshLevel=function(){var e=this._leveid,t=0,a=c["default"].vec.length;if(e>a){var o=(e-a)%(a-2);t=0==o?a:o+2}else t=e;this.levelcfg=c["default"].dict[t],this.levelmapArr=l.GameUtils.cutstrtoArr(this.levelcfg.road),n.DispatcherManager.dispatchEvent(i.UserInfoEvent.userinfoEvent_levelid)},t.prototype.play=function(){this.mCurrIndex++,this.mCurrIndex>=this.mArmature.getAnimNum()&&(this.mCurrIndex=0),this.mArmature.play(this.mCurrIndex,!1)},t.prototype.onEvent=function(e){Laya.stage.addChild(this.mLabelSprite),this.mLabelSprite.x=this.mStartX,this.mLabelSprite.y=this.mStartY,this.mLabelSprite.graphics.clear()},t.prototype.InitCharacterInfo=function(){this.roleCfg=s["default"].dict[this._roleid],this.movespeed=this.roleCfg.speed,this.frontjump=this.roleCfg.frontjump,this.leftjump=this.roleCfg.leftjump,this.rightjump=this.roleCfg.rightjump,this.upclimb=Number(this.roleCfg.upclimb),this.slideclimb=this.roleCfg.slideclimb},Object.defineProperty(t.prototype,"LevelID",{get:function(){return this._leveid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CharacterID",{get:function(){return this._roleid},set:function(e){this._roleid!=e&&(this._roleid=e,this.InitCharacterInfo(),o.LocalDataControl.Instance.addstr(r.UserDataInfo.roleid,this._roleid.toString()),n.DispatcherManager.dispatchEvent(i.UserInfoEvent.userinfoEvent_updateroleid))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Money",{get:function(){return this._Gold},set:function(e){this._Gold!=e&&(this._Gold=e,o.LocalDataControl.Instance.addstr(r.UserDataInfo.gold,this._Gold.toString()),n.DispatcherManager.dispatchEvent(i.UserInfoEvent.UserInfoEvent_updateUserData))},enumerable:!0,configurable:!0}),t}(h.DataInfoBase);a.RoleData=d},{"../CFG/LevelCFG":11,"../CFG/RoleCFG":14,"../Control/LocalDataControl":22,"../Data/UserDataInfo":32,"../Data/UserInfoEvent":33,"../utils/DispatcherManager":70,"../utils/GameUtils":72,"./DataInfoBase":28}],31:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){this.state=0,this.hasnum=0}return e.prototype.createText=function(){var e=new Laya.Text;e.text="Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!",e.width=300,e.fontSize=40,e.color="#ffffff",e.wordWrap=!0,e.x=Laya.stage.width-e.textWidth>>1,e.y=Laya.stage.height-e.textHeight>>1,Laya.stage.addChild(e)},e}();a.SkinData=n},{}],32:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=Laya.Event,i=function(){function e(){}return e.prototype.onCallLater=function(){console.log("onCallLater triggered");var e=new Laya.Text;e.font="SimHei",e.fontSize=30,e.color="#FFFFFF",e.text="打开控制台可见该函数仅触发了一次",e.size(Laya.stage.width,Laya.stage.height),e.wordWrap=!0,e.valign="middle",e.align="center",Laya.stage.addChild(e)},e.prototype.onDecreaseAlpha1=function(e){this.button1.off(n.CLICK,this,this.onDecreaseAlpha1),Laya.timer.once(3e3,this,this.onComplete1)},e.prototype.onDecreaseAlpha2=function(e){this.button2.off(n.CLICK,this,this.onDecreaseAlpha2),Laya.timer.frameOnce(60,this,this.onComplete2)},e.prototype.onComplete1=function(){this.button1.alpha-=.5},e.prototype.onComplete2=function(){this.button2.alpha-=.5},e.lasttime="lasttime",e.caplastflushtime="captime",e.capstorageappids="capappids",e.hasgetappids="hasgetappids",e.roleData="roleData",e.gold="gold",e.roleid="roleid",e.levelid="levelid",e.skin="skin",e.lastDay="lastDay",e.nowdayShare="dayshare",e.nowdayVideo="dayvideo",e}();a.UserDataInfo=i},{}],33:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.UserInfoEvent_updateUserData="UserInfoEvent_updateUserData",e.userinfoEvent_updateroleid="userinfoEvent_updateroleid",e.userinfoEvent_levelid="userinfoEvent_levelid",e.updatePlayerInfo="UserInfoEvent_updatePlayerInfo",e}();a.UserInfoEvent=n},{}],34:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./Global"),i=e("./PrefabControl/PanelResDic"),o=e("./utils/DispatcherManager"),r=e("./Data/ComponentEventData"),s=e("./Config/RecConfigs"),c=e("./Time/TimesTamper"),l=e("./Config/AssetPath"),h=e("./Time/TimerService"),u=e("./GlobalWaiting"),p=e("./Control/PanelBaseControl"),d=e("./PrefabControl/GamePool"),f=e("./Control/LayoutControl"),m=e("./View/ViewManager"),g=e("./Control/ResourceControl"),y=e("./Control/ResDataControl"),_=e("./Control/AudioControl"),v=e("./Control/ConnectControl"),w=e("./WXSDK/pingtaiutils"),C=e("./Agency/AgencyLogin"),b=e("./Agency/AgencyUserMessage"),S=e("./Agency/AgencyMain"),A=e("./Agency/AgencyInGame"),L=e("./Agency/AgencySkin"),P=e("./Agency/AgencyTrial"),M=e("./Agency/AgencyLottery"),D=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.initGame=function(){s.RecConfigs.Instance.init(),o.DispatcherManager.init(),h.TimerService.Instance.init(),f.LayoutControl.Instance.initlayer(),m.ViewManager.Instance.init(),g.ResourceControl.Instance.init(),y.ResDataControl.Instance.init(),_.AudioControl.Instance.init(),v.ConnectControl.Connnect(),c.TimesTamper.Instance.init(),w.pingtaiutils.Instance.init(),this.initPoolObject(),this.initProxy(),this.initmapView(),this.beginLoadHandler()},t.prototype.initPoolObject=function(){d.GamePool.Mark(r.ComponentEventData.ResDicValue,r.ComponentEventData)},t.prototype.initProxy=function(){var e=i.PanelResDic.Instance;e.AgencyAdd(C.AgencyLogin),e.AgencyAdd(b.AgencyUserMessage),e.AgencyAdd(S.AgencyMain),e.AgencyAdd(A.AgencyInGame),e.AgencyAdd(L.AgencySkin),e.AgencyAdd(P.AgencyTrial),e.AgencyAdd(M.AgencyLottery)},t.prototype.initmapView=function(){i.PanelResDic.Instance},t.prototype.beginLoadHandler=function(){var e=[];e.push({url:l.AssetPath.getResConfig(),type:Laya.Loader.JSON}),e.push({url:l.AssetPath.getGameVersion(),type:Laya.Loader.JSON}),g.ResourceControl.Instance.Loaders(e,this,this.recloadComplete)},t.prototype.recloadComplete=function(){var e=y.ResDataControl.Instance.GainResources(l.AssetPath.getGameVersion(),!1);e?n.Global.gameVersion=e.version:n.Global.gameVersion="1.0.0";var t=y.ResDataControl.Instance.GainResources(l.AssetPath.getResConfig(),!1);s.RecConfigs.Instance.initRec(t),g.ResourceControl.Instance.loadGroup("loading",this,this.onPreLoaded,this.onPreprogress)},t.prototype.onPreprogress=function(e){},t.prototype.onPreLoaded=function(){y.ResDataControl.Instance.AddViewPackByName("loading",!0,!1);var e=fairygui.UIPackage.getItemURL("loading","globalWaiting");p.PanelBaseControl.viewbgUrl=fairygui.UIPackage.getItemURL("loading","img_black"),fairygui.UIObjectFactory.setPackageItemExtension(e,u.GlobalWaiting),fairygui.UIConfig.globalModalWaiting=e,fairygui.UIConfig.windowModalWaiting=e,this.Login()},t.prototype.Login=function(){i.PanelResDic.Instance.getSingleTon(C.AgencyLogin).Login()},t}(Laya.EventDispatcher);a.GameContents=D},{"./Agency/AgencyInGame":2,"./Agency/AgencyLogin":3,"./Agency/AgencyLottery":4,"./Agency/AgencyMain":5,"./Agency/AgencySkin":6,"./Agency/AgencyTrial":7,"./Agency/AgencyUserMessage":8,"./Config/AssetPath":15,"./Config/RecConfigs":16,"./Control/AudioControl":17,"./Control/ConnectControl":18,"./Control/LayoutControl":21,"./Control/PanelBaseControl":23,"./Control/ResDataControl":24,"./Control/ResourceControl":25,"./Data/ComponentEventData":27,"./Global":38,"./GlobalWaiting":39,"./PrefabControl/GamePool":44,"./PrefabControl/PanelResDic":45,"./Time/TimerService":48,"./Time/TimesTamper":49,"./View/ViewManager":57,"./WXSDK/pingtaiutils":68,"./utils/DispatcherManager":70}],35:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../PrefabControl/PropManager"),i=e("../utils/GameUtils"),o=e("../CFG/GameCFG"),r=Laya.Sprite,s=Laya.TiledMap,c=Laya.Point,l=Laya.Rectangle,h=Laya.Handler,u=function(e){function t(){var t=e.call(this)||this;return t.iscanfollow=!1,t._upvec=new Laya.Vector3(0,1,0),t._index=0,t._slerpValue=8,t._lookatVec=new Laya.Vector3,t}return __extends(t,e),t.prototype.onAwake=function(){this.camera=this.owner,this._toVec=new Laya.Vector3,this.camera.fieldOfView=90},t.prototype.onStart=function(){this._transform=this.camera.transform,this._transform.rotate(new Laya.Vector3(0,0,0),!0,!1)},t.prototype.createMap=function(){this.tiledMap=new s,this.tiledMap.createMap("res/tiledMap/isometric_grass_and_water.json",new l(0,0,Laya.stage.width,Laya.stage.height),h.create(this,this.mapLoaded),null,new c(1600,800))},t.prototype.onStageClick=function(){var e=new c(0,0);this.layer.getTilePositionByScreenPos(Laya.stage.mouseX,Laya.stage.mouseY,e),this.layer.getScreenPositionByTilePos(Math.floor(e.x),Math.floor(e.y),e),this.sprite.pos(e.x,e.y)},t.prototype.mapLoaded=function(){this.layer=this.tiledMap.getLayerByIndex(0);var e=32,t=Math.tan(180/Math.PI*30)*e,a="#FF7F50";this.sprite=new r,this.sprite.graphics.drawLine(0,0,-e,t,a),this.sprite.graphics.drawLine(0,0,e,t,a),this.sprite.graphics.drawLine(-e,t,0,2*t,a),this.sprite.graphics.drawLine(e,t,0,2*t,a),Laya.stage.addChild(this.sprite)},t.prototype.onUpdate=function(){this.iscanfollow&&(n.PropManager.iscarmanpc?n.PropManager.npcDict.npc_0&&(Laya.Vector3.add(n.PropManager.npcDict.npc_0.transform.position,this._disVector,this._toVec),this._transform.position=this._toVec,this._transform.position.x=n.PropManager.npcDict.npc_0.transform.position.x,this._transform.lookAt(n.PropManager.npcDict.npc_0.transform.position,this._upvec)):n.PropManager.mainRole&&(Laya.Vector3.add(n.PropManager.mainRole.transform.position,this._disVector,this._toVec),Laya.Vector3.lerp(this._transform.position,this._toVec,.016*this._slerpValue,this._toVec),this._transform.position=this._toVec,this._lookatVec.x=this._toVec.x,this._lookatVec.y=n.PropManager.mainRole.transform.position.y,this._lookatVec.z=n.PropManager.mainRole.transform.position.z,this._transform.lookAt(this._lookatVec,this._upvec)))},t.prototype.GameEndRotate=function(e,t){this.iscanfollow=!1,this._transform.translate(t,!1),this._transform.lookAt(e,this._upvec)},t.prototype.SetCameraPosition=function(e){var t=i.GameUtils.cutstrtoArr(o["default"].dict[1].value);this._disVector=new Laya.Vector3(Number(t[0]),Number(t[1]),Number(t[2])),Laya.Vector3.add(e,this._disVector,this._toVec),this.camera.transform.position=this._toVec,this.camera.transform.position.x=e.x},t}(Laya.Script3D);a.CameraManager=u},{"../CFG/GameCFG":10,"../PrefabControl/PropManager":46,"../utils/GameUtils":72}],36:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Time/TimerService"),i=e("../PrefabControl/PropManager"),o=e("../PrefabControl/CharacterState"),r=e("../CFG/BuildCFG"),s=e("./CameraManager"),c=e("../utils/DispatcherManager"),l=e("../utils/GameState"),h=e("../utils/GameUtils"),u=function(e){function t(){var t=e.call(this)||this;return t._nowAction="",t.resouseName="",t._shangpaVec=new Laya.Vector3,t.haveCollision=!1,t._TargetCollision="",t._normalizeVec=new Laya.Vector3,t.staybuild="",t.stayscene="",t._lockxstate=0,t._nowRoleState=0,t.movespeed=0,t.frontjumpspeed=new Laya.Vector3,t.leftjumpspeed=new Laya.Vector3,t.rightjumpspeed=new Laya.Vector3,t.climbspeed=0,t.sideclimbspeed=new Laya.Vector3,t._lockbyBuildname="",t._lockstate=0,t.LastAction="",t._moveTime=0,t._chixuTime=0,t._isActionNums=!1,t._isneedactionnum=0,t._needactiontime=0,t._moveVec=new Laya.Vector3,t.jumpSpeed=new Laya.Vector3,t.jumpHight=0,t._disy=0,t.Gravity_g=10,t._checktime=0,t._ending=!1,t._endAnmoSpeed=new Laya.Vector3,t._endanmotime=1,t._endAnmoSpeed1=new Laya.Vector3,t._changeMoveX=0,t.HaveForceJump=!1,t.quaternion=new Laya.Quaternion,t}return __extends(t,e),t.prototype.onAwake=function(){this._animator=this.owner.getComponent(Laya.Animator),i.PropManager.setAnimator(this._animator)},t.prototype.onStart=function(){this._speedMoveV3=new Laya.Vector3(0,0,0),this._transform=this.owner.transform;var e=this.owner;e.getChildByName("lefttrail").active=!1,e.getChildByName("righttrail").active=!1},t.prototype.startRun=function(){this._nowNpcinfo.gravity?this.Gravity_g=this._nowNpcinfo.gravity:this.Gravity_g=10,this._checktime=500,this._nowRoleState=1,this._ending=!1,this._changeMoveX=0,this._initPosVec=this._transform.position.clone(),this.staybuild="",this.stayscene="",this._nowAction=o.CharacterState.stand,this.nowAction=o.CharacterState.run,this._speedMoveV3.x=0,this._speedMoveV3.y=0,this._speedMoveV3.z=-this.movespeed,this._iscanMove=!0,n.TimerService.Instance.addUpdateTarget(this)},t.prototype.npcinfo=function(e){this._nowNpcinfo=e,this.movespeed=this._nowNpcinfo.speed,this.climbspeed=Number(this._nowNpcinfo.upclimb),this.frontjumpspeed=new Laya.Vector3(Number(this._nowNpcinfo.frontjump.x),Number(this._nowNpcinfo.frontjump.y),Number(this._nowNpcinfo.frontjump.z)),this.leftjumpspeed=new Laya.Vector3(Number(this._nowNpcinfo.leftjump.x),Number(this._nowNpcinfo.leftjump.y),Number(this._nowNpcinfo.leftjump.z)),this.rightjumpspeed=new Laya.Vector3(Number(this._nowNpcinfo.rightjump.x),Number(this._nowNpcinfo.rightjump.y),Number(this._nowNpcinfo.rightjump.z)),this.sideclimbspeed=new Laya.Vector3(Number(this._nowNpcinfo.slideclimb.x),Number(this._nowNpcinfo.slideclimb.y),Number(this._nowNpcinfo.slideclimb.z))},t.prototype.onCollisionEnter=function(e){if(e&&e.contacts&&e.contacts.length>0&&e.other){var t=e.contacts[0];this.Calculate(t.normal,e.other.owner)}},t.prototype.setnowSelectVec=function(e){this._nowselectVec=e},t.prototype.Calculate=function(e,t){if("SliderBoost"!=t.name&&-1==t.name.indexOf("npc")&&-1==t.name.indexOf("role")){this._TargetCollision=t.name;new Laya.Vector3;Laya.Vector3.normalize(e,this._normalizeVec),-1!=this._TargetCollision.indexOf("build")||-1!=this._TargetCollision.indexOf("Scaffolding")||-1!=this._TargetCollision.indexOf("irongauze")?(-1!=this._TargetCollision.indexOf("build")&&(this.staybuild=this._TargetCollision,this.stayscene=t.parent.parent.name),-1!=this._TargetCollision.indexOf("irongauze")?this._nowselectVec=i.PropManager.getPosVecbyScene(t.parent.parent.parent.name,t.parent.name):this._nowselectVec=i.PropManager.getPosVecbyScene(t.parent.parent.name,this._TargetCollision),-1==this._normalizeVec.z?this._nowselectVec&&this._transform.position.y>this._nowselectVec.y-.1?(this._transform.position=new Laya.Vector3(this._transform.position.x,this._nowselectVec.y,this._transform.position.z),this.nowAction=o.CharacterState.run):(this.nowAction=o.CharacterState.climbup,this._shangpaVec=this._nowselectVec.clone()):1==this._normalizeVec.y||-1==this._normalizeVec.y?this.nowAction=o.CharacterState.run:-1==this._normalizeVec.x?this.nowAction==o.CharacterState.run?this._lockxstate=1:this.nowAction==o.CharacterState.climbup?this._lockxstate=1:this.nowAction=o.CharacterState.climbleft:1==this._normalizeVec.x?this.nowAction==o.CharacterState.run?this._lockxstate=2:this.nowAction==o.CharacterState.climbup?this._lockxstate=2:this.nowAction=o.CharacterState.climbright:1!=this._normalizeVec.z&&(this.nowAction=o.CharacterState.climbupblock,this._shangpaVec=this._nowselectVec.clone())):-1!=this._TargetCollision.indexOf("panel_jump")?this.nowAction=o.CharacterState.speedupjump:-1!=this._TargetCollision.indexOf("panel_downslip")?this.nowAction=o.CharacterState.downmove:-1!=this._TargetCollision.indexOf("box_Board")&&this.nowAction!=o.CharacterState.downmove?-1==this._normalizeVec.z&&(this.nowAction=o.CharacterState.climbup,this._shangpaVec=this._nowselectVec.clone()):-1!=this._TargetCollision.indexOf("box_sidejump")?this.nowAction=o.CharacterState.sidespeedup:-1!=this._TargetCollision.indexOf("box_Surmount")?this.nowAction=o.CharacterState.cross:-1!=this._TargetCollision.indexOf("irongauze")&&(this.nowAction=o.CharacterState.climbup,this._shangpaVec=this._nowselectVec.clone())}},t.prototype.onCollisionStay=function(e){if(e&&e.contacts&&e.contacts.length>0&&e.other){this.haveCollision=!0;var t=(e.contacts[0],e.other.owner),a=t.name;"SliderBoost"!=a&&-1==a.indexOf("npc")&&-1==a.indexOf("role")&&(this._TargetCollision=a),(-1!=this._TargetCollision.indexOf("build")||-1!=this._TargetCollision.indexOf("Scaffolding")||-1!=this._TargetCollision.indexOf("irongauze"))&&(-1!=this._TargetCollision.indexOf("build")&&(this.staybuild=this._TargetCollision,this.stayscene=t.parent.parent.name),-1!=this._TargetCollision.indexOf("irongauze")?this._nowselectVec=i.PropManager.getPosVecbyScene(t.parent.parent.parent.name,t.parent.name):this._nowselectVec=i.PropManager.getPosVecbyScene(t.parent.parent.name,this._TargetCollision))}},t.prototype.onCollisionExit=function(e){if(this.haveCollision=!1,e&&e.contacts&&e.contacts.length>0&&e.other){var t=e.contacts[0];this.CheckEnd(t.normal,e.other.owner)}},t.prototype.CheckEnd=function(e,t){if("SliderBoost"!=t.name&&-1==t.name.indexOf("npc")&&-1==t.name.indexOf("role")){if(this.HaveForceJump)return void(this.HaveForceJump=!1);if(this._lockxstate)return void(this._lockxstate=0);if(this._TargetCollision==t.name&&-1==t.name.indexOf("panel_jump"))switch(this.nowAction){case o.CharacterState.climbup:case o.CharacterState.climbupblock:-1!=this._TargetCollision.indexOf("box_Board")?this.JumpAction(this._changeMoveX):this._changeMoveX>0?this.nowAction=o.CharacterState.jumpright:this._changeMoveX<0&&(this.nowAction=o.CharacterState.jumpleft);break;case o.CharacterState.climbright:case o.CharacterState.climbleft:this.JumpAction(this._changeMoveX);break;case o.CharacterState.run:this.JumpAction(this._changeMoveX);break;case o.CharacterState.MoveX:this.JumpAction(this._speedMoveV3.x)}}},t.prototype.JumpAction=function(e,t){if(void 0===t&&(t=!1),e>0)this.nowAction=o.CharacterState.jumpright;else if(0>e)this.nowAction=o.CharacterState.jumpleft;else if(t)if(-1!=this._TargetCollision.indexOf("build")){var a,a=h.GameUtils.randRangeint(0,100),n=0,i="";switch(-1!=this._TargetCollision.indexOf("leftright")?(n=this._nowNpcinfo.jump_left+this._nowNpcinfo.jump_right,a=h.GameUtils.randRangeint(0,n),i=a<=this._nowNpcinfo.jump_left?"left":"right"):-1!=this._TargetCollision.indexOf("frontright")?(n=this._nowNpcinfo.start_ahead+this._nowNpcinfo.jump_right,a=h.GameUtils.randRangeint(0,n),i=a<=this._nowNpcinfo.start_ahead?"front":"right"):-1!=this._TargetCollision.indexOf("frontleft")?(n=this._nowNpcinfo.start_ahead+this._nowNpcinfo.jump_left,a=h.GameUtils.randRangeint(0,n),i=a<=this._nowNpcinfo.start_ahead?"front":"left"):-1!=this._TargetCollision.indexOf("right")?i="right":-1!=this._TargetCollision.indexOf("left")?i="left":-1!=this._TargetCollision.indexOf("front")?i="front":(n=this._nowNpcinfo.start_ahead+this._nowNpcinfo.jump_left+this._nowNpcinfo.jump_right,a=h.GameUtils.randRangeint(0,n),i=a<=this._nowNpcinfo.start_ahead?"front":a<=this._nowNpcinfo.start_ahead+this._nowNpcinfo.jump_left?"left":"right"),i){case"left":this.nowAction=o.CharacterState.jumpleft;break;case"right":this.nowAction=o.CharacterState.jumpright;break;case"front":this.nowAction=o.CharacterState.jump;break;default:this.nowAction=o.CharacterState.jump}}else this.nowAction=o.CharacterState.jump;else this.nowAction=o.CharacterState.jump},Object.defineProperty(t.prototype,"nowAction",{get:function(){
  4. return this._nowAction},set:function(e){if(1==this._nowRoleState&&(this._nowAction!=e||this.LastAction==o.CharacterState.speedupjump||this.LastAction==o.CharacterState.jumpright))switch(this.LastAction=this._nowAction,this._nowAction=e,this._moveTime=0,this._nowAction){case o.CharacterState.stand:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.stand);break;case o.CharacterState.run:if(this.LastAction==o.CharacterState.jump||this.LastAction==o.CharacterState.jumpleft||this.LastAction==o.CharacterState.jumpright){this._isActionNums=!0,this._isneedactionnum=1;var t=h.GameUtils.randRangeint(0,100);50>t?this.PlayAnimator(o.CharacterState.land1):this.PlayAnimator(o.CharacterState.land2)}else this._isActionNums=!1,this.PlayAnimator(o.CharacterState.run);break;case o.CharacterState.jump:this.PlayAnimator(o.CharacterState.jump),this._isActionNums=!0,this._isneedactionnum=1,this.jumpSpeed.x=this.frontjumpspeed.x,this.jumpSpeed.y=this.frontjumpspeed.y,this.jumpSpeed.z=this.frontjumpspeed.z;break;case o.CharacterState.jumpleft:this.jumpSpeed=this.leftjumpspeed,this._isActionNums=!0,this._isneedactionnum=1,this.PlayAnimator(o.CharacterState.leftjump);break;case o.CharacterState.jumpright:this.jumpSpeed=this.rightjumpspeed,this._isActionNums=!0,this._isneedactionnum=1,this.PlayAnimator(o.CharacterState.rightjump);break;case o.CharacterState.speedupjump:var a=r["default"].dict.panel_jump;this.jumpSpeed.x=a.buffx,this.jumpSpeed.y=a.buffy,this.LastAction==o.CharacterState.speedupjump?this.jumpSpeed.z=this.jumpSpeed.z*a.buffz:this.jumpSpeed.z=this._speedMoveV3.z*a.buffz,this._isActionNums=!0,this._isneedactionnum=1;var t=h.GameUtils.randRangeint(0,100);50>t?this.PlayAnimator(o.CharacterState.highjump1):this.PlayAnimator(o.CharacterState.highjump2);break;case o.CharacterState.downmove:var a=r["default"].dict.panel_downslip;this.jumpSpeed.x=a.buffx,this.jumpSpeed.y=a.buffy,this.jumpSpeed.z=this._speedMoveV3.z*a.buffz,this._chixuTime=a.time,this._isActionNums=!0,this._isneedactionnum=1,this.PlayAnimator(o.CharacterState.huachan);break;case o.CharacterState.cross:var a=r["default"].dict.box_Surmount;this.jumpSpeed.x=a.buffx,this.jumpSpeed.y=a.buffy+.5,this.jumpSpeed.z=this._speedMoveV3.z*a.buffz,this._chixuTime=a.time,this._isActionNums=!0,this._isneedactionnum=1,this.PlayAnimator(o.CharacterState.hurdle);break;case o.CharacterState.climbup:case o.CharacterState.climbupblock:this.jumpSpeed.x=0,this.jumpSpeed.y=this.climbspeed,this.jumpSpeed.z=0,this._isActionNums=!1,this.PlayAnimator(o.CharacterState.climbwall);break;case o.CharacterState.climbleft:this.jumpSpeed=new Laya.Vector3(0,this.sideclimbspeed.y,this.sideclimbspeed.z),this._isActionNums=!1,this.PlayAnimator(o.CharacterState.runwallleft);break;case o.CharacterState.climbright:this.jumpSpeed=new Laya.Vector3(0,this.sideclimbspeed.y,this.sideclimbspeed.z),this._isActionNums=!1,this.PlayAnimator(o.CharacterState.runwallright);break;case o.CharacterState.ClimbMotion:this._isActionNums=!0,this._isneedactionnum=0,this._needactiontime=.3,this._moveTime=0,this.PlayAnimator(o.CharacterState.climbend)}},enumerable:!0,configurable:!0}),t.prototype.update=function(e){if(1==this._nowRoleState)if(e=16,this._checktime+=e,i.PropManager.iscarmanpc||this._checktime>=500&&(this._checktime=0,this._nowNpcinfo&&i.PropManager.mainRole&&(this._transform.position.z+this._nowNpcinfo.distance<i.PropManager.mainRole.transform.position.z?this._iscanMove=!1:this._iscanMove=!0)),this._iscanMove){var t=e/1e3;switch(this._moveTime+=t,this.nowAction){case o.CharacterState.run:this._moveVec.y=0,this._moveVec.z=t*this._speedMoveV3.z,0==this._lockxstate?this._moveVec.x=this._changeMoveX*t:1==this._lockxstate?this._changeMoveX<0?this._moveVec.x=0:this._moveVec.x=this._changeMoveX*t:2==this._lockxstate&&(this._changeMoveX>0?this._moveVec.x=0:this._moveVec.x=this._changeMoveX*t),this._transform.translate(this._moveVec,!1);break;case o.CharacterState.climbup:this._moveVec.z=0,this._moveVec.y=t*this.jumpSpeed.y,1==this._lockxstate?this._changeMoveX<0?this._moveVec.x=0:this._moveVec.x=this._changeMoveX*t:2==this._lockstate&&this._changeMoveX>0?this._moveVec.x=0:this._moveVec.x=this._changeMoveX*t,this._transform.translate(this._moveVec,!1),this._shangpaVec?this._transform.position.y+1>this._shangpaVec.y&&(this.nowAction=o.CharacterState.ClimbMotion):this._nowselectVec&&this._transform.position.y+1>this._nowselectVec.y&&(this.nowAction=o.CharacterState.ClimbMotion);break;case o.CharacterState.climbupblock:this._moveVec.z=0,this._moveVec.y=t*this.jumpSpeed.y,this._moveVec.x=0,this._transform.translate(this._moveVec,!1),this._shangpaVec?this._transform.position.y+1>this._shangpaVec.y&&(this.nowAction=o.CharacterState.ClimbMotion):this._transform.position.y+1>this._nowselectVec.y&&(this.nowAction=o.CharacterState.ClimbMotion);break;case o.CharacterState.jump:case o.CharacterState.jumpleft:case o.CharacterState.jumpright:this._disy=this.jumpSpeed.y-this.Gravity_g*t,this.jumpSpeed.y=this._disy,this._moveVec.x=this.jumpSpeed.x*t,this._moveVec.y=this._disy*t,this._moveVec.z=this.jumpSpeed.z*t,this._transform.translate(this._moveVec,!1);break;case o.CharacterState.speedupjump:this._disy=this.jumpSpeed.y-this.Gravity_g*t,this.jumpSpeed.y=this._disy,this._moveVec.x=this.jumpSpeed.x*t,this._moveVec.y=this._disy*t,this._moveVec.z=this.jumpSpeed.z*t,this._transform.translate(this._moveVec,!1);break;case o.CharacterState.climbleft:case o.CharacterState.climbright:this._moveVec.z=t*this.jumpSpeed.y,this._moveVec.y=this.jumpSpeed.y*t,this._moveVec.x=0,this._transform.translate(this._moveVec,!1);break;case o.CharacterState.MoveX:this._moveVec.z=t*this._speedMoveV3.z,this._moveVec.x=this._speedMoveV3.x*t,this._transform.translate(this._moveVec,!1),this._moveTime>.1&&(this.nowAction=o.CharacterState.run);break;case o.CharacterState.downmove:this._moveVec.y=this.jumpSpeed.x,this._moveVec.x=this.jumpSpeed.y,this._moveVec.z=this.jumpSpeed.z*t,this._transform.translate(this._moveVec,!1),this._moveTime>this._chixuTime&&(this.nowAction=o.CharacterState.run);break;case o.CharacterState.sidespeedup:this._moveVec.y=0,this._moveVec.x=0,this._moveVec.z=this.jumpSpeed.z*t,this._transform.translate(this._moveVec,!1),this._moveTime>this._chixuTime&&this.LastAction==o.CharacterState.climbleft||this.LastAction==o.CharacterState.climbright?this.nowAction=this.LastAction:this.nowAction=o.CharacterState.jump;break;case o.CharacterState.cross:this._disy=this.jumpSpeed.y-this.Gravity_g*t,this.jumpSpeed.y=this._disy,this._moveVec.x=this.jumpSpeed.x*t,this._moveVec.y=this._disy*t,this._moveVec.z=this.jumpSpeed.z*t,this._transform.translate(this._moveVec,!1);break;case o.CharacterState.ClimbMotion:this._nowselectVec&&this._transform.position.y<this._nowselectVec.y&&(this._moveVec.x=0,this._moveVec.y=1/.3*t,this._moveVec.z=0,this._transform.translate(this._moveVec,!1))}if(!this._nowselectVec||this.nowAction!=o.CharacterState.run&&this.nowAction!=o.CharacterState.downmove||this.haveCollision||this._transform.position.z<=this._nowselectVec.z&&(this._changeMoveX>0?this.nowAction=o.CharacterState.jumpright:this._changeMoveX<0?this.nowAction=o.CharacterState.jumpleft:this.nowAction=o.CharacterState.jump),this._transform.position.y<i.PropManager.diePosY&&(""==this.stayscene||""==this.staybuild?this._transform.position=this._initPosVec.clone():this._transform.position=i.PropManager.getPosVecbyScene(this.stayscene,this.staybuild).clone(),this.nowAction=o.CharacterState.run),this._transform.position.z<i.PropManager.gamewinPosZ&&this.Win(),this._isActionNums)if(this._isneedactionnum>0){if(this._animator.getCurrentAnimatorPlayState().normalizedTime>=this._isneedactionnum)switch(this._nowActionName){case o.CharacterState.jump:case o.CharacterState.leftjump:case o.CharacterState.rightjump:case o.CharacterState.highjump1:case o.CharacterState.highjump2:case o.CharacterState.hurdle:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.sky);break;case o.CharacterState.huachan:case o.CharacterState.climbend:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.run),this.nowAction=o.CharacterState.run,this._transform.position=new Laya.Vector3(this._transform.position.x,this._nowselectVec.y,this._transform.position.z);break;case o.CharacterState.land1:case o.CharacterState.land2:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.run)}}else if(0!=this._needactiontime&&this._moveTime>this._needactiontime)switch(this._nowActionName){case o.CharacterState.jump:case o.CharacterState.leftjump:case o.CharacterState.rightjump:case o.CharacterState.highjump1:case o.CharacterState.highjump2:case o.CharacterState.hurdle:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.sky);break;case o.CharacterState.huachan:case o.CharacterState.climbend:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.run),this.nowAction=o.CharacterState.run,this._transform.position=new Laya.Vector3(this._transform.position.x,this._nowselectVec.y,this._transform.position.z)}}else if(this._ending){var t=e/1e3;this._moveTime+=t,this._moveTime>=this._endanmotime?this.GameOver():(this._endAnmoSpeed1.x=this._endAnmoSpeed.x*t,this._endAnmoSpeed1.y=this._endAnmoSpeed.y*t,this._endAnmoSpeed1.z=this._endAnmoSpeed.z*t,i.PropManager.carma.getComponent(s.CameraManager).GameEndRotate(this._transform.position,this._endAnmoSpeed1))}},t.prototype.GameOver=function(){this._ending=!1,n.TimerService.Instance.removeUpdateTarget(this),c.DispatcherManager.dispatchEvent(l.GameState.end)},t.prototype.Win=function(){n.TimerService.Instance.removeUpdateTarget(this),this._nowRoleState=2,this.PlayAnimator(o.CharacterState.sky),c.DispatcherManager.dispatchEvent(l.GameState.npcend,this.owner.name)},t.prototype.stop=function(){n.TimerService.Instance.removeUpdateTarget(this)},t.prototype.destroy=function(){n.TimerService.Instance.removeUpdateTarget(this),e.prototype.destroy.call(this)},t.prototype.Joy=function(e,t){(this.nowAction==o.CharacterState.run||this.nowAction==o.CharacterState.climbup||o.CharacterState.climbleft||o.CharacterState.climbright)&&(this._changeMoveX=e),this.nowAction==o.CharacterState.climbleft&&this._changeMoveX>0?(this.HaveForceJump=!0,this.nowAction=o.CharacterState.jumpright):this.nowAction==o.CharacterState.climbright&&this._changeMoveX<0&&(this.HaveForceJump=!0,this.nowAction=o.CharacterState.jumpleft),(this.nowAction==o.CharacterState.jump||this.nowAction==o.CharacterState.jumpleft||this.nowAction==o.CharacterState.jumpright||this.nowAction==o.CharacterState.speedupjump)&&(t=-t*Math.PI/180),Laya.Quaternion.createFromAxisAngle(new Laya.Vector3(0,1,0),t,this.quaternion),Laya.Vector3.transformQuat(this.jumpSpeed,this.quaternion,this.jumpSpeed)},t.prototype.PlayAnimator=function(e){var t=this.TransitionActionName(e);this._nowActionName=e,this._animator&&(this._nowActionName==o.CharacterState.climbend?this._animator.speed=1.5:this._animator.speed=1,this._animator.play(t,0,0))},t.prototype.TransitionActionName=function(e){switch(e){case"rollover1":return"cefan1";case"rollover2":return"cefan2";case"runwallleft":return"paoqiangleft";case"rightjump":return"rightjump";case"runwallright":return"paoqiangright";case"leftjump":return"leftjump";case"climbwall":return"paqiang";case"climbend":return"climbend";case"stand":return"stand";case"sky":return"kongzhong";case"land1":return"luodi1";case"land2":return"luodi2";case"highjump1":return"datiao1";case"highjump2":return"datiao2";case"run":return"run";case"jump":return"jump";case"climbup":return"Climb";case"falldown":return"Freefalling";case"climbleft":return"left_climb";case"climbright":return"right_climb";case"jumpright":return"right_jump";case"jumpleft":return"left_jump";case"ClimbMotion":return"PlayPalouAction";case"huachan":return"huachan";case"hurdle":return"kualan";case"speedupjump":return"jiasuJump";case"MoveX":return"xshunyi";case"downmove":return"downSlide";case"sidespeedup":return"slidejiasu";case"cross":return"surmount";case"climbupblock":return"lockclimb"}},t.prototype.TestJump=function(){this.nowAction=o.CharacterState.jump},t.prototype.getPostion=function(){return this._transform.position},t.prototype.getAction=function(){return this._nowRoleState},t}(Laya.Script3D);a.NpcScript=u},{"../CFG/BuildCFG":9,"../PrefabControl/CharacterState":43,"../PrefabControl/PropManager":46,"../Time/TimerService":48,"../utils/DispatcherManager":70,"../utils/GameState":71,"../utils/GameUtils":72,"./CameraManager":35}],37:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Time/TimerService"),i=e("../PrefabControl/PropManager"),o=e("../PrefabControl/CharacterState"),r=e("../PrefabControl/PanelResDic"),s=e("../Agency/AgencyUserMessage"),c=e("../CFG/BuildCFG"),l=e("./CameraManager"),h=e("../utils/DispatcherManager"),u=e("../utils/GameState"),p=e("../utils/GameUtils"),d=e("../Control/GameStateControl"),f=e("../Control/AudioControl"),m=e("../WXSDK/WXGamePlatform"),g=function(e){function t(){var t=e.call(this)||this;return t._isActionNums=!1,t._isneedactionnum=0,t._needactiontime=0,t._nowActionState="",t._multiple=new Laya.Vector3(1,1,1),t.LastActionState="",t._moveTime=0,t._lastjiasuState="",t.buff_speeduptime=0,t.canshake=!1,t.shaketime=0,t.doublespeedup=!1,t.resouseName="",t._isColling=!1,t._nowCollTargetName="",t._normalizeVec=new Laya.Vector3,t._nowbuildname="",t._nowscenename="",t._lockxstate=0,t._lockbyBuildname="",t._lockstate=0,t._shangpaVec=new Laya.Vector3,t._moveVec=new Laya.Vector3,t.jumpSpeed=new Laya.Vector3,t.jumpHight=0,t._disy=0,t.g=10,t._ending=!1,t._endAnmoSpeed=new Laya.Vector3,t._endanmotime=1,t._endAnmoSpeed1=new Laya.Vector3,t._changeMoveX=0,t.isforceJump=!1,t.quaternion=new Laya.Quaternion,t}return __extends(t,e),t.prototype.onAwake=function(){this._animator=this.owner.getComponent(Laya.Animator),i.PropManager.setAnimator(this._animator),this._speedMoveV3=new Laya.Vector3(0,0,0);var e=this.owner;this._transform=e.transform,this._RoleData=r.PanelResDic.Instance.getSingleTon(s.AgencyUserMessage).RoleData,e.getComponent(Laya.Rigidbody3D).ccdMotionThreshold=.001,this.LeftTrial=e.getChildByName("lefttrail"),this.RightTrial=e.getChildByName("righttrail")},t.prototype.startRun=function(){this._RoleData.roleCfg.gravity?this.g=this._RoleData.roleCfg.gravity:this.g=10,this._multiple.x=1,this._multiple.y=1,this._multiple.z=1,this.buff_speeduptime=0,this.doublespeedup=!1,this._lastjiasuState="",this._ending=!1,this._changeMoveX=0,this._initPosVec=this._transform.position.clone(),this._nowbuildname="",this._nowscenename="",this.nowAction=o.CharacterState.run,this._speedMoveV3.x=0,this._speedMoveV3.y=0,this._speedMoveV3.z=-this._RoleData.movespeed,this._iscanMove=!0,n.TimerService.Instance.addUpdateTarget(this)},t.prototype.onCollisionEnter=function(e){if(e&&e.contacts&&e.contacts.length>0&&e.other){var t=e.contacts[0];this.Calculate(t.normal,e.other.owner,t.positionOnB)}},t.prototype.onCollisionStay=function(e){if(e&&e.contacts&&e.contacts.length>0&&e.other){this._isColling=!0;var t=(e.contacts[0],e.other.owner),a=t.name;"SliderBoost"!=a&&-1==a.indexOf("npc")&&(this._nowCollTargetName=a),(-1!=this._nowCollTargetName.indexOf("build")||-1!=this._nowCollTargetName.indexOf("Scaffolding")||-1!=this._nowCollTargetName.indexOf("irongauze"))&&(-1!=this._nowCollTargetName.indexOf("build")&&(this._nowbuildname=this._nowCollTargetName,this._nowscenename=t.parent.parent.name),-1!=this._nowCollTargetName.indexOf("irongauze")?this._nowselectVec=i.PropManager.getPosVecbyScene(t.parent.parent.parent.name,t.parent.name):this._nowselectVec=i.PropManager.getPosVecbyScene(t.parent.parent.name,this._nowCollTargetName))}},t.prototype.onCollisionExit=function(e){if(this._isColling=!1,e&&e.contacts&&e.contacts.length>0&&e.other){var t=e.contacts[0];this.CheckEnd(t.normal,e.other.owner)}},t.prototype.CheckEnd=function(e,t){if("SliderBoost"!=t.name&&-1==t.name.indexOf("npc")){if(this.isforceJump)return void(this.isforceJump=!1);if(this._lockxstate)return void(this._lockxstate=0);if(this._nowCollTargetName==t.name&&-1==t.name.indexOf("panel_jump"))switch(this.nowAction){case o.CharacterState.climbup:case o.CharacterState.climbupblock:-1!=this._nowCollTargetName.indexOf("box_Board")?this.JumpAction(this._changeMoveX):this._changeMoveX>0?this.nowAction=o.CharacterState.jumpright:this._changeMoveX<0&&(this.nowAction=o.CharacterState.jumpleft);break;case o.CharacterState.climbright:case o.CharacterState.climbleft:this.JumpAction(this._changeMoveX);break;case o.CharacterState.run:this.JumpAction(this._changeMoveX);break;case o.CharacterState.MoveX:this.JumpAction(this._speedMoveV3.x)}}},t.prototype.setnowSelectVec=function(e){this._nowselectVec=e},t.prototype.Calculate=function(e,t,a){if("SliderBoost"!=t.name&&-1==t.name.indexOf("npc")){this._nowCollTargetName=t.name;new Laya.Vector3;Laya.Vector3.normalize(e,this._normalizeVec),-1!=this._nowCollTargetName.indexOf("build")||-1!=this._nowCollTargetName.indexOf("Scaffolding")||-1!=this._nowCollTargetName.indexOf("irongauze")?(-1!=this._nowCollTargetName.indexOf("build")&&(this._nowbuildname=this._nowCollTargetName,this._nowscenename=t.parent.parent.name),-1!=this._nowCollTargetName.indexOf("irongauze")?this._nowselectVec=i.PropManager.getPosVecbyScene(t.parent.parent.parent.name,t.parent.name):this._nowselectVec=i.PropManager.getPosVecbyScene(t.parent.parent.name,this._nowCollTargetName),-1==this._normalizeVec.z?this._nowselectVec&&this._transform.position.y>this._nowselectVec.y-.2?(this._transform.position=new Laya.Vector3(this._transform.position.x,this._nowselectVec.y,this._transform.position.z),this.nowAction=o.CharacterState.run):(this.nowAction=o.CharacterState.climbup,this._shangpaVec=this._nowselectVec.clone()):1==this._normalizeVec.y||-1==this._normalizeVec.y?this.nowAction=o.CharacterState.run:-1==this._normalizeVec.x?this.nowAction==o.CharacterState.run?this._lockxstate=1:this.nowAction==o.CharacterState.climbup?this._lockxstate=1:this.nowAction=o.CharacterState.climbleft:1==this._normalizeVec.x?this.nowAction==o.CharacterState.run?this._lockxstate=2:this.nowAction==o.CharacterState.climbup?this._lockxstate=2:this.nowAction=o.CharacterState.climbright:1!=this._normalizeVec.z&&(this.nowAction=o.CharacterState.climbupblock,this._shangpaVec=this._nowselectVec.clone())):-1!=this._nowCollTargetName.indexOf("panel_jump")?this.nowAction=o.CharacterState.speedupjump:-1!=this._nowCollTargetName.indexOf("panel_downslip")?this.nowAction=o.CharacterState.downmove:-1!=this._nowCollTargetName.indexOf("box_Board")&&this.nowAction!=o.CharacterState.downmove?-1==this._normalizeVec.z&&(this.nowAction=o.CharacterState.climbup,this._shangpaVec=this._nowselectVec.clone()):-1!=this._nowCollTargetName.indexOf("box_sidejump")?this.nowAction=o.CharacterState.sidespeedup:-1!=this._nowCollTargetName.indexOf("box_Surmount")?this.nowAction=o.CharacterState.cross:-1!=this._nowCollTargetName.indexOf("irongauze")&&(this.nowAction=o.CharacterState.climbup,this._shangpaVec=this._nowselectVec.clone())}},t.prototype.JumpAction=function(e){e>0?this.nowAction=o.CharacterState.jumpright:0>e?this.nowAction=o.CharacterState.jumpleft:this.nowAction=o.CharacterState.jump},t.prototype.PlayAnimator=function(e){var t=this.TransitionActionName(e);this._StateName=e,this._animator&&(this._StateName==o.CharacterState.climbend||this._StateName==o.CharacterState.land1||this._StateName==o.CharacterState.land2?this._animator.speed=1.5:this._animator.speed=1,this._animator.play(t,0,0))},t.prototype.TransitionActionName=function(e){switch(e){case"rollover1":return"cefan1";case"rollover2":return"cefan2";case"runwallleft":return"paoqiangleft";case"rightjump":return"rightjump";case"runwallright":return"paoqiangright";case"leftjump":return"leftjump";case"climbwall":return"paqiang";case"climbend":return"climbend";case"stand":return"stand";case"sky":return"kongzhong";case"land1":return"luodi1";case"land2":return"luodi2";case"highjump1":return"datiao1";case"highjump2":return"datiao2";case"run":return"run";case"jump":return"jump";case"climbup":return"Climb";case"falldown":return"Freefalling";case"climbleft":return"left_climb";case"climbright":return"right_climb";case"jumpright":return"right_jump";case"jumpleft":return"left_jump";case"ClimbMotion":return"PlayPalouAction";case"huachan":return"huachan";case"hurdle":return"kualan";case"speedupjump":return"jiasuJump";case"MoveX":return"xshunyi";case"downmove":return"downSlide";case"sidespeedup":return"slidejiasu";case"cross":return"surmount";case"climbupblock":return"lockclimb"}},Object.defineProperty(t.prototype,"nowAction",{get:function(){return this._nowActionState},set:function(e){if(this._nowActionState!=e||this.LastActionState==o.CharacterState.speedupjump||this._nowActionState==o.CharacterState.speedupjump)switch(this.LastActionState=this._nowActionState,this._nowActionState=e,this._moveTime=0,this.canshake=!1,this.ChangeTrial(!0),this._nowActionState){case o.CharacterState.stand:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.stand);break;case o.CharacterState.run:if(this.LastActionState==o.CharacterState.jump||this.LastActionState==o.CharacterState.jumpleft||this.LastActionState==o.CharacterState.jumpright){this._isActionNums=!0,this._isneedactionnum=1;var t=p.GameUtils.randRangeint(0,100);50>t?this.PlayAnimator(o.CharacterState.land1):this.PlayAnimator(o.CharacterState.land2)}else this._isActionNums=!1,this.PlayAnimator(o.CharacterState.run);break;case o.CharacterState.jump:this.PlayAnimator(o.CharacterState.jump),i.PropManager.Instance.SetEffectColor("color_white",this._transform.position),this._isActionNums=!0,this._isneedactionnum=1,this.jumpSpeed.x=this._RoleData.frontjump.x,this.jumpSpeed.y=this._RoleData.frontjump.y,this.jumpSpeed.z=this._RoleData.frontjump.z,f.AudioControl.Instance.playGameSound("tiao"),m.WXGamePlatform.Instance.vibrateShort();break;case o.CharacterState.jumpleft:i.PropManager.Instance.SetEffectColor("color_white",this._transform.position),this.jumpSpeed.x=this._RoleData.leftjump.x,this.jumpSpeed.y=this._RoleData.leftjump.y,this.jumpSpeed.z=this._RoleData.leftjump.z,this._isActionNums=!0,this._isneedactionnum=1,this.PlayAnimator(o.CharacterState.leftjump),f.AudioControl.Instance.playGameSound("tiao"),m.WXGamePlatform.Instance.vibrateShort();break;case o.CharacterState.jumpright:i.PropManager.Instance.SetEffectColor("color_white",this._transform.position),this.jumpSpeed.x=this._RoleData.rightjump.x,this.jumpSpeed.y=this._RoleData.rightjump.y,this.jumpSpeed.z=this._RoleData.rightjump.z,this._isActionNums=!0,this._isneedactionnum=1,this.PlayAnimator(o.CharacterState.rightjump),f.AudioControl.Instance.playGameSound("tiao"),m.WXGamePlatform.Instance.vibrateShort();break;case o.CharacterState.speedupjump:var a=c["default"].dict.panel_jump;this.buff_speeduptime>0?(this._multiple.x=1,this._multiple.y=1,this._multiple.z=a.buffz*a.buffz,this.doublespeedup=!0):(this._multiple.x=1,this._multiple.y=1,this._multiple.z=a.buffz),this.buff_speeduptime=a.time,this.jumpSpeed.x=a.buffx*this._multiple.x,this.jumpSpeed.y=a.buffy,this.jumpSpeed.z=this._speedMoveV3.z*a.buffz*this._multiple.z,this._isActionNums=!0,this._isneedactionnum=1;var t=p.GameUtils.randRangeint(0,100);50>t?this.PlayAnimator(o.CharacterState.highjump1):this.PlayAnimator(o.CharacterState.highjump2),f.AudioControl.Instance.playGameSound("tiao"),Laya.timer.clear(this,this.playspeedSound),Laya.timer.once(200,this,this.playspeedSound),m.WXGamePlatform.Instance.vibrateShort();break;case o.CharacterState.downmove:var a=c["default"].dict.panel_downslip;this.buff_speeduptime>0?(this._multiple.x=1,this._multiple.y=1,this._multiple.z=a.buffz*a.buffz,this.doublespeedup=!0):(this._multiple.x=1,this._multiple.y=1,this._multiple.z=a.buffz),this.buff_speeduptime=a.time,this.jumpSpeed.x=a.buffx*this._multiple.x,this.jumpSpeed.y=a.buffy*this._multiple.y,this.jumpSpeed.z=this._speedMoveV3.z*a.buffz*this._multiple.z,this._isActionNums=!0,this._isneedactionnum=1,this.PlayAnimator(o.CharacterState.huachan),this.playspeedSound(),m.WXGamePlatform.Instance.vibrateShort();break;case o.CharacterState.sidespeedup:var a=c["default"].dict.box_sidejump;this.buff_speeduptime>0?(this._multiple.x=1,this._multiple.y=1,this._multiple.z=a.buffz*a.buffz,this.doublespeedup=!0):(this._multiple.x=1,this._multiple.y=1,this._multiple.z=a.buffz),this.buff_speeduptime=a.time,this.jumpSpeed.x=a.buffx*this._multiple.x,this.jumpSpeed.y=a.buffy*this._multiple.y,this.jumpSpeed.z=this._speedMoveV3.z*a.buffz*this._multiple.z,this._isActionNums=!1,this.playspeedSound(),m.WXGamePlatform.Instance.vibrateShort();break;case o.CharacterState.cross:var a=c["default"].dict.box_Surmount;this.buff_speeduptime>0?(this._multiple.x=1,this._multiple.y=1,this._multiple.z=a.buffz*a.buffz,this.doublespeedup=!0):(this._multiple.x=1,this._multiple.y=1,this._multiple.z=a.buffz),this.buff_speeduptime=a.time,this.jumpSpeed.x=a.buffx*this._multiple.x,this.jumpSpeed.y=(a.buffy+.5)*this._multiple.y,this.jumpSpeed.z=this._speedMoveV3.z*a.buffz*this._multiple.z,this._isActionNums=!0,this._isneedactionnum=1,this.PlayAnimator(o.CharacterState.hurdle);break;case o.CharacterState.climbup:case o.CharacterState.climbupblock:this.jumpSpeed.x=0,this.jumpSpeed.y=this._RoleData.upclimb,this.jumpSpeed.z=0,this._isActionNums=!1,this.PlayAnimator(o.CharacterState.climbwall),m.WXGamePlatform.Instance.vibrateShort(),this.canshake=!0,this.shaketime=0,this.ChangeTrial(!1);break;case o.CharacterState.climbleft:this.jumpSpeed.x=0,this.jumpSpeed.y=this._RoleData.slideclimb.y,this.jumpSpeed.z=this._RoleData.slideclimb.z,this._isActionNums=!1,this.PlayAnimator(o.CharacterState.runwallleft),this.ChangeTrial(!1);break;case o.CharacterState.climbright:this.jumpSpeed.x=0,this.jumpSpeed.y=this._RoleData.slideclimb.y,this.jumpSpeed.z=this._RoleData.slideclimb.z,this._isActionNums=!1,this.PlayAnimator(o.CharacterState.runwallright),this.ChangeTrial(!1);break;case o.CharacterState.ClimbMotion:this._isActionNums=!0,this._isneedactionnum=0,this._needactiontime=.3,this._moveTime=0,this.PlayAnimator(o.CharacterState.climbend)}},enumerable:!0,configurable:!0}),t.prototype.playspeedSound=function(){f.AudioControl.Instance.playGameSound("speedup")},t.prototype.ChangeTrial=function(e){this.LeftTrial&&this.RightTrial&&this.LeftTrial.active!=e&&(this.LeftTrial.active=e,this.RightTrial.active=e)},t.prototype.Joy=function(e,t,a){if(this.nowAction==o.CharacterState.run?this._changeMoveX=e:(this.nowAction==o.CharacterState.climbup||o.CharacterState.climbleft||o.CharacterState.climbright)&&(this._changeMoveX=t),this.nowAction==o.CharacterState.climbleft&&this._changeMoveX>0?(this.isforceJump=!0,this.nowAction=o.CharacterState.jumpright):this.nowAction==o.CharacterState.climbright&&this._changeMoveX<0&&(this.isforceJump=!0,this.nowAction=o.CharacterState.jumpleft),this.nowAction==o.CharacterState.jump||this.nowAction==o.CharacterState.jumpleft||this.nowAction==o.CharacterState.jumpright||this.nowAction==o.CharacterState.speedupjump){a=-a*Math.PI/180,Laya.Quaternion.createFromAxisAngle(new Laya.Vector3(0,1,0),a,this.quaternion);var n=this.jumpSpeed.z;Laya.Vector3.transformQuat(this.jumpSpeed,this.quaternion,this.jumpSpeed),this.jumpSpeed.z=n}},t.prototype.update=function(e){if(e=16,this._iscanMove){var t=e/1e3;switch(this._moveTime+=t,this.nowAction){case o.CharacterState.run:this._moveVec.y=0,this._moveVec.z=t*(this._speedMoveV3.z*this._multiple.z),0==this._lockxstate?this._moveVec.x=this._changeMoveX*t:1==this._lockxstate?this._changeMoveX<0?this._moveVec.x=0:this._moveVec.x=this._changeMoveX*t:2==this._lockxstate&&(this._changeMoveX>0?this._moveVec.x=0:this._moveVec.x=this._changeMoveX*t),this._transform.translate(this._moveVec,!1);break;case o.CharacterState.climbup:this._moveVec.z=0,this._moveVec.y=t*this.jumpSpeed.y,1==this._lockxstate?this._changeMoveX<0?this._moveVec.x=0:this._moveVec.x=this._changeMoveX*t:2==this._lockstate&&this._changeMoveX>0?this._moveVec.x=0:this._moveVec.x=this._changeMoveX*t,this._transform.translate(this._moveVec,!1),this._shangpaVec?this._transform.position.y+1>this._shangpaVec.y&&(this.nowAction=o.CharacterState.ClimbMotion):this._nowselectVec&&this._transform.position.y+1>this._nowselectVec.y&&(this.nowAction=o.CharacterState.ClimbMotion);break;case o.CharacterState.climbupblock:this._moveVec.z=0,this._moveVec.y=t*this.jumpSpeed.y,this._moveVec.x=0,this._transform.translate(this._moveVec,!1),this._shangpaVec?this._transform.position.y+1>this._shangpaVec.y&&(this.nowAction=o.CharacterState.ClimbMotion):this._transform.position.y+1>this._nowselectVec.y&&(this.nowAction=o.CharacterState.ClimbMotion);break;case o.CharacterState.jump:case o.CharacterState.jumpleft:case o.CharacterState.jumpright:this._disy=this.jumpSpeed.y-this.g*t,this.jumpSpeed.y=this._disy,this._moveVec.x=this.jumpSpeed.x*t,this._moveVec.y=this._disy*t,this._moveVec.z=this.jumpSpeed.z*t,this._transform.translate(this._moveVec,!1);break;case o.CharacterState.speedupjump:this._disy=this.jumpSpeed.y-this.g*t,this.jumpSpeed.y=this._disy,this._moveVec.x=this.jumpSpeed.x*t,this._moveVec.y=this._disy*t,this._moveVec.z=this.jumpSpeed.z*t,this._transform.translate(this._moveVec,!1);break;case o.CharacterState.climbleft:case o.CharacterState.climbright:this._moveVec.z=t*this.jumpSpeed.y,this._moveVec.y=this.jumpSpeed.y*t,this._moveVec.x=0,this._transform.translate(this._moveVec,!1);break;case o.CharacterState.MoveX:this._moveVec.z=t*this._speedMoveV3.z,this._moveVec.x=this._speedMoveV3.x*t,this._transform.translate(this._moveVec,!1),this._moveTime>.1&&(this.nowAction=o.CharacterState.run);break;case o.CharacterState.downmove:this._moveVec.y=this.jumpSpeed.x,this._moveVec.x=this.jumpSpeed.y,this._moveVec.z=this.jumpSpeed.z*t,this._transform.translate(this._moveVec,!1);break;case o.CharacterState.sidespeedup:this._moveVec.y=0,this._moveVec.x=0,this._moveVec.z=this.jumpSpeed.z*t,this._transform.translate(this._moveVec,!1),this.buff_speeduptime<=0&&this.LastActionState==o.CharacterState.climbleft||this.LastActionState==o.CharacterState.climbright?this.nowAction=this.LastActionState:this.nowAction=o.CharacterState.jump;break;case o.CharacterState.cross:this._disy=this.jumpSpeed.y-this.g*t,this.jumpSpeed.y=this._disy,this._moveVec.x=this.jumpSpeed.x*t,this._moveVec.y=this._disy*t,this._moveVec.z=this.jumpSpeed.z*t,this._transform.translate(this._moveVec,!1);break;case o.CharacterState.ClimbMotion:this._nowselectVec&&this._transform.position.y<this._nowselectVec.y&&(this._moveVec.x=0,this._moveVec.y=1/.3*t,this._moveVec.z=0,this._transform.translate(this._moveVec,!1))}if(!this._nowselectVec||this.nowAction!=o.CharacterState.run&&this.nowAction!=o.CharacterState.downmove||this._isColling||this._transform.position.z<=this._nowselectVec.z&&(this._changeMoveX>0?this.nowAction=o.CharacterState.jumpright:this._changeMoveX<0?this.nowAction=o.CharacterState.jumpleft:this.nowAction=o.CharacterState.jump),this._transform.position.y<i.PropManager.diePosY&&(""==this._nowscenename||""==this._nowbuildname?this._transform.position=this._initPosVec.clone():this._transform.position=i.PropManager.getPosVecbyScene(this._nowscenename,this._nowbuildname).clone(),this.nowAction=o.CharacterState.run),this._transform.position.z<i.PropManager.gamewinPosZ?this.Win():i.PropManager.pro_jindu.value=this._transform.position.z/i.PropManager.gamewinPosZ*100,this._isActionNums)if(this._isneedactionnum>0){if(this._animator.getCurrentAnimatorPlayState().normalizedTime>=this._isneedactionnum)switch(this._StateName){case o.CharacterState.jump:case o.CharacterState.leftjump:case o.CharacterState.rightjump:case o.CharacterState.highjump1:case o.CharacterState.highjump2:case o.CharacterState.hurdle:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.sky);break;case o.CharacterState.huachan:case o.CharacterState.climbend:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.run),this.nowAction=o.CharacterState.run,this._transform.position=new Laya.Vector3(this._transform.position.x,this._nowselectVec.y,this._transform.position.z);break;case o.CharacterState.land1:
  5. case o.CharacterState.land2:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.run);break;case o.CharacterState.huachan:this.nowAction=o.CharacterState.run}}else if(0!=this._needactiontime&&this._moveTime>this._needactiontime)switch(this._StateName){case o.CharacterState.jump:case o.CharacterState.leftjump:case o.CharacterState.rightjump:case o.CharacterState.highjump1:case o.CharacterState.highjump2:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.sky),this._changeMoveX=0;break;case o.CharacterState.hurdle:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.sky);break;case o.CharacterState.huachan:case o.CharacterState.climbend:this._isActionNums=!1,this.PlayAnimator(o.CharacterState.run),this.nowAction=o.CharacterState.run,this._transform.position=new Laya.Vector3(this._transform.position.x,this._nowselectVec.y,this._transform.position.z)}this.buff_speeduptime>0?(this.buff_speeduptime-=t,i.PropManager.Instance.SpeedUpEffect("jiasulizi",this._transform.position),this.doublespeedup&&i.PropManager.Instance.SpeedUpEffect1("jiasulizi",this._transform.position)):(this._multiple.x=1,this._multiple.y=1,this._multiple.z=1,this.doublespeedup=!1,i.PropManager.Instance.CloseSpeedUpEffect(),i.PropManager.Instance.CloseSpeedUpEffect1()),this.canshake&&(this.shaketime+=t,this.shaketime>=.5&&(this.shaketime=0,m.WXGamePlatform.Instance.vibrateShort()))}else if(this._ending){var t=e/1e3;this._moveTime+=t,this._moveTime>=this._endanmotime?this.GameOver():(this._endAnmoSpeed1.x=this._endAnmoSpeed.x*t,this._endAnmoSpeed1.y=this._endAnmoSpeed.y*t,this._endAnmoSpeed1.z=this._endAnmoSpeed.z*t,i.PropManager.carma.getComponent(l.CameraManager).GameEndRotate(this._transform.position,this._endAnmoSpeed1))}},t.prototype.Win=function(){f.AudioControl.Instance.playGameSound("over"),h.DispatcherManager.dispatchEvent(u.GameState.end);var e=i.PropManager.carma.transform;this._endAnmoSpeed.z=(this._transform.position.z-2-e.position.z)/this._endanmotime,this._endAnmoSpeed.y=(this._transform.position.y-e.position.y)/this._endanmotime,this._endAnmoSpeed.x=(this._transform.position.x+3-e.position.x)/this._endanmotime,this._moveTime=0,this._iscanMove=!1,this._ending=!0,this.PlayAnimator(o.CharacterState.sky),i.PropManager.Instance.GameOverEffecf("yanhua",this._transform.position,0==d.GameStateControl.Instance.endGamePlayerArr.length?!0:!1)},t.prototype.GameOver=function(){this._ending=!1,n.TimerService.Instance.removeUpdateTarget(this)},t.prototype.TestJump=function(){this.nowAction=o.CharacterState.jump},t.prototype.destroy=function(){n.TimerService.Instance.removeUpdateTarget(this),e.prototype.destroy.call(this)},t.prototype.XMove=function(e){this.nowAction==o.CharacterState.run&&(this._moveTime=0,this._speedMoveV3.x=20*e,this.nowAction=o.CharacterState.MoveX)},t.prototype.dispose=function(){n.TimerService.Instance.removeUpdateTarget(this)},t}(Laya.Script3D);a.Player=g},{"../Agency/AgencyUserMessage":8,"../CFG/BuildCFG":9,"../Control/AudioControl":17,"../Control/GameStateControl":20,"../PrefabControl/CharacterState":43,"../PrefabControl/PanelResDic":45,"../PrefabControl/PropManager":46,"../Time/TimerService":48,"../WXSDK/WXGamePlatform":67,"../utils/DispatcherManager":70,"../utils/GameState":71,"../utils/GameUtils":72,"./CameraManager":35}],38:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.curHeight=function(){return Laya.stage.height},e.curWidth=function(){return Laya.stage.width},e.setVars=function(){e.stage=Laya.stage,e.sethttpurl()},e.getUrl=function(t){return-1==t.indexOf("wxlocal")?e.resourcehtttp+t+e.versions:t},e.sethttpurl=function(){e.isdebug?e.httpurl="https://wxgamedev.51yoyoyo.com/":e.httpurl="https://minport.51yoyoyo.com/"},e.httpurl="",e.resourcehtttp="",e.cdnurl="https://wxgame.51yoyoyo.com/",e.versions="",e.initWidth=720,e.initHeight=1280,e.resconfigVersion="",e.nowplatfrom="",e.appid="wx46f4626932e5f48b",e.gameVersion="1.0.0",e.isdebug=!1,e.AppKeyID=0,e.MemberID=0,e}();a.Global=n},{}],39:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function t(){var t=e.call(this)||this;return t._isforcehide=!1,t._lastTime=0,t}return __extends(t,e),t.prototype.constructFromXML=function(t){this.setSize(fairygui.GRoot.inst.width,fairygui.GRoot.inst.height),e.prototype.constructFromXML.call(this,t),this.img_0=this.getChild("img_0").asImage,this.img_0.visible=!1,this.on(Laya.Event.DISPLAY,this,this.onAddedToStage),this.on(Laya.Event.UNDISPLAY,this,this.onRemoveFromStage)},t.prototype.onAddedToStage=function(){this._lastTime=Laya.Browser.now(),Laya.timer.frameLoop(1,this,this.onTimer)},t.prototype.onTimer=function(){if(this.img_0){var e=Laya.Browser.now(),t=e-this._lastTime;if(t/1e3>=0){this._isforcehide||(this.img_0.visible=!0);var a=this.img_0.rotation;a+=10,a>360&&(a%=360),this.img_0.rotation=a}else this.img_0.visible=!1}},t.prototype.hideimg=function(){this._isforcehide=!0,this.img_0&&(this.img_0.visible=!1)},t.prototype.onRemoveFromStage=function(){Laya.timer.clear(this,this.onTimer)},t}(fairygui.GComponent);a.GlobalWaiting=n},{}],40:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function t(t){var a=e.call(this)||this;return a.dis=0,a.degree=0,a.angle=0,a.offx=0,a._iscanCBack=!1,a.mLastMouseX=0,a.mLastMouseY=0,a.mX=0,a.mY=0,a._iacanCallback=!1,a._clickpanel=t,a._button=new Laya.Point,a.touchId=-1,a.radius=400,a._curPos=new Laya.Point,a._clickpanel.on(Laya.Event.MOUSE_DOWN,a,a.onTouchDown),a}return __extends(t,e),t.prototype.onTouchDown=function(e){if(-1==this.touchId){this.touchId=e.touchId,this.offx=0,this._iscanCBack=!1,fairygui.GRoot.inst.globalToLocal(Laya.stage.mouseX,Laya.stage.mouseY,this._curPos);var t=this._curPos.x,a=this._curPos.y;this._lastStageX=t,this._lastStageY=a,this._startStageX=t,this._startStageY=a,this._button.x=t,this._button.y=a,this._callobj&&this._downCallback&&this._downCallback.call(this._callobj),this._clickpanel.on(Laya.Event.MOUSE_MOVE,this,this.OnTouchMove),this._clickpanel.on(Laya.Event.MOUSE_UP,this,this.OnTouchUp),this._clickpanel.on(Laya.Event.MOUSE_OUT,this,this.OnTouchUp)}},t.prototype.setEventCallback=function(e,t,a,n){this._callobj=e,this._downCallback=t,this._movecallback=a,this._updatecallback=n},t.prototype.Trigger=function(e){this.onTouchDown(e)},t.prototype.createMap=function(){this.tiledMap=new Laya.TiledMap,this.mX=this.mY=0,this.tiledMap.createMap("res/tiledMap/desert.json",new Laya.Rectangle(0,0,Laya.Browser.width,Laya.Browser.height),new Laya.Handler(this,this.completeHandler))},t.prototype.completeHandler=function(){console.log("地图创建完成"),console.log("ClientW:"+Laya.Browser.clientWidth+" ClientH:"+Laya.Browser.clientHeight)},t.prototype.OnTouchUp=function(e){void 0===e&&(e=null),-1!=this.touchId&&e.touchId==this.touchId&&(this.touchup(),this._callobj&&this._updatecallback&&this._updatecallback.call(this._callobj))},t.prototype.touchup=function(){this._iscanCBack=!1,this.touchId=-1,this._clickpanel.off(Laya.Event.MOUSE_MOVE,this,this.OnTouchMove),this._clickpanel.off(Laya.Event.MOUSE_UP,this,this.OnTouchUp),this._clickpanel.off(Laya.Event.MOUSE_OUT,this,this.OnTouchUp),this._iacanCallback=!1,this.degree=0},t.prototype.OnTouchMove=function(e){if(-1!=this.touchId&&e.touchId==this.touchId){var t=Laya.stage.mouseX,a=Laya.stage.mouseY,n=t-this._lastStageX,i=a-this._lastStageY;this._lastStageX=t,this._lastStageY=a;var o=this._button.x+n,r=this._button.y+i,s=o-this._startStageX,c=r-this._startStageY,l=0;if(n>=2||-2>=n?this._iscanCBack=!0:this._iscanCBack=!1,this.offx=n,0==s&&0==c)return;s>0?s>this.radius?(l=this.radius,this.angle=90):(l=this.radius-s,this.angle=90-l/this.radius*90):0==s?this.angle=0:-s>this.radius?(l=this.radius,this.angle=-90):(l=this.radius+s,this.angle=-(90-l/this.radius*90));var h=Math.atan2(c,s);this.degree=h;var u=this.radius*Math.cos(h),p=this.radius*Math.sin(h);Math.abs(s)>Math.abs(u)&&(s=u),Math.abs(c)>Math.abs(p)&&(c=p),o=this._startStageX+s,r=this._startStageY+c,0>o&&(o=0),r>fairygui.GRoot.inst.height&&(r=fairygui.GRoot.inst.height),this._button.x=o,this._button.y=r,this.dis=Math.sqrt(s*s+c*c),this._iacanCallback=!0,this._iscanCBack&&this._callobj&&this._movecallback&&this._iacanCallback&&this._movecallback.call(this._callobj,this.offx)}},t.prototype.dispose=function(){this._clickpanel.off(Laya.Event.MOUSE_DOWN,this,this.onTouchDown)},t.JoystickMoving="JoystickMoving",t.JoystickUp="JoystickUp",t}(Laya.EventDispatcher);a.JoystickModule=n},{}],41:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./Global"),i=Laya.Stage,o=e("./Config/AssetPath"),r=e("./GameContents"),s=e("./WXSDK/Sdk"),c=function(){function e(){Laya3D.init(n.Global.initWidth,n.Global.initHeight),Laya.stage.scaleMode=i.SCALE_FIXED_WIDTH,Laya.stage.alignH=i.ALIGN_CENTER,Laya.stage.alignV=i.ALIGN_TOP,Laya.stage.screenMode=i.SCREEN_VERTICAL,Laya.stage.bgColor="#54B9F6",Laya.alertGlobalError=!0,window.Config3D&&(window.Config3D._default._defaultPhysicsMemory=128),Laya.Browser.onWeiXin&&(s.WxApi.WxInit(),s.WxApi.CheckWXUpdate()),Laya.stage.on("resize",this,this.onResize)}return e.prototype.onResize=function(){Laya.stage.off("resize",this,this.onResize),n.Global.setVars(),o.AssetPath.init(),fairygui.UIConfig.packageFileExtension="bin",fairygui.UIConfig.textureLinearSampling=!0,fairygui.UIConfig.defaultFont="黑体",fairygui.UIConfig.versions=n.Global.versions;var e=new r.GameContents;e.initGame()},e}();new c},{"./Config/AssetPath":15,"./GameContents":34,"./Global":38,"./WXSDK/Sdk":62}],42:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Config/AssetPath"),i=function(){function e(){}return e.AddCharacter=function(t,a,i){var o,r=e.roledict[t];if(r&&r.length>0)o=r.shift(),o.active=!0,i.addChild(o);else{var s=Laya.Loader.getRes(n.AssetPath.get3DRoleModel(t));o=Laya.Sprite3D.instantiate(s,i,!1,new Laya.Vector3(0,0,0))}if(a){var c=o.addComponent(a);c.resouseName=t}var l=new Laya.Quaternion;return Laya.Quaternion.createFromAxisAngle(new Laya.Vector3(0,1,0),180*Math.PI/180,l),o.transform.rotation=l,o},e.ClearCharacter=function(t,a,n){e.roledict[a]||(e.roledict[a]=[]),n&&n.destroy(),t.active=!1,t.removeSelf(),e.roledict[a].push(t)},e.roledict={},e}();a.CharacterPool=i},{"../Config/AssetPath":15}],43:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.rollover1="rollover1",e.rollover2="rollover2",e.runwallleft="runwallleft",e.rightjump="rightjump",e.runwallright="runwallright",e.leftjump="leftjump",e.climbwall="climbwall",e.climbend="climbend",e.stand="stand",e.sky="sky",e.land1="land1",e.land2="land2",e.highjump1="highjump1",e.highjump2="highjump2",e.run="run",e.jump="jump",e.climbup="climbup",e.falldown="falldown",e.climbleft="climbleft",e.climbright="climbright",e.jumpright="jumpright",e.jumpleft="jumpleft",e.ClimbMotion="ClimbMotion",e.huachan="huachan",e.hurdle="hurdle",e.speedupjump="speedupjump",e.MoveX="MoveX",e.downmove="downmove",e.sidespeedup="sidespeedup",e.cross="cross",e.climbupblock="climbupblock",e}();a.CharacterState=n},{}],44:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=Laya.Animation,i=function(e){function t(){var t=e.call(this)||this;return t.AniConfPath="res/fighter/fighter.json",t}return __extends(t,e),t.RemoveItem=function(e,a){if(t.contain[e]){var n=t.contain[e].indexOf(a);-1==n&&t.contain[e].push(a)}},t.GetItem=function(e){for(var a=[],n=1;n<arguments.length;n++)a[n-1]=arguments[n];if(t.contain[e]){var i=t.contain[e];if(0==i.length){var o=t.sprite3DArray[e],r=new o;return r}return t.contain[e].shift()}return console.log("此key值对应的类未被注册"),null},t.prototype.createAnimation=function(){var e=new n;e.loadAtlas(this.AniConfPath),e.interval=30,e.index=1,e.play();var t=e.getGraphicBounds();e.pivot(t.width/2,t.height/2),e.pos(Laya.stage.width/2,Laya.stage.height/2),Laya.stage.addChild(e)},t.GetItemFairyGUI=function(e){t.contain[e]||(t.contain[e]=[]);var a=t.contain[e];if(0==a.length){var n=fairygui.UIPackage.createObjectFromURL(e);return n}return t.contain[e].shift()},t.Mark=function(e,a){t.sprite3DArray[e]=a,t.contain[e]=[]},t.sprite3DArray={},t.contain={},t}(Laya.EventDispatcher);a.GamePool=i},{}],45:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../utils/Singleton"),i=function(e){function t(){var a=e.call(this)||this;return t.ins=a,a}return __extends(t,e),Object.defineProperty(t,"Instance",{get:function(){return null==t.ins?new t:t.ins},enumerable:!0,configurable:!0}),t.getView=function(e){if(!t._mapviewDict[e])throw"err0 未绑定的viewkey:"+e;return t._mapviewDict[e]},t.prototype.getSingleTon=function(e){return n.Singleton.Instance(e)},t.prototype.mapView=function(e,a){t._mapviewDict[e]||(t._mapviewDict[e]=a,a.key=e)},t.prototype.AgencyAdd=function(e){n.Singleton.create(e)},t.prototype.AgencyClear=function(e){n.Singleton.remove(e)},t._mapviewDict={},t}(Laya.EventDispatcher);a.PanelResDic=i},{"../utils/Singleton":76}],46:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Config/AssetPath"),i=e("../utils/GameUtils"),o=function(){function e(){this._outQUaternion4=new Laya.Quaternion,this._outQUaternion=new Laya.Quaternion,e.ins=this}return Object.defineProperty(e,"Instance",{get:function(){return null==e.ins?new e:e.ins},enumerable:!0,configurable:!0}),e.getPosVecbyScene=function(t,a){return e.patternDict[t]?e.patternDict[t][a]:null},e.setAnimator=function(t){var a;for(var n in e.actionDict)if(!t.getControllerLayer().getAnimatorState(n)){a=e.actionDict[n];var i=new Laya.AnimatorState;i.name=n,i.clipStart=a.s/e.actionnums,i.clipEnd=a.e/e.actionnums,i.clip=t.getDefaultState().clip,i.clip.islooping=a.islooping,t.addState(i)}},e.prototype.InitEffect=function(){var t=e.getlizibyName("speedupeffect");t.particleSystem.play(),t.active=!1;var t=e.getlizibyName("color_white");t.particleSystem.play(),t.active=!1;var t=e.getlizibyName("color_yellow");t.particleSystem.play(),t.active=!1},e.prototype.SetEffectColor=function(t,a){var n=0;if(Laya.timer.clear(this,this.EffectEnd),this.EffectEndColor(),"color_white"==t){var o=i.GameUtils.randRangeint(0,100);o>50&&(t="color_yellow")}n=500,this._tanselizi=e.getlizibyName(t),this._tanselizi.transform.position=a,this._tanselizi.particleSystem.play(),0!=n&&Laya.timer.once(n,this,this.EffectEndColor)},e.prototype.EffectEndColor=function(){this._tanselizi&&(this._tanselizi.particleSystem.stop(),this._tanselizi.active=!1)},e.prototype.SpeedUpEffect1=function(t,a){(!this._engamelizi4||this._engamelizi4&&!this._engamelizi4.active)&&(this._engamelizi4=e.getlizibyName("speedupeffect"),this._engamelizi4.particleSystem.looping=!0,this._engamelizi4.transform.scale=new Laya.Vector3(20,20,20),Laya.Quaternion.createFromAxisAngle(new Laya.Vector3(1,0,0),-50,this._outQUaternion4),this._engamelizi4.transform.rotation=this._outQUaternion4,this._engamelizi4.particleSystem.play());var n=a.clone();n.y+=5,n.z-=10,this._engamelizi4.transform.position=n},e.prototype.CloseSpeedUpEffect1=function(){this._engamelizi4&&this._engamelizi4.active&&(this._engamelizi4.active=!1)},e.prototype.SpeedUpEffect=function(t,a){(!this._engamelizi3||this._engamelizi3&&!this._engamelizi3.active)&&(this._engamelizi3=e.getlizibyName("speedupeffect"),this._engamelizi3.particleSystem.looping=!0,this._engamelizi3.transform.scale=new Laya.Vector3(20,20,20),Laya.Quaternion.createFromAxisAngle(new Laya.Vector3(1,0,0),-50,this._outQUaternion),this._engamelizi3.transform.rotation=this._outQUaternion,this._engamelizi3.particleSystem.play());var n=a.clone();n.y+=5,this._engamelizi3.transform.position=n},e.prototype.CloseSpeedUpEffect=function(){this._engamelizi3&&this._engamelizi3.active&&(this._engamelizi3.active=!1)},e.prototype.GameOverEffecf=function(t,a,n){this._engamelizi1=e.getlizibyName("fireworks"),this._engamelizi1.transform.position=a,this._engamelizi1.particleSystem.play(),n&&(this._engamelizi2=e.getlizibyName("winline"),this._engamelizi2.transform.position=a,this._engamelizi2.particleSystem.play())},e.prototype.CloseGameOverEffect=function(){this._engamelizi1&&(this._engamelizi1.particleSystem.stop(),this._engamelizi1.active=!1),this._engamelizi2&&(this._engamelizi2.particleSystem.stop(),this._engamelizi2.active=!1)},e.prototype.EffectEnd=function(e){e&&(e.particleSystem.stop(),e.active=!1)},e.getlizibyName=function(t){var a;return e.liziDict[t]?a=e.liziDict[t]:(a=Laya.Sprite3D.instantiate(Laya.Loader.getRes(n.AssetPath.get3DModel(t))),e.liziDict[t]=a,e.scene3D.addChild(a)),a.active=!0,a},e.nowmapDict={},e.diePosY=0,e.gamewinPosZ=0,e.patternDict={},e.npcDict={},e.npcscriptDict={},e.npcnum=0,e.iscarmanpc=!1,e.liziDict={},e.jiantouArr=[],e.actionnums=575,e.actionDict={climbend:{s:550,e:575,islooping:!1},stand:{s:0,e:80,islooping:!0},run:{s:90,e:106,islooping:!0},jump:{s:110,e:132,islooping:!0},kongzhong:{s:132,e:145,islooping:!0},luodi1:{s:145,e:160,islooping:!0},luodi2:{s:170,e:202,islooping:!0},datiao1:{s:210,e:235,islooping:!0},datiao2:{s:240,e:273,islooping:!0},huachan:{s:280,e:310,islooping:!0},kualan:{s:310,e:346,islooping:!0},cefan1:{s:350,e:391,islooping:!0},cefan2:{s:400,e:434,islooping:!0},paoqiangleft:{s:440,islooping:!0,e:456},rightjump:{s:460,e:477,islooping:!0},paoqiangright:{s:480,e:496,islooping:!0},leftjump:{s:500,e:517,islooping:!0},paqiang:{s:520,e:542,islooping:!0}},e}();a.PropManager=o},{"../Config/AssetPath":15,"../utils/GameUtils":72}],47:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.formatData=function(e){var t="",a=new Date(1e3*e);return t=this.getTwo(a.getMonth()+1)+"/"+this.getTwo(a.getDate())+" "+this.getTwo(a.getHours())+":"+this.getTwo(a.getMinutes())},e.formatData1=function(e){var t="",a=new Date(1e3*e);return t=a.getMonth()+1+"月"+a.getDate()+"日"},e.formatYearMonthDate=function(e){var t="",a=new Date(1e3*e);return t=a.getFullYear()+"."+(a.getMonth()+1)+"."+a.getDate()},e.formatYearMonthDate1=function(e){var t="",a=new Date(1e3*e),n=a.getMonth()+1>=10?(a.getMonth()+1).toString():"0"+(a.getMonth()+1),i=a.getDate()>=10?a.getDate().toString():"0"+a.getDate();return t=a.getFullYear()+"-"+n+"-"+i},e.LXandJXTimeType=function(e){var t="";if(0>e)t="0秒";else if(60>e)t=Math.floor(e)+"秒";else if(3600>e)t=Math.floor(e/60)+"分钟";else{var a;a=Math.floor(e/60/60),t=a+"小时",t+=Math.floor((e-60*a*60)/60)+"分钟"}return t},e.formatTime=function(e){var t="",a=Math.floor(e/3600);a>0&&(t+=a>=10?a+":":"0"+a+":");var n=Math.floor(e%3600/60);t+=n>=10?n+":":"0"+n+":";var i=Math.floor(e%60);return t+=i>=10?i+"":"0"+i},e.formatTime1=function(e){var t="",a=Math.floor(e/3600);a>0&&(t+=a+"小时");var n=Math.floor(e%3600/60);t+=n+"分钟";var i=Math.floor(e%60);return t+=i+"秒"},e.formatTime5=function(e){var t="",a=Math.floor(e/3600);a>0&&(t+=a+"小时");var n=Math.floor(e%3600/60);n>0&&(t+=n+"分");var i=Math.floor(e%60);return t+=i+"秒"},e.formatTime2=function(e){var t="",a=Math.floor(e/86400);a>0&&(t+=a+"天");var n=Math.floor(e/3600);n>0&&(t+=n+"小时");var i=Math.floor(e%3600/60);i>0&&(t+=i+"分钟");var o=Math.ceil(e%60);return t+=o+"秒"},e.formatTime6=function(e){var t="",a=0,n=Math.floor(e/86400);n>0&&(t+=n+"天",a++);var i=Math.floor(e%86400/3600);if(i>0&&(t+=i+"小时",a++),2>a){var o=Math.floor(e%3600/60);o>0&&(t+=o+"分",a++)}if(2>a){var r=Math.ceil(e%60);t+=r+"秒"}return t},e.formatTime3=function(e){var t="",a=Math.floor(e/86400);t+=a+"天";var n=Math.floor(e%86400/3600);t+=n+"小时";var i=Math.floor(e%86400%3600/60);return t+=i+"分"},e.formatTime4=function(e){var t="";if(e>86400){var a=Math.floor(e/86400);t+=a+"天"}if(e>3600){var n=Math.floor(e%86400/3600);t+=n+"小时"}if(e>60){var i=Math.floor(e%86400%3600/60);t+=i+"分钟"}return t},e.formatTime4Arr=function(e){var t=[];if(e>=3600){var a=Math.floor(e%86400/3600);t.unshift(String(a))}if(e>=60){var n=Math.floor(e%86400%3600/60);t.unshift(String(n))}return t},e.getTwo=function(e){var t=String(e);return t.length<2&&(t="0"+t),t},e.datetoTime=function(e){return Date.parse(e)/1e3},e}();a.TimeUtils=n},{}],48:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function t(){var a=e.call(this)||this;return a._timeScale=1,a._unscalableList=[],t.ins=a,a}return __extends(t,e),Object.defineProperty(t,"Instance",{get:function(){return null==t.ins?new t:t.ins},enumerable:!0,configurable:!0}),t.prototype.init=function(){Laya.timer.frameLoop(1,this,this.onTimer)},t.prototype.initEvent=function(){},t.prototype.stop=function(){Laya.timer.clear(this,this.onTimer)},t.prototype.recover=function(){this.stop(),Laya.timer.frameLoop(1,this,this.onTimer)},t.prototype.onTimer=function(){var e=0;for(e=0;e<this._unscalableList.length;e++)this._unscalableList[e].update(Laya.timer.delta*this._timeScale)},t.prototype.hasUpdataTarget=function(e){var t;return t=this._unscalableList.indexOf(e),-1!=t?!0:!1},t.prototype.addUpdateTarget=function(e){var t;t=this._unscalableList.indexOf(e),-1==t&&this._unscalableList.push(e)},t.prototype.removeUpdateTarget=function(e){var t=this._unscalableList.indexOf(e);-1!=t&&this._unscalableList.splice(t,1)},Object.defineProperty(t.prototype,"timeScale",{get:function(){return this._timeScale},set:function(e){(0>e||isNaN(e))&&(e=1),this._timeScale=e},enumerable:!0,configurable:!0}),t}(Laya.EventDispatcher);a.TimerService=n},{}],49:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Data/UserDataInfo"),i=e("../Control/LocalDataControl"),o=function(){function e(){this.lastgameTime=0,this._serverTime=0,this.iscan=!1,this._onlinedistime=0,this._time=0,this._onlinetime=0}return Object.defineProperty(e,"Instance",{get:function(){return null==e.ins?new e:e.ins},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.lastgameTime=i.LocalDataControl.Instance.getnum(n.UserDataInfo.lasttime),Laya.timer.frameLoop(1,this,this.update)},e.prototype.updateServiceTime=function(e){this._serverTime=Number(e),this.iscan=!0,this._onlinedistime=this._serverTime,i.LocalDataControl.Instance.addstr(n.UserDataInfo.lasttime,this._serverTime.toString())},e.prototype.update=function(){this.iscan&&(this._time+=Laya.timer.delta,this._onlinetime+=Laya.timer.delta,this._serverTime+=Laya.timer.delta/1e3,this._time>=3e4&&(this._time=0,i.LocalDataControl.Instance.addstr(n.UserDataInfo.lasttime,this._serverTime.toString())),this._onlinetime>=9e4&&(this._onlinetime=0,this.sendonlineTongji()))},e.prototype.sendonlineTongji=function(){var e=this.serverTime-this._onlinedistime;e>0&&(this._onlinedistime=this.serverTime)},Object.defineProperty(e.prototype,"serverTime",{get:function(){return this._serverTime},enumerable:!0,configurable:!0}),e}();a.TimesTamper=o},{"../Control/LocalDataControl":22,"../Data/UserDataInfo":32}],50:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelBaseControl"),i=e("../utils/ViewAction"),o=e("../Control/GameStateControl"),r=e("../Agency/AgencyUserMessage"),s=e("../Agency/AgencyInGame"),c=e("../WXSDK/pingtaiutils"),l=e("../WXSDK/GuangGao"),h=function(e){function t(t){var a=e.call(this,"main","gameresult",!1,i.ViewAction.ActionType_none,1)||this;return a.getgold=0,a._position=new Laya.Vector3,a._outPos=new Laya.Vector3,a.scaleDelta=0,a.scale=new Laya.Vector3(.1,.1,.1),a.getgold=t,a}return __extends(t,e),t.prototype.loadScene=function(){Laya.Scene3D.load("res/threeDimen/scene/ParticleScene/Example_01.ls",Laya.Handler.create(this,function(e){this.scene=Laya.stage.addChildAt(e,0);var t=this.scene.addChild(new Laya.Camera(0,.1,100));t.transform.translate(new Laya.Vector3(0,1,0))}))},t.prototype.garbageCollection=function(){this.scene.destroy(),this.scene=null,Laya.Resource.destroyUnusedResources()},t.prototype.btn1click=function(){0==this.c_state.selectedIndex?(this.getProxy(r.AgencyUserMessage).GoldUp(this.getgold),this.getProxy(r.AgencyUserMessage).LevelUp(),this._gameProxy.returnmainview()):(this.getProxy(r.AgencyUserMessage).GoldUp(this.getgold),this._gameProxy.returnmainview())},t.prototype.onComplete=function(){Laya.Sprite3D.load("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh",Laya.Handler.create(this,function(e){this.layaMonkey3D=e,this.scene.addChild(e),this.layaMonkey2D=Laya.stage.addChild(new Laya.Image("res/threeDimen/monkey.png")),Laya.timer.frameLoop(1,this,this.animate)}))},t.prototype.animate=function(){this._position.x=Math.sin(this.scaleDelta+=.01),this.layaMonkey3D.transform.position=this._position,this.layaMonkey3D.transform.scale=this.scale,this.camera.viewport.project(this.layaMonkey3D.transform.position,this.camera.projectionViewMatrix,this._outPos),this.layaMonkey2D.pos(this._outPos.x/Laya.stage.clientScaleX,this._outPos.y/Laya.stage.clientScaleY)},t.prototype.btn0click=function(){0==this.c_state.selectedIndex?c.pingtaiutils.Instance.playVideo("",this,this.playvideocallback):(this.getProxy(r.AgencyUserMessage).GoldUp(this.getgold),this._gameProxy.returnmainview())},t.prototype.playvideocallback=function(){this.getProxy(r.AgencyUserMessage).GoldUp(3*this.getgold),this._gameProxy.returnmainview()},t.prototype.destory=function(){l.GuangGao.Clear(),e.prototype.destory.call(this)},t.prototype.initView=function(){this._gameProxy=this.getProxy(s.AgencyInGame),this.c_state=this.getControllerByBame("c_state"),this.txt_gold.text=this.getgold.toString(),0==o.GameStateControl.Instance.endGamePlayerArr.length?this.c_state.selectedIndex=0:this.c_state.selectedIndex=1,l.GuangGao.CheatBanner(this.btn_1)},t.prototype.initEvent=function(){this.AddEventByType(this.btn_0,Laya.Event.CLICK,this,this.btn0click),this.AddEventByType(this.btn_1,Laya.Event.CLICK,this,this.btn1click)},t.key="CompletePanel",t}(n.PanelBaseControl);a.CompletePanel=h},{"../Agency/AgencyInGame":2,"../Agency/AgencyUserMessage":8,"../Control/GameStateControl":20,"../Control/PanelBaseControl":23,"../WXSDK/GuangGao":58,"../WXSDK/pingtaiutils":68,"../utils/ViewAction":78}],51:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelBaseControl"),i=e("../utils/DispatcherManager"),o=e("../utils/GameState"),r=function(e){function t(){var t=e.call(this,"loading","wordTips")||this;return t.nowword="",t}return __extends(t,e),t.prototype.showText=function(){var e=new Laya.Text;e.text="Orientation-Portrait",e.color="gray",e.font="Impact",e.fontSize=50,e.x=Laya.stage.width-e.width>>1,e.y=Laya.stage.height-e.height>>1,Laya.stage.addChild(e)},t.prototype.showWord=function(e){this.nowword=e,this.text_word.text=e,this.t1.play(Laya.Handler.create(this,this.playEndCallback),1)},t.prototype.onInit=function(){e.prototype.onInit.call(this),this.t1=this.getpanelTransition("t1")},t.prototype.createCantralRect=function(){this.rect=new Laya.Sprite,this.rect.graphics.drawRect(-100,-100,200,200,"gray"),Laya.stage.addChild(this.rect),this.updateRectPos()},t.prototype.updateRectPos=function(){this.rect.x=Laya.stage.width/2,this.rect.y=Laya.stage.height/2},t.prototype.playEndCallback=function(){i.DispatcherManager.dispatchEvent(o.GameState.removeselect,this)},t.key="WordTipsPanel",t}(n.PanelBaseControl);a.WordTipsPanel=r},{"../Control/PanelBaseControl":23,"../utils/DispatcherManager":70,"../utils/GameState":71}],52:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelBaseControl"),i=function(e){function t(){return e.call(this,"loading","loading")||this}return __extends(t,e),t.prototype.onInit=function(){e.prototype.onInit.call(this)},t.prototype.showWord=function(e){this.pro.value=e},t.prototype.onBoyClick=function(e){var t=e.target;1===t.scaleX?t.scale(1.2,1.2):t.scale(1,1)},t.prototype.onTxtClick=function(e){e.stopPropagation()},t.prototype.destory=function(){this.clearEvent(),e.prototype.destory.call(this)},t.key="LoadingPanel",t}(n.PanelBaseControl);a.LoadingPanel=i},{"../Control/PanelBaseControl":23}],53:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelBaseControl"),i=e("../utils/ViewAction"),o=e("../View/ViewManager"),r=e("../WXSDK/pingtaiutils"),s=e("../CFG/LotteryCFG"),c=e("../Config/AssetPath"),l=e("../CFG/RoleCFG"),h=e("../Agency/AgencyLottery"),u=e("../WXSDK/GuangGao"),p=function(e){function t(){return e.call(this,"main","LotteryView",!1,i.ViewAction.ActionType_none,1)||this}return __extends(t,e),t.prototype.showLogger=function(){this.logger=new Laya.Text,this.logger.fontSize=30,this.logger.color="#FFFFFF",this.logger.align="center",this.logger.valign="middle",this.logger.size(Laya.stage.width,Laya.stage.height),this.logger.text="等待响应...\n",Laya.stage.addChild(this.logger)},t.prototype.onHttpRequestError=function(e){console.log(e)},t.prototype.initEvent=function(){this.AddEventByType(this.backbtn,Laya.Event.CLICK,this,this.onclosefun),this.AddEventByType(this.lotterybtn,Laya.Event.CLICK,this,this.choujiangclick)},t.prototype.playComplte=function(){this.tw&&(this.tw.clear(),this.tw=null),this.backbtn.enabled=!0,this.lotterybtn.enabled=!0,this.agencylottery.getreward(this._selectcfg)},t.prototype.onclosefun=function(){this.tw&&(this.tw.clear(),this.tw=null),u.GuangGao.Clear(),o.ViewManager.Instance.close(t)},t.prototype.initView=function(){this.agencylottery=this.getProxy(h.AgencyLottery);for(var e=s["default"].vec,t=0;t<e.length;t++){var a=e[t];if(1==a.type)this["icon_"+t].url=fairygui.UIPackage.getItemURL("main","img_gold"),this["txt_"+t].text="X"+a.value;else{var n=l["default"].dict[a.value];this["icon_"+t].url=c.AssetPath.getroleicon(n.icon),this["txt_"+t].text=n.rolename}}u.GuangGao.CheatBanner(this.lotterybtn)},t.prototype.onSocketClose=function(){console.log("Socket closed")},t.prototype.onMessageReveived=function(e){console.log("Message from server:"),"string"==typeof e?console.log(e):e instanceof ArrayBuffer},t.prototype.choujiangclick=function(){r.pingtaiutils.Instance.playVideo("",this,this.videocallback)},t.prototype.videocallback=function(){this.startPlay()},t.prototype.startPlay=function(){var e=this.agencylottery.GetReward();this._selectcfg=s["default"].vec[e],this.backbtn.enabled=!1,this.lotterybtn.enabled=!1,this._nowgetIndex=e;var t=2160+45*this._nowgetIndex+22.5;0==this.item_panel.rotation?this._tweeObject={value:0}:this._tweeObject={value:45*this._preIndex+22.5},this._preIndex=this._nowgetIndex,this.tw=laya.utils.Tween.to(this._tweeObject,{value:t},3e3,laya.utils.Ease.quadInOut,Laya.Handler.create(this,this.playComplte)),this.tw.update=Laya.Handler.create(this,function(){var e=this._tweeObject.value%360;this.item_panel.rotation=e},null,!1)},t.key="LotteryPanel",t}(n.PanelBaseControl);a.LotteryPanel=p},{"../Agency/AgencyLottery":4,"../CFG/LotteryCFG":12,"../CFG/RoleCFG":14,"../Config/AssetPath":15,"../Control/PanelBaseControl":23,"../View/ViewManager":57,"../WXSDK/GuangGao":58,"../WXSDK/pingtaiutils":68,"../utils/ViewAction":78}],54:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelBaseControl"),i=e("../Control/GameStateControl"),o=e("../utils/GameState"),r=e("../PrefabControl/PropManager"),s=e("../Agency/AgencyUserMessage"),c=e("../Data/UserInfoEvent"),l=e("../Agency/AgencySkin"),h=e("../Agency/AgencyInGame"),u=e("../Agency/AgencyLottery"),p=function(e){function t(){var t=e.call(this,"main","mainview")||this;return t.phoenixWidth=550,t.phoenixHeight=400,t.bgColorTweener=new Laya.Tween,t.gradientInterval=2e3,t.bgColorChannels={r:99,g:0,b:255},t}return __extends(t,e),t.prototype.updateUserDataHandler=function(){this.txt_gold.text=this.agencyusermessage.RoleData.Money.toString()},t.prototype.returnmainHandler=function(){var e=this.agencyusermessage.RoleData;e.nowlevel<=2?this.c_state.selectedIndex=0:this.c_state.selectedIndex=1},t.prototype.onInit=function(){e.prototype.onInit.call(this)},t.prototype.createPhoenixes=function(){var e,t=Math.min(Laya.stage.width/(2*this.phoenixWidth),Laya.stage.height/this.phoenixHeight);e.blendMode="lighter",e.scale(t,t),e.y=(Laya.stage.height-this.phoenixHeight*t)/2;
  6. var a;a.scale(t,t),a.x=this.phoenixWidth*t,a.y=(Laya.stage.height-this.phoenixHeight*t)/2},t.prototype.initView=function(){this.agencyusermessage=this.getProxy(s.AgencyUserMessage),r.PropManager.pro_jindu=this.pro_dis,r.PropManager.txt_mingci=this.txt_mingci,this.c_state=this.getControllerByBame("c_state"),i.GameStateControl.Instance.setClickPanel(this.load_clickpanel),this.returnmainHandler(),this.updateUserDataHandler()},t.prototype.choujiangclick=function(){this.getProxy(u.AgencyLottery).openView()},t.prototype.tuijianclick=function(){},t.prototype.skinclick=function(){this.getProxy(l.AgencySkin).openview()},t.prototype.moreclick=function(){},t.prototype.btnclick=function(){this.c_state.selectedIndex=2,this.txt_lv.text=this.agencyusermessage.RoleData.getNowServerLevel().toString(),this.getProxy(h.AgencyInGame).startGame()},t.prototype.setclick=function(){},t.prototype.mapLoaded=function(){this.layer=this.tiledMap.getLayerByIndex(0);var e=32,t=Math.tan(180/Math.PI*30)*e,a="#FF7F50";this.sprite=new Laya.Sprite,this.sprite.graphics.drawLine(0,0,-e,t,a),this.sprite.graphics.drawLine(0,0,e,t,a),this.sprite.graphics.drawLine(-e,t,0,2*t,a),this.sprite.graphics.drawLine(e,t,0,2*t,a),Laya.stage.addChild(this.sprite)},t.prototype.initEvent=function(){this.AddEventByType(this.load_start,Laya.Event.CLICK,this,this.btnclick),this.AddEventByType(this.SkinBtn,Laya.Event.CLICK,this,this.skinclick),this.AddEventByType(this.MoreGameBtn,Laya.Event.CLICK,this,this.moreclick),this.AddEventByType(this.btn_tuijian,Laya.Event.CLICK,this,this.tuijianclick),this.addDataEvent(o.GameState.returnMainView,this,this.returnmainHandler),this.AddEventByType(this.LotteryBtn,Laya.Event.CLICK,this,this.choujiangclick),this.addDataEvent(c.UserInfoEvent.UserInfoEvent_updateUserData,this,this.updateUserDataHandler)},t.key="MainPanel",t}(n.PanelBaseControl);a.MainPanel=p},{"../Agency/AgencyInGame":2,"../Agency/AgencyLottery":4,"../Agency/AgencySkin":6,"../Agency/AgencyUserMessage":8,"../Control/GameStateControl":20,"../Control/PanelBaseControl":23,"../Data/UserInfoEvent":33,"../PrefabControl/PropManager":46,"../utils/GameState":71}],55:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelBaseControl"),i=e("../utils/ViewAction"),o=e("../Agency/AgencySkin"),r=e("../utils/GameState"),s=e("../Data/UserInfoEvent"),c=e("../Control/ResourceControl"),l=e("../Config/AssetPath"),h=e("../PrefabControl/CharacterState"),u=e("../View/ViewManager"),p=e("../PrefabControl/CharacterPool"),d=e("../Game/Player"),f=function(e){function t(){var t=e.call(this,"main","skinview",!1,i.ViewAction.ActionType_none,0)||this;return t._isdestorys=!1,t._out=new Laya.Quaternion,t}return __extends(t,e),t.prototype.initView=function(){this._isdestorys=!1,this.c_title=this.getControllerByBame("c_title"),this.agencyskin=this.getProxy(o.AgencySkin),this.list_0.setVirtual(),this.list_0.itemRenderer=Laya.Handler.create(this,this.itemlistrender,null,!1),this.c_title.selectedIndex=0,this.onchange(),this._ui3DScene=this.displayObject.addChildAt(new Laya.Scene3D,0),this._uicarma3D=this._ui3DScene.addChild(new Laya.Camera(0,.1,80)),this._uicarma3D.viewport=new Laya.Viewport(this.x,this.y,this.width,this.height),this._uicarma3D.transform.translate(new Laya.Vector3(0,1.2,5),!1),this.updateroleHandler()},t.prototype.initEvent=function(){this.AddEventByType(this.btn_close,Laya.Event.CLICK,this,this.onclosefun),this.AddEventByType(this.c_title,fairygui.Events.STATE_CHANGED,this,this.onchange),this.addDataEvent(r.GameState.updateSKinView,this,this.onchange),this.addDataEvent(s.UserInfoEvent.userinfoEvent_updateroleid,this,this.updateroleHandler)},t.prototype.ClearCharacter=function(){if(this._rolemo){var e=this._rolemo.getComponent(d.Player);p.CharacterPool.ClearCharacter(this._rolemo,e.resouseName,e),this._rolemo=null}},t.prototype.onclosefun=function(){u.ViewManager.Instance.close(t)},t.prototype.destory=function(){this._isdestorys=!0,this.ClearCharacter(),this._uicarma3D&&(this._uicarma3D.destroy(),this._uicarma3D=null),this._ui3DScene&&(this._ui3DScene.destroy(),this._ui3DScene=null),e.prototype.destory.call(this)},t.prototype.onchange=function(){0==this.c_title.selectedIndex?this.list_0.numItems=this.agencyskin.pifuArr.length:this.list_0.numItems=0},t.prototype.itemlistrender=function(e,t){0==this.c_title.selectedIndex&&e<this.agencyskin.pifuArr.length&&t.showData(this.agencyskin.pifuArr[e])},t.prototype.updateroleHandler=function(){var e=this.agencyskin.RoleData;this.ClearCharacter();var t=[];t.push({url:l.AssetPath.get3DRoleModel(e.roleCfg.name)}),c.ResourceControl.Instance.loader3DArr(t,this,this.loadcomplete,null,!0,e.roleCfg.name)},t.prototype.loadcomplete=function(e){var t=this.agencyskin.RoleData;!this._isdestorys&&this._ui3DScene&&e==t.roleCfg.name&&(this._rolemo=p.CharacterPool.AddCharacter(e,d.Player,this._ui3DScene),this._rolemo.transform.position=new Laya.Vector3(0,2,0),Laya.Quaternion.createFromAxisAngle(new Laya.Vector3(0,1,0),-24300/Math.PI,this._out),this._rolemo.transform.rotation=this._out,this._rolemo.getComponent(d.Player).PlayAnimator(h.CharacterState.stand))},t.key="SkinPanel",t}(n.PanelBaseControl);a.SkinPanel=f},{"../Agency/AgencySkin":6,"../Config/AssetPath":15,"../Control/PanelBaseControl":23,"../Control/ResourceControl":25,"../Data/UserInfoEvent":33,"../Game/Player":37,"../PrefabControl/CharacterPool":42,"../PrefabControl/CharacterState":43,"../View/ViewManager":57,"../utils/GameState":71,"../utils/ViewAction":78}],56:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelBaseControl"),i=e("../WXSDK/pingtaiutils"),o=e("../utils/ViewAction"),r=e("../utils/GameUtils"),s=e("../Config/AssetPath"),c=e("../Agency/AgencyTrial"),l=e("../WXSDK/GuangGao"),h=function(e){function t(t){var a=e.call(this,"main","shiyongView",!1,o.ViewAction.ActionType_none,1)||this;return a.skinarr=t,a}return __extends(t,e),t.prototype.onInit=function(){e.prototype.onInit.call(this)},t.prototype.initView=function(){this.agencytrial=this.getProxy(c.AgencyTrial);var e=r.GameUtils.randRangeint(0,this.skinarr.length-1);this._selectvo=this.skinarr[e],this.load_icon.url=s.AssetPath.getroleicon(this._selectvo.roleCFG.icon),l.GuangGao.CheatBanner(this.btn_close)},t.prototype.initEvent=function(){this.AddEventByType(this.btn_close,Laya.Event.CLICK,this,this.onclosefun),this.AddEventByType(this.btn_video,Laya.Event.CLICK,this,this.videofun)},t.prototype.videofun=function(){i.pingtaiutils.Instance.playVideo("",this,this.videocallback)},t.prototype.videocallback=function(){this.agencytrial.ExitPanel(this._selectvo)},t.prototype.onclosefun=function(){this.agencytrial.ExitPanel(null)},t.prototype.destory=function(){l.GuangGao.Clear(),e.prototype.destory.call(this)},t.key="TrialPanel",t}(n.PanelBaseControl);a.TrialPanel=h},{"../Agency/AgencyTrial":7,"../Config/AssetPath":15,"../Control/PanelBaseControl":23,"../WXSDK/GuangGao":58,"../WXSDK/pingtaiutils":68,"../utils/GameUtils":72,"../utils/ViewAction":78}],57:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../utils/LayOUT"),i=e("../Control/LayoutControl"),o=function(e){function t(){var a=e.call(this)||this;return t.ins=a,a}return __extends(t,e),Object.defineProperty(t,"Instance",{get:function(){return null==t.ins?new t:t.ins},enumerable:!0,configurable:!0}),t.prototype.init=function(){this._views={},this.initEvent()},t.prototype.initEvent=function(){},t.prototype.add=function(e,t,a){if(void 0===t&&(t=null),void 0===a&&(a=n.LayOUT.UI),null==e.key)throw new Error("view have no key");var o=e.key;if(this._views[o]){var r=this._views[o];return r}var s;return s=null!=t?new e(t):new e,s.viewKey=e,s.gameLayer=a,i.LayoutControl.Instance.AddLayerByName(s,a),this._views[o]=s,s},t.prototype.close=function(e,t,a){void 0===t&&(t=!1),void 0===a&&(a=!0);var n=e.key,o=this._views[n];o&&(i.LayoutControl.Instance.ClearLayerByName(o.gameLayer),a?o.ExitView():o.destory(),delete this._views[n])},t.prototype.onresize=function(e,t){if(null!=this._views){var a;for(var n in this._views)a=this._views[n],a.setSize(e,t)}},t.prototype.getView=function(e){var t=e.key;return this._views[t]},t}(Laya.EventDispatcher);a.ViewManager=o},{"../Control/LayoutControl":21,"../utils/LayOUT":75}],58:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./Sdk"),i=e("./ShareUtil"),o=e("./PlayerAccount"),r=function(){function e(){this.appNameHidden=!1,this.color="C93B3BFF",this.size=100,this.borderWidth=50,this.borderColor="A1A0A0FF"}return e}();a.WxGameItem=r;var s=function(){function e(){}return Object.defineProperty(e,"hasbanner",{get:function(){return o.PlayerAccount.CurrentAccount.CurAccountData.banner?!0:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"hasvideo",{get:function(){if(Laya.Browser.onWeiXin&&o.PlayerAccount.CurrentAccount.CurAccountData.video){o.PlayerAccount.CurrentAccount.CurAccountData.GetGlobe;return!0}return!1},enumerable:!0,configurable:!0}),e.InitVideo=function(){var e=this;Laya.Browser.onWeiXin&&o.PlayerAccount.CurrentAccount.CurAccountData.video&&(console.log(this.bannerAdUnitId),this.fsaasfafssfa=Laya.Browser.window.wx.createRewardedVideoAd({adUnitId:this.videlAdUnitId}),this.fsaasfafssfa.onLoad(function(){console.log("激励视频 广告加载成功"),e.asfasfsaffsa=!0}),this.fsaasfafssfa.onError(function(t){console.log("激励视屏加载失败:"+t),e.asfasfsaffsa=!1}),this.afsfsaafsfsa=!0)},e.ShowVideo=function(e){var t=this;this.hasvideo?this.asfasfsaffsa?(console.log("showVideoAd:"+this.asfasfsaffsa),this.SetVideoCallBack(e),this.fsaasfafssfa.show()["catch"](function(a){t.fsaasfafssfa.load().then(function(){t.SetVideoCallBack(e),t.fsaasfafssfa.show()})})):i.ShareUtil.shareImage("视频没有分享",e,"1"):(e(!1),i.ShareUtil.shareImage("视频没有分享",e,"1"))},e.SetVideoCallBack=function(e){var t=this;this.fsaasfafssfa.offClose(),this.fsaasfafssfa.onClose(function(a){console.log("激励视频关闭:"+a.isEnded),a&&a.isEnded||void 0===a?e&&e(!0):e&&e(!1),t.fsaasfafssfa.offClose()})},e.OpenBanner=function(e,t,a){var n=this;if(void 0===e&&(e=0),void 0===t&&(t=null),void 0===a&&(a=!1),!Laya.Browser.onWeiXin)return void t(null);this.canshowbanner=!0;var i=this.bannerAdUnitId;console.log("adUnitId:"+i);var o=Laya.Browser.window.wx.createBannerAd({adUnitId:i,style:{left:0,top:0,width:460}});o.onError(function(e){console.log(e),t(null)}),o.onLoad(function(){n.curbanner&&n.curbanner.destroy(),n.curbanner=o;var i=n.GetRealHight(e);null!=t&&t(i),n.canshowbanner&&!a?n.curbanner.show():n.curbanner.hide()})},e.GetRealHight=function(e){if(this.curbanner){var t=Laya.Browser.window.wx.getSystemInfoSync();return this.curbanner.style.width=t.windowWidth,this.curbanner.style.top=t.windowHeight-this.curbanner.style.realHeight-e,Laya.stage.height/t.windowHeight*this.curbanner.style.realHeight}},e.Clear=function(){e.clearTween(),Laya.timer.clearAll(this),Laya.Tween.clearAll(this),this.canshowbanner=!1,this.curbanner&&this.curbanner.hide()},e.hidebanner=function(){Laya.Browser.onWeiXin&&this.curbanner&&this.curbanner.hide()},e.showbanner=function(){Laya.Browser.onWeiXin&&this.curbanner&&this.curbanner.show()},Object.defineProperty(e,"cancheat",{get:function(){if(!o.PlayerAccount.CurrentAccount.CurAccountData.cheat)return console.log("cheat:false-> CurAccountData.cheat != 1"),!1;var e=o.PlayerAccount.CurrentAccount.CurAccountData.checkscence;return 0==e?(console.log("cheat:true-> "+n.WxApi.sceneValue),!0):"1037"==n.WxApi.sceneValue||"1058"==n.WxApi.sceneValue||"1067"==n.WxApi.sceneValue||"1095"==n.WxApi.sceneValue?(console.log("cheat:true-> "+n.WxApi.sceneValue),!0):(console.log("cheat:false-> "+n.WxApi.sceneValue),!1)},enumerable:!0,configurable:!0}),e.SetPosBanner=function(t,a){var n=this;if(Laya.Browser.onPC)return void a(!1);var i=Laya.Browser.window.wx.getSystemInfoSync(),o=t.y*i.windowHeight/Laya.stage.height,r=this.bannerAdUnitId;console.log("adUnitId:"+r),this.curbanner&&this.curbanner.destroy();var s=Laya.Browser.window.wx.createBannerAd({adUnitId:r,style:{left:0,top:0,width:720}});s.onError(function(e){console.log(e),a(!1)}),s.onLoad(function(){n.curbanner=s,n.curbanner.style.top=o,n.curbanner&&(console.log("banner show"),n.curbanner.show(),Laya.timer.once(2300,n,function(){n.curbanner.style.top=i.windowHeight-e.bannerhigt,a(!0)}))}),s.onResize(function(t){e.bannerhigt=t.height,n.curbanner.style.width=i.windowWidth,n.curbanner.style.top=o})},e.CheatBanner=function(t,a,n){var i=this;void 0===a&&(a=null),void 0===n&&(n=0),e.cancheat?(t.y=Laya.stage.height-t.height-100,e.OpenBanner(n,function(n){if(null==n);else{console.log("cheatstart","bottom:100");var r=Laya.stage.height-n-t.height-20;console.log("y:"+r),Laya.timer.once(1e3*o.PlayerAccount.CurrentAccount.CurAccountData.cheattime,i,function(){i.showbanner(),e.clearTween(),e.tween=Laya.Tween.to(t,{y:r},500,null,Laya.Handler.create(i,function(){null!=a&&a()}))})}},!0)):(console.log("ignorecheat"),e.OpenBanner(0,function(e){}))},e.clearTween=function(){e.tween&&(e.tween.clear(),e.tween=null)},e.videlAdUnitId="adunit-8c15b05d8885d405",e.bannerAdUnitId="adunit-2c08fce5a3bbbb6f",e.afsfsaafsfsa=!1,e.asfasfsaffsa=!1,e.canshowbanner=!0,e.bannerhigt=0,e}();a.GuangGao=s},{"./PlayerAccount":61,"./Sdk":62,"./ShareUtil":64}],59:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=Laya.Event,i=Laya.HttpRequest,o=e("./PlayerAccount"),r=e("./ShareUtil"),s=e("./Sdk"),c=e("../Time/TimesTamper"),l=e("../Global"),h="https://parkourracefengyunapi.xwxgame.com/",u=function(){function e(){}return e.Login="user/login",e.game="game/start",e.end="game/play",e.Sign="sign/sign",e.Buy="theme/buy",e.Equip="theme/equip",e.share="fission/share",e.vd="fission/vd",e.revival="game/revival",e.fission="theme/fission",e.themefission="theme/fission",e.treasure="treasure/click",e.Config="config/table",e.Lottery="lottery/lottery",e.GetAchieve="achievement/getRewards",e.usersync="user/sync",e}();a.PROTOCOLS=u;var p=function(){function e(){e.instance=this}return Object.defineProperty(e,"Instance",{get:function(){return e.instance?e.instance:new e},enumerable:!0,configurable:!0}),e.prototype.login=function(e,t,a){var r=o.PlayerAccount.CurrentAccount,s=l.Global.gameVersion,c="code="+r.Code+"&nickname="+r.NickName+"&avatar="+r.Avatar+"&gender="+r.Gender+"&country="+r.Country+"&province="+r.Province+"&city="+r.City+"& device="+r.Device+"$&share_id="+r.ShareId+"&scene="+r.Scene+"&v="+s,p=new i;p.once(n.PROGRESS,this,this.onHttpRequestProgress,[e,p]),p.once(n.COMPLETE,this,this.onLoginRequestComplete,[t,p]),p.once(n.ERROR,this,this.onHttpRequestError,[a,p]),p.send(h+u.Login,c,"post","text")},e.prototype.onHttpRequestProgress=function(e,t){e&&(console.log("HttpRequestProgress:..."),e.run())},e.prototype.onLoginRequestComplete=function(e,t){var a=JSON.parse(t.data);return"0"!=a.code?(console.log("登录异常错误!错误信息:",t.data),void s.WxApi.recordAldEvent("登录异常错误!错误信息:= "+a.code,"httpRequest.dat")):(o.PlayerAccount.ServerTime=a.t,c.TimesTamper.Instance.updateServiceTime(Number(a.t)),s.WxApi.recordAldEvent("登录正式成功"),o.PlayerAccount.CurrentAccount.SetAccountData(a,e),void r.ShareUtil.ShareMessage())},e.prototype.onHttpRequestError=function(e,t){null!=e&&e.runWith(t),s.WxApi.recordAldEvent("Error! Http request error.. ","httpRequest.dat"),s.WxApi.ShowLoading("连接网络失败..."),Laya.timer.once(8e3,this,function(){s.WxApi.HideLoading()}),console.log("Error! Http request error..."+t.data)},e.prototype.HttpPostRequest=function(e,t,a,r,c){void 0===c&&(c=!0);var l="",p=h+e,d=o.PlayerAccount.CurrentAccount,f=d.CurAccountData;if(1==c&&(l="token="+f.m_token+"&"),s.WxApi.ShowLoading("连接网络中..."),e==u.game||e==u.end||e==u.fission||e==u.vd||e==u.themefission||e==u.Lottery||e==u.usersync){for(var m="abcdefghijkimnopqrstuvwxyz0123456789",g="{",y="",_=0;4>_;_++)y+=m[Math.floor(100*Math.random())%m.length];for(var _=0;_<t.length;_++){for(var v in t[_])g+='"'+v+'":"'+t[_][v]+'"';g+=_<t.length-1?",":"}"}l+="_r="+y+this.base64Encode(g)}else if(null!=t)for(var _=0;_<t.length;_++)for(var v in t[_]){var w=t[_][v];l+=v+"="+w,_<t.length-1&&(l+="&")}var C=new i;C.once(n.COMPLETE,this,this.onHttpRequestComplete,[a,r,C]),C.once(n.ERROR,this,this.onHttpRequestError,[r,C]),C.send(p,l,"post","text")},e.prototype.onHttpRequestComplete=function(e,t,a){s.WxApi.HideLoading();var n=JSON.parse(a.data);0==n.code?(o.PlayerAccount.CurrentAccount.SetAccountData(n,null),null!=e&&e.runWith(n)):(null!=t&&t.runWith(n),console.log("Error! Http request complete error, code: "+n.code+" message: "+n.message))},e.prototype.base64Encode=function(e){for(var t,a,n,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,r=e.length,s="";r>o;){if(t=255&e.charCodeAt(o++),o==r){s+=i.charAt(t>>2),s+=i.charAt((3&t)<<4),s+="==";break}if(a=e.charCodeAt(o++),o==r){s+=i.charAt(t>>2),s+=i.charAt((3&t)<<4|(240&a)>>4),s+=i.charAt((15&a)<<2),s+="=";break}n=e.charCodeAt(o++),s+=i.charAt(t>>2),s+=i.charAt((3&t)<<4|(240&a)>>4),s+=i.charAt((15&a)<<2|(192&n)>>6),s+=i.charAt(63&n)}return s},e}();a.NetworkManager=p},{"../Global":38,"../Time/TimesTamper":49,"./PlayerAccount":61,"./Sdk":62,"./ShareUtil":64}],60:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.pc="pc",e.wx="wx",e.qq="qq",e.tt="tt",e}();a.PlatfromType=n},{}],61:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n,i=e("../WXSDK/Sdk"),o=e("../utils/GameUtils"),r=e("./NetworkManager"),s=e("../utils/DispatcherManager"),c=e("../Data/UserInfoEvent");!function(e){e[e["系统赠送"]=1]="系统赠送",e[e["金币购买"]=2]="金币购买",e[e["观看视频"]=3]="观看视频",e[e["分享"]=4]="分享",e[e["签到"]=5]="签到",e[e["活动"]=6]="活动",e[e["通过关卡"]=7]="通过关卡",e[e["累计登陆"]=8]="累计登陆",e[e["邀请人数达到"]=9]="邀请人数达到",e[e["砖石购买"]=10]="砖石购买"}(n=a.requiretype||(a.requiretype={}));var l;!function(e){e[e.crop=0]="crop",e[e.things=1]="things",e[e.land=2]="land",e[e.global=3]="global",e[e.entity=4]="entity",e[e.sign=5]="sign",e[e.rewards=6]="rewards",e[e.achievement=7]="achievement",e[e.invite=8]="invite",e[e.mission=9]="mission",e[e.treasure_click=10]="treasure_click",e[e.theme=11]="theme",e[e.lottery=12]="lottery"}(l=a.AccountConfig||(a.AccountConfig={}));var h;!function(e){e[e.money=0]="money",e[e.diamond=1]="diamond",e[e.user_id=2]="user_id",e[e.game_times=3]="game_times",e[e.get_themes=4]="get_themes",e[e.video_times=5]="video_times",e[e.equip_themes=6]="equip_themes",e[e.last_action_time=7]="last_action_time",e[e.last_favorite_time=8]="last_favorite_time",e[e.progress_themes=9]="progress_themes",e[e.revival=10]="revival",e[e.stage=11]="stage",e[e.vmoney=12]="vmoney"}(h=a.AccountUser||(a.AccountUser={}));var u;!function(e){e[e.id=0]="id",e[e.name=1]="name",e[e.quality=2]="quality",e[e.icon=3]="icon",e[e.prefab=4]="prefab",e[e.require_num=5]="require_num",e[e.require_type=6]="require_type"}(u=a.heroAttr||(a.heroAttr={}));var p;!function(e){e[e.sign_days=0]="sign_days",e[e.sign_time=1]="sign_time"}(p=a.signdata||(a.signdata={}));var d;!function(e){e[e.id=0]="id",e[e.name=1]="name",e[e.entity_id=2]="entity_id",e[e.icon=3]="icon"}(d=a.entity||(a.entity={}));var f;!function(e){e[e.effectValue_1=0]="effectValue_1",e[e.effectValue_2=1]="effectValue_2",e[e.effectValue_3=2]="effectValue_3",e[e.effectValue_4=3]="effectValue_4"}(f=a.skinattr||(a.skinattr={}));var m=function(){function e(e,t,a,n,i,o,r,s,c,l,h,u){void 0===o&&(o=null),void 0===r&&(r=null),this.openid="",this.userId="",this.roadconfig={},this.m_RewardDic={},this.m_EntityDic={},this.m_AchievementDic={},this.m_token=e,this.m_app_setting=a,this.m_user=n,this.m_user_base=i,this.m_sign=s,this.m_task=c,this.lottery=l,this.m_use_land_task=h,this.m_user_video=u,this.userId=this.m_user.user_id,this.openid=this.m_user_base.openid,console.log("user_id:"+this.userId)}return Object.defineProperty(e.prototype,"lotterytime",{get:function(){return Number(this.lottery.day_video_times)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"share",{get:function(){return"1"==this.m_app_setting.share},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sharecontent",{get:function(){return this.m_app_setting.sharecontent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ShareImage",{get:function(){return this.m_app_setting.ShareImage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cheattime",{get:function(){return Number(this.m_app_setting.cheattime)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"banner",{get:function(){return"1"==this.m_app_setting.banner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"video",{get:function(){return"1"==this.m_app_setting.video},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"BtnCanMove",{get:function(){return"1"==this.m_app_setting.BtnCanMove},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checkscence",{get:function(){return"1"==this.m_app_setting.checkscence},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"banner_dis",{get:function(){return Number(this.m_app_setting.banner_dis)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bannerMoveTime",{get:function(){return Number(this.m_app_setting.bannerMoveTime)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"createBannerTimes",{get:function(){return Number(this.m_app_setting.createBannerTimes)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bannerMoveProp",{get:function(){return Number(this.m_app_setting.bannerMoveProp)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isShareThenVideo",{get:function(){return"1"==this.m_app_setting.isShareThenVideo},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isShowHuiTui",{get:function(){return"1"==this.m_app_setting.isShowHuiTui},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start_sprint",{get:function(){return Number(this.m_app_setting.start_sprint)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"IsVideoModel",{get:function(){return"1"==this.m_app_setting.IsVideoModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"videoModelNum",{get:function(){return Number(this.m_app_setting.videoModelNum)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"VideoModelTitle",{get:function(){return this.m_app_setting.VideoModelTitle},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"failcount",{get:function(){return Number(this.m_app_setting.failcount)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spminspeed",{get:function(){return Number(this.m_app_setting.spminspeed)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bgm",{get:function(){return"1"==this.m_app_setting.bgm},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"camerahight",{get:function(){return Number(this.m_app_setting.camerahight)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctnfilename",{get:function(){return this.m_app_setting.ctnfilename},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cheat",{get:function(){return"1"==this.m_app_setting.cheat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shakestage",{get:function(){return this.m_app_setting.shakestage&&"1"==this.m_app_setting.shakestage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stageconfigcdn",{get:function(){return"1"==this.m_app_setting.stageconfigcdn},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"playerspeed",{get:function(){return Number(this.m_app_setting.playerspeed)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"videlAdUnitId",{get:function(){return this.m_app_setting.videlAdUnitId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bannerAdUnitId",{get:function(){return this.m_app_setting.bannerAdUnitId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tri",{get:function(){return"1"==this.m_app_setting.tri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"recommend",{get:function(){return"1"==this.m_app_setting.recommend},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"recommendflg",{get:function(){return this.m_app_setting.recommendflg},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"egg",{get:function(){return"1"==this.m_app_setting.egg},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"eggrate",{get:function(){return Number(this.m_app_setting.eggrate)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"UseId",{get:function(){return this.userId},enumerable:!0,configurable:!0}),e.prototype.GetConfig=function(e){var t=l[e];return this.m_configs[t]},e.prototype.GetUser=function(e){var t=h[e];return this.m_user[t]},Object.defineProperty(e.prototype,"GetVideoTotal",{get:function(){return Number(this.m_user_video.total)},enumerable:!0,configurable:!0}),e.prototype.GetSign=function(e){var t=p[e];return this.m_sign[t]},e.prototype.GetRewardConfig=function(e){var t=this.m_RewardDic[e];return t},e.prototype.GetEntity=function(e,t){return this.m_EntityDic[e]?this.m_EntityDic[e][d[t]]:null},e.prototype.GetRewardDic=function(){var e=this.GetConfig(l.rewards);for(var t in e)this.m_RewardDic[e[t].id]=e[t]},e.prototype.GetEntityDic=function(){var e=this.GetConfig(l.entity);for(var t in e)this.m_EntityDic[e[t].entity_id]=e[t]},e.prototype.GetThemeById=function(e){var t=this.GetConfig(l.theme);if(t)for(var a=0;a<t.length;a++){var n=t[a];if(n.id==e)return n}},e.prototype.GetSkinAttr=function(e){for(var t=this.GetConfig(l.theme),a=0;a<t.length;a++)if(t[a].id==e)return t[a]},e.prototype.GetAchievementData=function(){var e=this.GetConfig(l.achievement),t={};for(var a in e){var n=e[a].type;if(!t[n]){var i=[];for(var o in e){var r=e[o].type;n==r&&i.push(e[o])}t[n]=i}}this.m_AchievementDic=t},e.prototype.HasTheme=function(e){for(var t=!1,a=this.GetUser(h.get_themes),n=0;n<a.length;n++)a[n]==e&&(t=!0);return t},e.prototype.GetSkinDic=function(e){},e.prototype.GetHeroProgress=function(e){var t=this.m_user.progress_heroes,a=t[e]?t[e]:0;return a},e.prototype.GetHatProgress=function(e){var t=this.m_user.progress_hats,a=t[e]?t[e]:0;return a},e.prototype.GetCbProgress=function(e){var t=this.m_user.progress_dances,a=t[e]?t[e]:0;return a},e.prototype.HasMotor=function(e){for(var t=this.GetUser(h.get_themes),a=0;a<t.length;a++){var n=t[a];if(e==n)return!0}return!1},e.prototype.GetMotorProgress=function(e){var t=this.m_user.progress_themes,a=t[e]?t[e]:0;return a},e.prototype.GetSeverConfig=function(e){this.m_configs=e,this.GetSkinDic(this.m_configs),this.GetRewardDic(),this.GetEntityDic();for(var t=e.global,a=0;a<t.length;a++){var n=t[a];if("tilirec"==n.key)return void(g.CurrentAccount.tilirec=Number(n.value))}},e.prototype.UpdateSkinDic=function(){this.GetSkinDic(this.m_configs)},e.prototype.GetGlobe=function(e){var t=this.GetConfig(l.global);for(var a in t){var n=t[a],i=n.key;if(i==e){var o=n.value;return o}}return null},e}();a.AccountData=m;var g=function(){function e(t,a,n,i,o,r,s,c,l,h,u){this.IsTest=!1,this.localTime=Laya.timer.currTimer,this.Code=t,this.NickName=a,this.Avatar=n,this.Gender=i,this.Country=o,this.Province=r,this.City=s,this.Device=c,this.ShareId=l,this.Scene=h,this.ver=u,this.IsTest=!1,e.instance=this}return Object.defineProperty(e,"CurrentAccount",{get:function(){return null==e.instance?(console.log("生成本地测试账号..."),e.TestAccount):e.instance},enumerable:!0,configurable:!0}),Object.defineProperty(e,"TestAccount",{get:function(){var t=Laya.LocalStorage.getItem("localcode");if(t)console.log("老用户",t);else{var a=(new Date).getTime().toString(),n=o.GameUtils.randRangeint(1e4,99999).toString();t="xj_"+a+n,Laya.LocalStorage.setItem("localcode",t),console.log(a,n),console.log("新用户",t)}var i=new e(t,null,null,null,null,null,null,null,null,null,null);return i.IsTest=!0,i},enumerable:!0,configurable:!0}),e.prototype.SetAccountData=function(e,t){var a=this,n=e.token,o=e.configs,r=e.app_setting,l=e.user,h=e.user_base,u=e.user_sign,p=e.user_achievement,d=e.user_lottery,f=e.user_land_task,g=e.user_video;null==this.CurAccountData?(i.WxApi.recordAldEvent("开始获取config数据"),this.CurAccountData=new m(n,o,r,l,h,null,null,u,p,d,f,g),this.CheckLocalConfig(e.table_version,function(n){a.CurAccountData.GetSeverConfig(n),a.nowConfig=n,null!=t&&t.runWith(e)})):(o&&(this.CurAccountData.m_configs=o),r&&(this.CurAccountData.m_app_setting=r),l&&(this.CurAccountData.m_user=l),h&&(this.CurAccountData.m_user_base=h),u&&(this.CurAccountData.m_sign=u),p&&(this.CurAccountData.m_task=p),d&&(this.CurAccountData.lottery=d),f&&(this.CurAccountData.m_use_land_task=f),g&&(this.CurAccountData.m_user_video=g)),s.DispatcherManager.dispatchEvent(c.UserInfoEvent.updatePlayerInfo)},e.prototype.CheckLocalConfig=function(t,a){var n=Laya.LocalStorage.getJSON(e.localcofigkey);n?n.ver==t?(console.log("sever配置是最新的...",t),i.WxApi.recordAldEvent("config接口获取成功"),a(n)):r.NetworkManager.Instance.HttpPostRequest(r.PROTOCOLS.Config,null,Laya.Handler.create(this,function(n){n.configs.ver=t,Laya.LocalStorage.setJSON(e.localcofigkey,n.configs),console.log("sever配置更新完成...",t),i.WxApi.recordAldEvent("config接口获取成功"),a(n.configs)}),Laya.Handler.create(this,function(e){console.log("配置获取失败"+e),i.WxApi.recordAldEvent("config接口获取失败")})):r.NetworkManager.Instance.HttpPostRequest(r.PROTOCOLS.Config,null,Laya.Handler.create(this,function(n){n.configs.ver=t,Laya.LocalStorage.setJSON(e.localcofigkey,n.configs),console.log("sever保存配置完成...",t),i.WxApi.recordAldEvent("config接口获取成功"),a(n.configs)}),Laya.Handler.create(this,function(e){console.log("配置获取失败"+e),i.WxApi.recordAldEvent("config接口获取失败")}))},Object.defineProperty(e.prototype,"ServerTime",{get:function(){var t=Laya.timer.currTimer,a=e.ServerTime+Math.ceil((t-this.localTime)/1e3);return a},enumerable:!0,configurable:!0}),e.localcofigkey="mconfig",e}();a.PlayerAccount=g},{"../Data/UserInfoEvent":33,"../WXSDK/Sdk":62,"../utils/DispatcherManager":70,"../utils/GameUtils":72,"./NetworkManager":59}],62:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n;!function(e){e[e.ios=0]="ios",e[e.android=1]="android",e[e.other=2]="other"}(n=a.systemtype||(a.systemtype={}));var i=function(){function e(){}return e.recordAldEvent=function(e,t){void 0===t&&(t=""),Laya.Browser.window&&Laya.Browser.window.wx&&Laya.Browser.window.wx.aldSendEvent(e,{key:t}),console.log("事件: ",e)},e.WXLogin=function(e){Laya.Browser.window.wx.login({success:function(t){t.code?(console.log("code:",t.code),e(t)):console.log("获取用户登录态失败!"+t.errMsg)},fail:function(e){console.log("wx.login: failed, res="+e)}})},e.WxInit=function(){var e=this;Laya.Browser.onWeiXin&&(Laya.Browser.window.wx.showShareMenu({withShareTicket:!0}),Laya.Browser.window.wx.onShow(function(t){console.log(t),e.shareOpenId=t.query.userId,e.querychannel=t.query.channel,t.referrerInfo&&(e.referrerInfoappId=t.referrerInfo.appId,console.log("onShow appId is:",t.referrerInfo.appId)),e.sceneValue=t.scene;var a=Laya.LocalStorage.getItem("scene");a?(e.sceneValue=a,console.log("读取配置场景值:"+a)):(console.log("第一次拉取场景值:"+e.sceneValue),Laya.LocalStorage.setItem("scene",e.sceneValue))}))},e.ShowLoading=function(e){void 0===e&&(e="加载中..."),this.isShowing||(this.isShowing=!0,Laya.Browser.onMiniGame&&Laya.Browser.window.wx.showLoading({title:e,mask:!0}))},e.HideLoading=function(){this.isShowing=!1,Laya.Browser.onMiniGame&&Laya.Browser.window.wx.hideLoading()},e.aldSendOpenid=function(e){Laya.Browser.onMiniGame&&(console.log("aldSendOpenid",e),Laya.Browser.window.wx.aldSendOpenid(e))},e.CheckWXUpdate=function(){var e=Laya.Browser.window.wx.getUpdateManager();e.onCheckForUpdate(function(e){console.log("最新版本:"+e.hasUpdate)}),e.onUpdateReady(function(){Laya.Browser.window.wx.showModal({showCancel:!1,title:"更新提示",content:"新版本已经准备好,是否重启应用?",success:function(t){e.applyUpdate()},fail:function(t){e.applyUpdate();
  7. }})})},e.levelStart=function(t,a,n){console.log("开始记录关卡:"+t),Laya.Browser.window&&Laya.Browser.window.wx&&(Laya.Browser.window.wx.aldStage.onStart({stageId:t,stageName:a,userId:n}),e.newaccount&&Laya.Browser.window.wx.aldStage.onStart({stageId:"新用户:"+t,stageName:a,userId:n}))},e.levelRunning=function(t,a,n,i){console.log("记录关卡中:"+t),Laya.Browser.window&&Laya.Browser.window.wx&&(Laya.Browser.window.wx.aldStage.onRunning({stageId:t,stageName:a,userId:n,event:"revive",params:{itemName:"使用复活",itemCount:1,desc:i}}),e.newaccount&&Laya.Browser.window.wx.aldStage.onRunning({stageId:"新用户:"+t,stageName:a,userId:n,event:"revive",params:{itemName:"使用复活",itemCount:1,desc:i}}))},e.levelSuccess=function(t,a,n){console.log("记录关卡:完成"+t),Laya.Browser.window&&Laya.Browser.window.wx&&(Laya.Browser.window.wx.aldStage.onEnd({stageId:t,stageName:a,userId:n,event:"complete",params:{desc:"关卡完成"}}),e.newaccount&&Laya.Browser.window.wx.aldStage.onEnd({stageId:"新用户:"+t,stageName:a,userId:n,event:"complete",params:{desc:"关卡完成"}}))},e.levelFail=function(t,a,n,i,o){console.log("记录关卡:失败"+t),Laya.Browser.window&&Laya.Browser.window.wx&&(Laya.Browser.window.wx.aldStage.onEnd({stageId:t,stageName:a,userId:n,event:"fail",params:{desc:"失败",score:i,car:o}}),e.newaccount&&Laya.Browser.window.wx.aldStage.onEnd({stageId:"新用户:"+t,stageName:a,userId:n,event:"fail",params:{desc:"失败",score:i,car:o}}))},e.shake=function(){Laya.Browser.window.wx.vibrateShort({})},e.shakeLong=function(){Laya.Browser.window.wx.vibrateLong({})},e.Shake=function(t){void 0===t&&(t=!0),Laya.Browser.onWeiXin&&e.CanShake&&(t?this.shake():this.shakeLong()),t||this.stageShake()},e.stageShake=function(e,t){if(void 0===e&&(e=null),void 0===t&&(t=32),!this.isShake&&this.canshakestage){this.isShake=!0;var a=new Laya.Vector2(Laya.stage.x,Laya.stage.y);Laya.stage.timerLoop(t,this,this.shakeObject,[a,e])}},e.shakeObject=function(e,t){var a=this.num++%4;this.offsetArr[this.num%2]=2>a?0:this.offset,Laya.stage.x=this.offsetArr[0]+e.x,Laya.stage.y=this.offsetArr[1]+e.y,this.num>4*this.times+1&&(Laya.stage.clearTimer(this,this.shakeObject),Laya.stage.pos(0,0),this.num=0,this.isShake=!1,null!=t&&t())},e.ShowTxt=function(e){Laya.Browser.onWeiXin?Laya.Browser.window.wx.showToast({title:e}):console.log(e)},Object.defineProperty(e,"SystemFrom",{get:function(){if(!Laya.Browser.onWeiXin)return n.other;var e=Laya.Browser.window.wx.getSystemInfoSync(),t=e.system,a=-1!=t.indexOf("iOS"),i=-1!=t.indexOf("Android");return a?n.ios:i?n.android:n.other},enumerable:!0,configurable:!0}),Object.defineProperty(e,"IsLongScreenSystem",{get:function(){if(!Laya.Browser.onWeiXin)return!1;var e=Laya.Browser.window.wx.getSystemInfoSync(),t="ipx";if(null!=e){var a=e.model;return t=e.brand+"_"+a+"_"+e.system+"_wx"+e.version+"_SDKVer"+e.SDKVersion,console.log("platformModel:"+t),!(a.indexOf("X")<0)||(a.indexOf("oppo")>=0||a.indexOf("OPPO")>=0)&&(a.indexOf("R15")>=0||a.indexOf("r15")>=0)||e.statusBarHeight>20||a.indexOf("Note")>=0&&(a.indexOf("7")>=0||a.indexOf("8")>=0)||a.indexOf("iPhone")>=0&&a.indexOf("11")>=0}},enumerable:!0,configurable:!0}),e.writeStage=function(e){var t=new Array,a=(new Date).getTime(),n=JSON.stringify({wxgame:{stage:e,update_time:a.toString()}});t.push({key:"stage",value:n}),Laya.Browser.window.wx&&Laya.Browser.window.wx.setUserCloudStorage({KVDataList:t,success:function(e){console.log("上传分数成功")}})},e.cpVersionGreaterOrEqual=function(e,t){console.log("[LOG]基础库版本号 curVer:"+e+" targVer:"+t);var a=e.split("."),n=t.split("."),i=a.length;n.length<i&&(i=n.length);for(var o=0;i>o;o++){var r=Number(a[o]),s=Number(n[o]);if(r>s)return!0;if(s>r)return!1}return a.length>=n.length},e.newaccount=!1,e.sceneValue="",e.shareOpenId="",e.querychannel="",e.referrerInfoappId="",e.isShowing=!1,e.CanShake=!0,e.times=1.3,e.num=0,e.offsetArr=[0,0],e.offset=14,e.canshakestage=!1,e}();a.WxApi=i},{}],63:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../utils/DispatcherManager"),i=e("../WXSDK/SocketNofify"),o=function(){function e(){this._offlinestate=0,this._connetNums=0,this._socketconneting=!1,e.ins=this}return Object.defineProperty(e,"Instance",{get:function(){return null==e.ins?new e:e.ins},enumerable:!0,configurable:!0}),e.prototype.connectServer=function(e){this._socketconneting=!0,this.removeSocket(),this.sock&&this.sock.connected||(this.openwaitpanel(),this.sock||(this.sock=new Laya.Socket,this.sock.on(Laya.Event.OPEN,this,this.onSocketOpen),this.sock.on(Laya.Event.MESSAGE,this,this.onReceiveMessage),this.sock.on(Laya.Event.CLOSE,this,this.onSocketClose),this.sock.on(Laya.Event.ERROR,this,this.ioErro)),this.sock.connectByUrl(e))},e.prototype.isConnect=function(){return this.sock&&this.sock.connected?!0:!1},e.prototype.ioErro=function(e){void 0===e&&(e=null),this._socketconneting=!1,this._connetNums++,this.closewaitpanel(),this.removeSocket(),this._offlinestate=1},e.prototype.removeSocket=function(){this._socketconneting=!1,this.sock&&(this.sock.off(Laya.Event.OPEN,this,this.onSocketOpen),this.sock.off(Laya.Event.MESSAGE,this,this.onReceiveMessage),this.sock.off(Laya.Event.CLOSE,this,this.onSocketClose),this.sock.off(Laya.Event.ERROR,this,this.ioErro),this.sock.cleanSocket(),this.sock.close(),this.sock=null)},e.prototype.colseSocket=function(e){void 0===e&&(e=1),this.isConnect()&&(this.closewaitpanel(),this.removeSocket(),-1!=e&&(this._offlinestate=e),n.DispatcherManager.dispatchEvent(i.SocketNofify.SOCKET_CLOSE))},e.prototype.onSocketClose=function(e){void 0===e&&(e=null),this._socketconneting=!1,this.closewaitpanel(),this._offlinestate=1,n.DispatcherManager.dispatchEvent(i.SocketNofify.SOCKET_CLOSE)},e.prototype.closewaitpanel=function(){fairygui.GRoot.inst.closeModalWait()},e.prototype.openwaitpanel=function(){fairygui.GRoot.inst.showModalWait()},e.prototype.onSocketOpen=function(e){void 0===e&&(e=null),this._connetNums=0,this.closewaitpanel(),this._offlinestate=0,n.DispatcherManager.dispatchEvent(i.SocketNofify.SOCKET_CONNECT_SUCCEED,null,!1)},e.prototype.sendMessage=function(e,t,a){void 0===a&&(a=!0),this.sock&&this.sock.connected&&(a&&this.openwaitpanel(),t||(t={}),t.ACTION=e,this.sock.send(JSON.stringify(t)))},e.prototype.onReceiveMessage=function(e){void 0===e&&(e=null);JSON.parse(e)},e}();a.ServerSocket=o},{"../WXSDK/SocketNofify":65,"../utils/DispatcherManager":70}],64:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./Sdk"),i=e("../utils/GameUtils"),o=e("./PlayerAccount"),r=function(){function e(){}return e.prototype.beginShare=function(t){e.beginShareTime=(new Date).getTime(),console.log("分享点击时间="+e.beginShareTime),e.isSharing=!0,e.callback=t},e.prototype.onRegister=function(){null!=Laya.Browser.window.wx&&Laya.Browser.window.wx.onShow(function(t){if(console.log("onshow share start"),e.isSharing){e.isSharing=!1;var a=(new Date).getTime();console.log("分享回到游戏时间"+a);var n=(a-e.beginShareTime)/1e3;console.log("分享停留时间为:"+n);if(3>n)Laya.Browser.window.wx.showToast({title:"请重试一次"}),e.callback(!1);else{var o=Math.random();if(.3>=o){var r=["你已分享过该群","请重新换个群分享!","请分享到30人大群中!"],s=r[i.GameUtils.randRangeint(0,2)];Laya.Browser.window.wx.showToast({title:s}),e.callback(!1)}else Laya.Browser.window.wx.showToast({title:"分享成功!"}),e.callback(!0)}}})},e.ShareMessage=function(){if(Laya.Browser.onWeiXin){var e=o.PlayerAccount.CurrentAccount.ServerTime,t=o.PlayerAccount.CurrentAccount.CurAccountData.sharecontent;t=""!=t&&t?t:"你能跟得上我的速度吗!?";var a=o.PlayerAccount.CurrentAccount.CurAccountData.ShareImage;a=""!=a&&a?a:"texture/share.png",console.log("ShareMessage"),Laya.Browser.window.wx.onShareAppMessage(function(){return{title:t,imageUrl:a,query:"shareid="+o.PlayerAccount.CurrentAccount.CurAccountData.UseId+"_"+e+"_"+Math.floor(9999*Math.random()).toString()}})}},e.shareImage=function(t,a,i){if(void 0===a&&(a=null),null!=Laya.Browser.window.wx){if(!o.PlayerAccount.CurrentAccount.CurAccountData.share)return void n.WxApi.ShowTxt("暂未开放");var r=o.PlayerAccount.CurrentAccount.ServerTime,s=o.PlayerAccount.CurrentAccount.CurAccountData.sharecontent;s=""!=s&&s?s:"你能跟得上我的速度吗!?";var c=o.PlayerAccount.CurrentAccount.CurAccountData.ShareImage;c=""!=c&&c?c:"texture/share.png",("1037"==n.WxApi.sceneValue||"1058"==n.WxApi.sceneValue||"1067"==n.WxApi.sceneValue||"1095"==n.WxApi.sceneValue)&&(s="2020全新工资走势,你跟上节奏了吗?",c="texture/share.png.png"),Laya.Browser.window.wx.aldShareAppMessage({title:s,imageUrl:c,query:"userId="+o.PlayerAccount.CurrentAccount.CurAccountData.UseId+"_"+i+"_"+r+"_"+Math.floor(9999*Math.random()).toString()}),a&&e.Instance.beginShare(a)}},e.Instance=new e,e.shareSuccessTime=0,e.isSharing=!1,e}();a.ShareUtil=r},{"../utils/GameUtils":72,"./PlayerAccount":61,"./Sdk":62}],65:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.SOCKET_CONNECT_SUCCEED="SOCKET_CONNECT_SUCCEED",e.SOCKET_CLOSE="SOCKET_CLOSE",e.Game_againConnetSocket="Game_againConnetSocket",e}();a.SocketNofify=n},{}],66:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.WECHATEVENT_onhide="WECHATEVENT_onhide",e.WECHATEVENT_onAudioInterruptionEnd="WECHATEVENT_onAudioInterruptionEnd",e.WECHATEVENT_losefocus="WECHATEVENT_losefocus",e.WECHATEVENT_getfocus="WECHATEVENT_getfocus",e.WECHATEVENT_updateVideoNums="WECHATEVENT_updateVideoNums",e.message_9891002="9891002",e.message_9891101="9891101",e.WECHATEVENT_loginSucceed="WECHATEVENT_loginSucceed",e.WECHATEVENT_onshow="WECHATEVENT_onshow",e.WECHATEVENT_fromscorfk="WECHATEVENT_fromscorfk",e.message_9891001="9891001",e.message_9891102="9891102",e.message_9891103="9891103",e}();a.WECHATEVENT=n},{}],67:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../utils/GameUtils"),i=e("../WXSDK/WECHATEVENT"),o=e("../Global"),r=e("../Control/DateControl"),s=e("../Control/LocalDataControl"),c=e("../Data/UserDataInfo"),l=e("../utils/GlobalTip"),h=e("../utils/DispatcherManager"),u=e("../Control/AudioControl"),p=function(){function e(){this.isShareing=!1,this.bannerRunTime=0,this._bannerTypeList=[],this._screenwidth=0,this.bannerheight=0,this.bannerwidth=0,this.isonResize=!1,this._openrankDict={},e.ins=this}return Object.defineProperty(e,"Instance",{get:function(){return null==e.ins?new e:e.ins},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.showShareMenu({withShareTicket:!0}),this.onAudioInterruptionBegin(),this.onAudioInterruptionEnd()},e.prototype.initShareDian=function(t){if(t&&t.length>0){var a;for(var n in t)a=t[n],e.ShareDict[a.key]=a;var i=t[0];this.onShareAppMessage(i.tile,o.Global.cdnurl+i.img)}},e.prototype.initData=function(){r.DateControl.Fresh?(e.dayShareNum=0,e.dayVideoNum=0,this.updateDayShareInfo(),this.updateDayVideoInfo()):(e.dayShareNum=s.LocalDataControl.Instance.getnum(c.UserDataInfo.nowdayShare),e.dayVideoNum=s.LocalDataControl.Instance.getnum(c.UserDataInfo.nowdayVideo))},e.prototype.updateDayShareInfo=function(){s.LocalDataControl.Instance.addstr(c.UserDataInfo.nowdayShare,e.dayShareNum.toString())},e.prototype.updateDayVideoInfo=function(){s.LocalDataControl.Instance.addstr(c.UserDataInfo.nowdayVideo,e.dayVideoNum.toString())},e.prototype.createUserAndLogin=function(t,a,n,i){void 0===n&&(n=null),void 0===i&&(i=null),e.loginCallobj=t,e.loginsucceedcallback=a,e.loginprogressCallback=n;var o=Laya.Browser.window.wx;if(o){var r=e.Instance.getLaunchOptionsSync();if(r){var s=r.query;s&&s.ChanID&&(e.QuDaoID=s.ChanID);var c=r.referrerInfo;""==e.QuDaoID&&c&&c.appId&&(e.QuDaoID=c.appId),r.scene&&(e.fromscene=Number(r.scene))}var l=o.getSystemInfoSync();l.SDKVersion;if(o.getUpdateManager){var h=o.getUpdateManager();h.onCheckForUpdate(function(n){if(1==n.hasUpdate)h.onUpdateReady(function(){Laya.Browser.window.wx.showModal({title:"更新提示",content:"新版本已经准备好,是否重启应用?",success:function(t){t.confirm?h.applyUpdate():e.Instance.exitGame()}})}),h.onUpdateFailed(function(){e.Instance.exitGame()});else{var o=e.Instance;o.login(t,a,i)}})}else{var u=e.Instance;u.login(t,a,i)}}},e.prototype.createUserInfoButton=function(t,a,n){this.userinfocallobj=t,this.userinfosuccallback=a,this.userinfofailcallback=n;var i=Laya.Browser.window.wx,o=i.getSystemInfoSync();if(o){var r=(o.windowWidth-151)/2,s=o.windowHeight-172-40;e.Instance.userinfobutton=i.createUserInfoButton({type:"image",image:"wxlocal/login.png",style:{left:r,top:s,width:151,height:72}}),e.Instance.userinfobutton.onTap(e.Instance.userinfoButtonClick)}},e.prototype.getaccredit=function(t,a){if(0==e.accreditstate){var n=Laya.Browser.window.wx;n?n.getSetting({success:function(e){var n=e.authSetting;n.hasOwnProperty("scope.userInfo")&&1==n["scope.userInfo"]?a&&t&&a.call(t,!0):a&&t&&a.call(t,!1)}}):a&&t&&a.call(t,!0)}else a&&t&&a.call(t,!0)},e.prototype.userinfoButtonClick=function(t){var a=e.Instance;if(t){var n=t.errMsg;"getUserInfo:ok"==n?(e.accreditstate=1,a.closeuserinfobUtton(),a.getUserInfo(!1,a.userinfocallobj,a.userinfosuccallback,a.userinfofailcallback)):a.userinfocallobj&&a.userinfofailcallback&&a.userinfofailcallback.call(a.userinfocallobj)}},e.prototype.closeuserinfobUtton=function(){var t=e.Instance;t.userinfobutton&&(t.userinfobutton.offTap(t.userinfoButtonClick),t.userinfobutton.destroy(),t.userinfobutton=null)},e.prototype.getUserInfo=function(t,a,n,i){fairygui.GRoot.inst.showModalWait();var o=e.Instance,r=Laya.Browser.window.wx;r&&r.getUserInfo({success:function(r){var s=r.userInfo;e.nickName=s.nickName,t?o.login(a,n,i):a&&n&&n.call(a,e.nickName)}})},e.prototype.login=function(t,a,n){var i=e.Instance;Laya.Browser.window.wx&&Laya.Browser.window.wx.login({success:function(t){e.code=t.code;var a={};""!=e.QuDaoID&&(a.ChanID=e.QuDaoID),a.Code=e.code,a.AppID=o.Global.appid,a.Version=o.Global.gameVersion},fail:function(e){i.login(t,a,n)}})},e.prototype.loginSucceedCallback=function(t){e.loginCallobj&&e.loginsucceedcallback&&e.loginsucceedcallback.call(e.loginCallobj,t)},e.prototype.loadSubpackage=function(t,a,n,i,o){if(Laya.Browser.window.wx){this._subcallobj=a,this._subcallback=n,this._updatecallback=i,this._subfailcallback=o;var r=Laya.Browser.window.wx;if(r.loadSubpackage){var s=r.loadSubpackage({name:t,success:function(t){var a=e.Instance;a._subcallback&&a._subcallobj&&a._subcallback.call(a._subcallobj)},fail:function(t){var a=e.Instance;a._subfailcallback&&a._subcallobj&&a._subfailcallback.call(a._subcallobj)}});s.onProgressUpdate&&s.onProgressUpdate(function(t){var a=e.Instance;a._updatecallback&&a._subcallobj&&a._updatecallback.call(a._subcallobj,t.progress)})}else a&&n&&n.call(a)}else a&&n&&n.call(a)},e.prototype.getShareInfo=function(e,t,a,n){void 0===n&&(n=null),Laya.Browser.window.wx&&Laya.Browser.window.wx.getShareInfo({shareTicket:e.shareTicket,success:function(e){a.call(t,e)}})},e.prototype.onShareAppMessage=function(e,t){Laya.Browser.window.wx&&Laya.Browser.window.wx.onShareAppMessage(function(){return{title:e,imageUrl:t}})},e.prototype.shareAppMessage=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.shareAppMessage(e)},e.prototype.showShareMenu=function(e){void 0===e&&(e=null),Laya.Browser.window.wx&&Laya.Browser.window.wx.showShareMenu(e)},e.prototype.updateShareMenu=function(e){void 0===e&&(e=null),Laya.Browser.window.wx&&Laya.Browser.window.wx.updateShareMenu(e)},e.prototype.showMenu=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.showShareMenu()},e.prototype.setStorageSync=function(e,t){var a=Laya.Browser.window.wx;a&&a.setStorageSync(e,t)},e.prototype.getStorageSync=function(e){var t=Laya.Browser.window.wx;return t?t.getStorageSync(e):null},e.prototype.setUserCloudStorage=function(e,t,a,n){void 0===t&&(t=null),void 0===a&&(a=null),void 0===n&&(n=null);var i=Laya.Browser.window.wx;i&&i.setUserCloudStorage&&i.setUserCloudStorage({KVDataList:e,success:function(e){a&&a.call(t,e)},fail:function(e){n&&n.call(t)}})},e.prototype.toast=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.showToast({title:e})},e.prototype.postMessage=function(e,t){void 0===t&&(t=null);var a=Laya.Browser.window.wx;if(a){var n=a.getOpenDataContext();n.postMessage({action:e,data:t})}},e.prototype.createInnerAudioContext=function(){return Laya.Browser.window.wx?Laya.Browser.window.wx.createInnerAudioContext():null},e.prototype.getSystemInfoSync=function(){return Laya.Browser.window.wx?Laya.Browser.window.wx.getSystemInfoSync():null},e.prototype.previewImage=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.previewImage(e)},e.prototype.onHide=function(t,a){Laya.Browser.window.wx&&Laya.Browser.window.wx.onHide(function(n){e.isShowing=!1,a&&t&&a.call(t,n)})},e.prototype.getLaunchOptionsSync=function(){return Laya.Browser.window.wx?Laya.Browser.window.wx.getLaunchOptionsSync():null},e.prototype.hideToast=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.hideToast(e)},e.prototype.showModal=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.showModal(e)},e.prototype.clearStorage=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.clearStorageSync()},e.prototype.vibrateShort=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.vibrateShort()},e.prototype.removeStorage=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.removeStorage(e)},e.prototype.onAudioInterruptionBegin=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.onAudioInterruptionBegin(function(){u.AudioControl.Instance.ClearAllSOUND()})},e.prototype.onAudioInterruptionEnd=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.onAudioInterruptionEnd(function(){var t=e.Instance;Laya.timer.clear(t,t.onAudioEndCallback),Laya.timer.once(500,t,t.onAudioEndCallback)})},e.prototype.onAudioEndCallback=function(){h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_onAudioInterruptionEnd)},e.prototype.exitGame=function(){var e=Laya.Browser.window.wx;e&&e.exitMiniProgram()},e.prototype.openCustomerService=function(){var e=Laya.Browser.window.wx;if(e){var t=e.getSystemInfoSync().SDKVersion;n.GameUtils.compareVersion(t,"2.0.3")>=0&&e.openCustomerServiceConversation&&e.openCustomerServiceConversation({showMessageCard:!0,sendMessageImg:"https://resource.51yoyoyo.com/res/wxsendmessageimg/smi.jpg"})}},e.prototype.onMemoryWarning=function(){var e=Laya.Browser.window.wx;e&&e.onMemoryWarning&&e.onMemoryWarning(function(){})},e.prototype.onError=function(){var e=Laya.Browser.window.wx;e&&e.onError&&e.onError(function(e){console.log("*****onError",e)})},e.prototype.startShareApp=function(t,a,n,i){void 0===a&&(a=null),void 0===n&&(n=null),void 0===i&&(i=null),e.nowShareindex=0,e.ShareDict[t]&&this.shareApp(e.ShareDict[t],a,n,i)},e.prototype.shareApp=function(t,a,n,i){this.nowshareObj=a,this.nowshareinfo=t,this.nowsharesucceedfun=n,this.nowsharefailfun=i,this.startShareTime=Laya.Browser.now(),this.isShareing=!0,e.callbackfailstate=0,this.shareAppMessage({title:t.tile,imageUrl:o.Global.cdnurl+t.img,query:"",success:function(e){},fail:function(e){l.GlobalTip.Instance.showWordTips("您取消了分享"),i&&a&&i.call(a)},cancel:function(t){e.callbackfailstate=1}})},e.prototype.onShow=function(t,a,n){void 0===t&&(t=null),void 0===a&&(a=null),void 0===n&&(n=null),this.showobj=t,this.showCallback=a;var i=Laya.Browser.window.wx;i&&i.onShow(function(t){e.isShowing=!0,t&&t.scene&&(e.fromscene=Number(t.scene)),Laya.timer.frameOnce(1,e.Instance,e.Instance.onShowSucceed)})},e.prototype.onShowSucceed=function(){var t=e.Instance;if(t.showobj&&t.showCallback&&t.showCallback.call(t.showobj),t.isShareing){t.isShareing=!1;var a=!1;if(0==e.callbackfailstate){var n=Laya.Browser.now(),i=(n-t.startShareTime)/1e3;(i>=e.ShareTime||e.nowShareindex>=3)&&(a=!0)}e.callbackfailstate=0,a?(e.dayShareNum++,t.updateDayShareInfo(),t.nowshareObj&&t.nowsharesucceedfun&&t.nowsharesucceedfun.call(t.nowshareObj)):(e.nowShareindex++,t.showModal({title:"提示",content:"请每次分享到不同群,是否重新分享?",showCancel:!0,cancelText:"取消",confirmText:"确定",success:function(t){var a=e.Instance;t.confirm?e.Instance.shareApp(a.nowshareinfo,a.nowshareObj,a.nowsharesucceedfun,a.nowsharefailfun):a.nowsharefailfun&&a.nowshareObj&&a.nowsharefailfun.call(a.nowshareObj)},fail:function(){},complete:function(){}}))}},e.prototype.playVideo=function(t,a,n,o,r){var s=this;void 0===a&&(a=null),void 0===n&&(n=null),void 0===o&&(o=null),void 0===r&&(r=!0);var c=Laya.Browser.window.wx;if(c&&c.createRewardedVideoAd&&!e.videoplaying){var u=this.lockVideoLeftTime();if(u>0)return void l.GlobalTip.Instance.showWordTips("广告尚未准备好,请"+u+"秒后再试");h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_losefocus),e.istongjiVideoNum=r,this.nowvideokey=t,e.videoplaying=!0,this.videocallobj=a,this.videosucceedCallback=n,this.videofailCallback=o,this.videoAd=c.createRewardedVideoAd({adUnitId:"adunit-8c15b05d8885d405"}),this.videoAd.onClose(this.closeAD),this.videoAd.onError(this.onerro),this.videoAd.load().then(function(){return s.videoAd.show()})["catch"](function(t){console.log(t.errMsg),e.Instance.failVideo()})}},e.prototype.lockVideoLeftTime=function(){var t=(Laya.Browser.now()-e.lastVideoTime)/1e3;return t=e.VideoTime-t,Math.ceil(t)},e.prototype.onerro=function(t){var a=e.Instance;e.videoplaying=!1,a.videoAd.offError(a.onerro),a.videoAd.offClose(a.closeAD),h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_getfocus)},e.prototype.closeAD=function(t){e.lastVideoTime=Laya.Browser.now();var a=e.Instance;t&&t.isEnded||void 0==t?(e.istongjiVideoNum&&(e.dayVideoNum++,a.updateDayVideoInfo(),h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_updateVideoNums)),a.videocallobj&&a.videosucceedCallback&&a.videosucceedCallback.call(a.videocallobj)):(l.GlobalTip.Instance.showWordTips("未观看完整视频,无法获得奖励"),a.videocallobj&&a.videofailCallback&&a.videofailCallback.call(a.videocallobj)),e.videoplaying=!1,a.videoAd.offError(a.onerro),a.videoAd.offClose(a.closeAD),h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_getfocus)},e.prototype.failVideo=function(){e.lastVideoTime=Laya.Browser.now(),e.videoplaying=!1,l.GlobalTip.Instance.showWordTips("广告加载失败,试试别的方式吧~");var t=e.Instance;t.videoAd.offError(t.onerro),t.videoAd.offClose(t.closeAD),t.videocallobj&&t.videofailCallback&&t.videofailCallback.call(t.videocallobj),h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_getfocus)},e.prototype.isCanVideo=function(){if(e.dayVideoNum<e.VideoNum){if(0==e.dayVideoNum)return!0;var t=Math.floor(e.dayVideoNum/e.VideotoShare),a=Math.floor(e.dayShareNum/e.SharetoVideo);if(t>a)return!1;if(a>t)return!0;var n=e.dayVideoNum%e.VideotoShare;if(0!=n)return!0;var i=e.dayShareNum%e.SharetoVideo;return 0!=i?!1:!0}return!1},e.prototype.createBanner=function(e,t){if(void 0===e&&(e=""),Laya.Browser.window.wx){if(""!=e){for(var a=!1,n=0;n<this._bannerTypeList.length;n++)if(e==this._bannerTypeList[n].type){this._bannerTypeList[n].style=t;var i=this._bannerTypeList.splice(n,1);this._bannerTypeList.push(i[0]),a=!0;break}a||this._bannerTypeList.push({type:e,style:t})}else{if(0==this._bannerTypeList.length)return;var o=this._bannerTypeList[this._bannerTypeList.length-1];t=o.style}if(this.bannerAd){var r=Laya.Browser.now();r-this.bannerRunTime>18e4?(this.bannerAd.offError(this.bannerError),this.bannerAd.offResize(this.bannerResize),this.bannerAd.destory(),this.createNewBanner(t)):this.showBanner(t)}else this.createNewBanner(t)}},e.prototype.createNewBanner=function(e){var t=Laya.Browser.window.wx;if(t&&t.createBannerAd){this.nowStype=e,this.bannerRunTime=Laya.Browser.now();var a=this.getSystemInfoSync();this._screenwidth=a.screenWidth;var n=1;e.hasOwnProperty("scale")&&(n=e.scale),this.bannerAd=t.createBannerAd({adUnitId:"adunit-2c08fce5a3bbbb6f",adIntervals:30,style:{left:0,top:a.screenHeight-105,width:a.screenWidth*n}}),this.bannerAd&&(this.bannerAd.onError(this.bannerError),this.showBanner(e))}},e.prototype.bannerResize=function(t){var a=e.Instance;a.bannerAd.offResize(a.bannerResize),a.isonResize=!1;var n=a.nowStype;if(n){var i=a.getSystemInfoSync(),o=Laya.Browser.clientHeight/Laya.stage.displayHeight,r=Laya.Browser.clientWidth/Laya.stage.displayWidth;a.bannerwidth=t.width,a.bannerheight=t.height,n.hasOwnProperty("x")&&0!=n.x?a.bannerAd.style.left=n.x*r:a.bannerAd.style.left=.5*(i.windowWidth-t.width),n.hasOwnProperty("y")&&0!=n.y?a.bannerAd.style.top=n.y*o:a.bannerAd.style.top=i.windowHeight-t.height-15}},e.prototype.bannerError=function(e){},e.prototype.showBanner=function(e){if(this.bannerAd){this.nowStype=e;var t=this.getSystemInfoSync(),a=this.nowStype,n=1;a.hasOwnProperty("scale")&&(n=a.scale);var i=Laya.Browser.clientHeight/Laya.stage.displayHeight,o=Laya.Browser.clientWidth/Laya.stage.displayWidth;a.hasOwnProperty("x")&&0!=a.x?this.bannerAd.style.left=a.x*o:this.bannerAd.style.left=.5*(t.windowWidth-this.bannerwidth),a.hasOwnProperty("y")&&0!=a.y?this.bannerAd.style.top=a.y*i:this.bannerAd.style.top=t.windowHeight-this.bannerheight-15,this.bannerAd.style.width=t.screenWidth*n,this.isonResize||(this.isonResize=!0,this.bannerAd.onResize(this.bannerResize)),this.bannerAd.show()}},e.prototype.hideBanner=function(e){if(void 0===e&&(e=""),this.bannerAd&&this.bannerAd.hide(),""!=e){for(var t=0;t<this._bannerTypeList.length;t++)if(e==this._bannerTypeList[t].type){this._bannerTypeList.splice(t,1);break}if(this._bannerTypeList.length>0){var a=this._bannerTypeList[this._bannerTypeList.length-1];this.createBanner(a.type,a.style)}}},e.prototype.openFriendRank=function(e,t,a,n,i){void 0===n&&(n=null),void 0===i&&(i=null),this.closeziyuStage(),this._openrankDict[t]={type:e,viewType:t,rect:a,parent:n,data:i},this.initziyuStage(a,n),this.postMessage(e,i)},e.prototype.changeFriendRank=function(e){this.postMessage(e)},e.prototype.prePageRank=function(){},e.prototype.nextPageRank=function(){},e.prototype.closeFriendRank=function(e){this.closeziyuStage(),this._openrankDict[e]&&delete this._openrankDict[e];for(var t in this._openrankDict){var a=this._openrankDict[t];this.openFriendRank(a.type,a.viewType,a.rect,a.parent,a.data);break}},e.prototype.initziyuStage=function(e,t){},e.prototype.closeziyuStage=function(){},e.prototype.storeToCloud=function(e,t){var a=s.LocalDataControl.Instance,n=a.getnum("param1");e=Math.floor(e),t=Math.floor(t);var i=e,o=t;n>i?i=n:a.addstr("param1",i.toString());var r=[];r.push({key:"param1",value:i.toString()}),r.push({key:"param2",value:o+""}),this.setUserCloudStorage(r)},e.prototype.createGameClubButton=function(t,a){void 0===a&&(a="green");var n=Laya.Browser.window.wx;n&&t&&(t.width=40,t.height=40,e.gameclubButton=n.createGameClubButton({icon:a,style:t}),e.gameclubButton&&e.gameclubButton.show())},e.QuDaoID="",e.isShowing=!0,e.accreditstate=0,e.dayShareNum=0,e.dayVideoNum=0,e.ShareTime=0,e.VideoNum=0,e.VideoTime=0,e.jiliweitime=100,e.SharetoVideo=1,e.VideotoShare=1,e.ShareDict={},e.fromscene=0,e.nowShareindex=0,e.callbackfailstate=0,e.lastVideoTime=0,e.videoplaying=!1,e.istongjiVideoNum=!0,e}();a.WXGamePlatform=p},{"../Control/AudioControl":17,"../Control/DateControl":19,"../Control/LocalDataControl":22,"../Data/UserDataInfo":32,"../Global":38,"../WXSDK/WECHATEVENT":66,"../utils/DispatcherManager":70,"../utils/GameUtils":72,"../utils/GlobalTip":73}],68:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../WXSDK/WXGamePlatform"),i=e("./PlatfromType"),o=e("../WXSDK/WECHATEVENT"),r=e("../Global"),s=e("../utils/DispatcherManager"),c=e("../Time/TimesTamper"),l=e("../Control/DateControl"),h=e("../Control/AudioControl"),u=function(){function e(){this._isenable=!1,e.ins=this}return Object.defineProperty(e,"Instance",{get:function(){return null==e.ins?new e:e.ins},enumerable:!0,configurable:!0}),e.prototype.initPlatfrom=function(){Laya.Browser.window.tt?r.Global.nowplatfrom=i.PlatfromType.tt:Laya.Browser.window.wx?r.Global.nowplatfrom=i.PlatfromType.wx:r.Global.nowplatfrom=i.PlatfromType.pc},e.prototype.init=function(){this.initPlatfrom()},e.prototype.initData=function(){switch(l.DateControl.Instance.SetSelf(),r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.initData()}},e.checkEnable=function(){return 1==e.islegal?!0:!1},e.prototype.login=function(e,t,a,o){switch(void 0===e&&(e=null),void 0===t&&(t=null),void 0===a&&(a=null),void 0===o&&(o=null),fairygui.GRoot.inst.showModalWait(),this._logincallobj=e,this._loginsucceedcallback=t,r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.createUserAndLogin(this,this.loginSucceed,this.loginprogressCallback,this.loginfailcallback);break;default:this.loginSucceed(null)}},e.prototype.loginprogressCallback=function(e){},e.prototype.loginSucceed=function(e){fairygui.GRoot.inst.closeModalWait()},e.prototype.loginfailcallback=function(){},e.prototype.onShow=function(e,t,a){switch(void 0===e&&(e=null),void 0===t&&(t=null),void 0===a&&(a=null),r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.onShow(e,t,a);break;case i.PlatfromType.qq:}},e.prototype.showcallback=function(){Laya.timer.clear(this,this.againplaybgSound),Laya.timer.once(500,this,this.againplaybgSound),s.DispatcherManager.dispatchEvent(o.WECHATEVENT.WECHATEVENT_onshow),s.DispatcherManager.dispatchEvent(o.WECHATEVENT.WECHATEVENT_getfocus);var t=e.fromscene();(1089==t||1131==t)&&s.DispatcherManager.dispatchEvent(o.WECHATEVENT.WECHATEVENT_fromscorfk)},e.prototype.againplaybgSound=function(){s.DispatcherManager.dispatchEvent(o.WECHATEVENT.WECHATEVENT_onAudioInterruptionEnd)},e.prototype.onHide=function(e,t){switch(void 0===e&&(e=null),void 0===t&&(t=null),r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.onHide(e,t);break;case i.PlatfromType.qq:}},e.prototype.hidecallback=function(){c.TimesTamper.Instance.sendonlineTongji(),h.AudioControl.Instance.ClearAllSOUND(),s.DispatcherManager.dispatchEvent(o.WECHATEVENT.WECHATEVENT_onhide),s.DispatcherManager.dispatchEvent(o.WECHATEVENT.WECHATEVENT_losefocus)},Object.defineProperty(e.prototype,"isshow",{get:function(){var e=!0;switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.isShowing&&(e=!0),e=!1}return e},enumerable:!0,configurable:!0}),e.prototype.loadSubpackage=function(e,t,a,o,s){switch(void 0===s&&(s=null),r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.loadSubpackage(e,t,a,o,s);break;default:t&&a&&a.call(t)}},e.prototype.isaccredit=function(e,t){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.getaccredit(e,t);break;case i.PlatfromType.qq:n.WXGamePlatform.Instance.getaccredit(e,t);break;default:t&&e&&t.call(e,!0)}},e.prototype.createaccredit=function(e,t,a){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.createUserInfoButton(e,t,a)}},e.prototype.closeuserinfoButton=function(){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.closeuserinfobUtton()}},e.prototype.exitGame=function(){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.exitGame()}},e.prototype.openCustomerService=function(){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.openCustomerService()}},e.prototype.vibrateShort=function(){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.vibrateShort()}},e.isCanVideo=function(){var t=!1;if(e.checkEnable())t=!0;else switch(r.Global.nowplatfrom){case i.PlatfromType.wx:t=n.WXGamePlatform.Instance.isCanVideo();break;default:t=!0}return t},e.prototype.startShareApp=function(e,t,a,o){switch(void 0===t&&(t=null),void 0===a&&(a=null),void 0===o&&(o=null),r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.startShareApp(e,t,a,o);break;default:t&&a&&a.call(t)}},e.prototype.playVideo=function(e,t,a,o,s){switch(void 0===t&&(t=null),void 0===a&&(a=null),void 0===o&&(o=null),void 0===s&&(s=!0),r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.playVideo(e,t,a,o,s);break;default:t&&a&&a.call(t)}},e.prototype.createBanner=function(e,t){switch(void 0===t&&(t={x:0,y:0,scale:1}),r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.createBanner(e,t)}},e.prototype.hideBanner=function(e){switch(r.Global.nowplatfrom){
  8. case i.PlatfromType.wx:n.WXGamePlatform.Instance.hideBanner(e)}},e.prototype.storeToCloud=function(e,t){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.storeToCloud(e,t)}},e.prototype.openFriendRank=function(e,t,a,o,s){switch(void 0===o&&(o=null),void 0===s&&(s=null),r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.openFriendRank(e,t,a,o,s)}},e.prototype.changeFriendRank=function(e){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.changeFriendRank(e)}},e.prototype.prePageRank=function(){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.prePageRank()}},e.prototype.nextPageRank=function(){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.nextPageRank()}},e.prototype.closeFriendRank=function(e){switch(r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.closeFriendRank(e)}},e.prototype.lockVideoLeftTime=function(){var e=0;switch(r.Global.nowplatfrom){case i.PlatfromType.wx:e=n.WXGamePlatform.Instance.lockVideoLeftTime()}return e},e.dayVideoNums=function(){var e=0;switch(r.Global.nowplatfrom){case i.PlatfromType.wx:e=n.WXGamePlatform.dayVideoNum}return e},e.fromscene=function(){var e=0;switch(r.Global.nowplatfrom){case i.PlatfromType.wx:e=n.WXGamePlatform.fromscene}return e},e.createGameClubButton=function(e,t){switch(void 0===t&&(t="green"),r.Global.nowplatfrom){case i.PlatfromType.wx:n.WXGamePlatform.Instance.createGameClubButton(e,t)}},e.islegal=0,e}();a.pingtaiutils=u},{"../Control/AudioControl":17,"../Control/DateControl":19,"../Global":38,"../Time/TimesTamper":49,"../WXSDK/WECHATEVENT":66,"../WXSDK/WXGamePlatform":67,"../utils/DispatcherManager":70,"./PlatfromType":60}],69:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function t(){var a=e.call(this)||this;return a.isInit=!1,t.ins=a,a.isInit,null==a._dispatcher&&(a._dispatcher=new Laya.EventDispatcher,a.isInit=!0),a}return __extends(t,e),Object.defineProperty(t,"Instance",{get:function(){return null==t.ins?new t:t.ins},enumerable:!0,configurable:!0}),t.prototype.addEventListener=function(e,t,a,n,i){void 0===n&&(n=!1),void 0===i&&(i=0),this._dispatcher.on(e,a,t)},t.prototype.removeEventListener=function(e,t,a,n){void 0===n&&(n=!1),this._dispatcher.off(e,a,t)},t.prototype.hasEventListener=function(e){return this._dispatcher.hasListener(e)},t.prototype.dispatchEvent=function(e,t){return this._dispatcher.event(e,t)},t}(Laya.EventDispatcher);a.DisPatcherOn=n},{}],70:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./LEvent"),i=e("./DisPatcherOn"),o=function(){function e(){}return e.init=function(){i.DisPatcherOn.Instance},e.Event=function(e,t,a,i){return void 0===t&&(t=null),void 0===a&&(a=!1),void 0===i&&(i=!1),new n.LEvent(e,t,a,i)},e.dispatchEvent=function(e,t,a,n){void 0===t&&(t=null),void 0===a&&(a=!1),void 0===n&&(n=!1),i.DisPatcherOn.Instance.dispatchEvent(e,t)},e.addEventListener=function(e,t,a,n,o){void 0===n&&(n=!1),void 0===o&&(o=0),i.DisPatcherOn.Instance.addEventListener(e,a,t,n,o)},e.hasEventListener=function(e){return i.DisPatcherOn.Instance.hasEventListener(e)},e.removeEventListener=function(e,t,a,n,o){void 0===n&&(n=!1),void 0===o&&(o=0),i.DisPatcherOn.Instance.removeEventListener(e,a,t)},e}();a.DispatcherManager=o},{"./DisPatcherOn":69,"./LEvent":74}],71:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=Laya.Sprite,i=function(){function e(){this.btnArr=["res/button.png","res/button.png","res/button.png"],this.nameArr=["canvas截图","sprite截图","清理"]}return e.prototype.drawSomething=function(){this.sp=new n,Laya.stage.addChild(this.sp),this.sp.graphics.drawLine(10,58,146,58,"#ff0000",3),this.sp.graphics.drawLines(176,58,[0,0,39,-50,78,0,117,50,156,0],"#ff0000",5),this.sp.graphics.drawCurves(352,58,[0,0,19,-100,39,0,58,100,78,0,97,-100,117,0,136,100,156,0],"#ff0000",5),this.sp.graphics.drawRect(10,166,166,90,"#ffff00"),this.sp.graphics.drawPoly(264,166,[0,0,60,0,78.48,57,30,93.48,-18.48,57],"#ffff00"),this.sp.graphics.drawPoly(400,166,[0,100,50,0,100,100],"#ffff00"),this.sp.graphics.drawCircle(98,332,50,"#00ffff"),this.sp.graphics.drawPie(240,290,100,10,60,"#00ffff"),this.sp.graphics.drawPath(400,310,[["moveTo",5,0],["lineTo",105,0],["arcTo",110,0,110,5,5],["lineTo",110,55],["arcTo",110,60,105,60,5],["lineTo",5,60],["arcTo",0,60,0,55,5],["lineTo",0,5],["arcTo",0,0,5,0,5],["closePath"]],{fillStyle:"#00ffff"})},e.prototype._onclick=function(e){switch(e.target.name){case this.nameArr[0]:var t=this._canvas.toDataURL("image/png",1);this.drawImage.skin=t;break;case this.nameArr[1]:var a=Laya.stage.drawToTexture(Laya.Browser.clientWidth,Laya.Browser.clientHeight,0,0);this.drawSp.graphics.drawTexture(a,0,0,this.drawSp.width,this.drawSp.height);break;case this.nameArr[2]:this.drawImage.skin=null,this.drawSp.graphics.clear(),this.drawSp.graphics.drawRect(0,0,this.drawSp.width,this.drawSp.height,"#ff0000")}},e.removeselect="GameState_removeselect",e.npcend="GameState_npcendGame",e.win="GameState_winGame",e.fail="GameState_failGame",e.jump="GameState_jumpgame",e.stop="GameState_stopGame",e.returnMainView="returnMainView",e.updateSKinView="GameState_updateSKinView",e.start="GameState_startGame",e.end="GameState_endGame",e}();a.GameState=i},{}],72:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n;!function(e){function t(e,t){var a=Math.floor(Math.random()*(t-e+1))+e;return a>t&&(a=t),a}function a(e,t){var a=Math.random()*(t-e+1)+e;return a>t&&(a=t),a}function n(e,t){var a=fairygui.UIPackage.getByName(e);return a?a.getItemAssetByName(t):null}function i(e){var t=e.split(";");return new Laya.Point(Number(t[0]),Number(t[1]))}function o(e){var t=[];if(""==e)return t;var a=e.split(";"),n=0;for(n;n<a.length;n++)t.push(Number(a[n]));return t}function r(e){return e.split(";")}function s(e){var t={},a=e.split(";");return t.key=a[0],t.value=a[1],t}function c(e){var t=e.split("|");return t}function l(e){var t=[],a=e.split("|"),n=0;for(n=0;n<a.length;n++){var i=a[n].split(";");t.push({key:i[0],value:i[1]})}return t}function h(e){var t={},a=e.split("|"),n=0;for(n=0;n<a.length;n++){var i=a[n].split(";");t[i[0]]=i[1]}return t}function u(e,t){e=e.split("."),t=t.split(".");for(var a=Math.max(e.length,t.length);e.length<a;)e.push("0");for(;t.length<a;)t.push("0");for(var n=0;a>n;n++){var i=parseInt(e[n]),o=parseInt(t[n]);if(i>o)return 1;if(o>i)return-1}return 0}e.randRangeint=t,e.randRangefloat=a,e.getTexbyPkgAndName=n,e.cutfenhaoPoint=i,e.cutfenhaotoArrnum=o,e.cutfenhaotoArrstr=r,e.cutfenhaotoObj=s,e.cutstrtoArr=c,e.cutstrtoArr1=l,e.cutstrtoObj=h,e.compareVersion=u}(n=a.GameUtils||(a.GameUtils={}))},{}],73:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../View/GlobalTipPanel"),i=e("../Control/LayoutControl"),o=e("../utils/LayOUT"),r=e("../utils/DispatcherManager"),s=e("../utils/GameState"),c=function(){function e(){e.ins=this}return Object.defineProperty(e,"Instance",{get:function(){return null==e.ins?new e:e.ins},enumerable:!0,configurable:!0}),e.prototype.initEvent=function(){e.isEvent=!0,r.DispatcherManager.addEventListener(s.GameState.removeselect,this,this.addwordList)},e.prototype.showWordTips=function(t){if(e.isEvent||e.Instance.initEvent(),e.showWordList.length>0){e.showWordList[e.showWordList.length-1].nowword}if(e.wordList.length>0){var a=e.wordList.shift();i.LayoutControl.Instance.AddLayerByName(a,o.LayOUT.TIP),e.showWordList.push(a),a.showWord(t)}else if(e.showWordList.length<10){var r=new n.WordTipsPanel;i.LayoutControl.Instance.AddLayerByName(r,o.LayOUT.TIP),e.showWordList.push(r),r.showWord(t)}else{var r=e.showWordList.shift();r.showWord(t),e.showWordList.push(r)}},e.prototype.addwordList=function(t){if(t){t.removeFromParent();var a=e.showWordList.indexOf(t);-1!=a&&e.showWordList.splice(a,1),i.LayoutControl.Instance.ClearLayerByName(o.LayOUT.TIP),e.wordList.push(t)}},e.wordList=[],e.showWordList=[],e.maxNum=10,e.isEvent=!1,e}();a.GlobalTip=c},{"../Control/LayoutControl":21,"../View/GlobalTipPanel":51,"../utils/DispatcherManager":70,"../utils/GameState":71,"../utils/LayOUT":75}],74:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function t(t,a,n,i){void 0===a&&(a=null),void 0===n&&(n=!1),void 0===i&&(i=!1);var o=e.call(this)||this;return o.CLASS_NAME="LEvent",a&&(o._obj=a),o}return __extends(t,e),t.prototype.clone=function(e){return new t(this.type,e?e:this._obj)},t.prototype.toString=function(){console.log(this.CLASS_NAME,"type","bubbles","cancelable")},Object.defineProperty(t.prototype,"param",{get:function(){return this._obj},enumerable:!0,configurable:!0}),t}(Laya.Event);a.LEvent=n},{}],75:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){}return e.BG="BG",e.UI="UI",e.UITop="UITop",e.TIP="TIP",e.GUIDE="GUIDE",e}();a.LayOUT=n},{}],76:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.Instance=function(e){if(null==e.key)throw new Error("getinstance erro");return this._dict[e.key]},t.getInstanceOrCreate=function(e){if(null==e.key)throw new Error("getInstanceOrCreate erro");return this.create(e),this._dict[e.key]},t.create=function(e){if(null==e.key)throw new Error("create erro");return null==this._dict[e.key]&&(this._dict[e.key]=new e),this._dict[e.key]},t.remove=function(e){var t=e.key;null!=this._dict[t]&&this._dict[t].destory()},t.prototype.destory=function(){},t._dict={},t}(Laya.EventDispatcher);a.Singleton=n},{}],77:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Agency/AgencySkin"),i=e("../PrefabControl/PanelResDic"),o=e("../utils/GlobalTip"),r=e("../Config/AssetPath"),s=e("../WXSDK/pingtaiutils"),c=Laya.MovieClip,l=function(e){function t(){var t=e.call(this)||this;return t.bgColorChannels={r:99,g:0,b:255},t.SWFPath="res/swf/dragon.swf",t.MCWidth=318,t.MCHeight=406,t}return __extends(t,e),t.prototype.getHexColorString=function(){this.bgColorChannels.r=Math.floor(this.bgColorChannels.r),this.bgColorChannels.g=0,this.bgColorChannels.b=Math.floor(this.bgColorChannels.b);var e=this.bgColorChannels.r.toString(16);e=2==e.length?e:"0"+e;var t=this.bgColorChannels.g.toString(16);t=2==t.length?t:"0"+t;var a=this.bgColorChannels.b.toString(16);return a=2==a.length?a:"0"+a,"#"+e+t+a},t.prototype.constructFromXML=function(t){e.prototype.constructFromXML.call(this,t);for(var a in this._children){var n=this._children[a];this[n.name]=n}this.onInit()},t.prototype.onInit=function(){this.initView(),this.initEvent()},t.prototype.initView=function(){this.agencyskin=i.PanelResDic.Instance.getSingleTon(n.AgencySkin),this.c_state=this.getController("c_state")},t.prototype.initEvent=function(){this.on(Laya.Event.CLICK,this,this.btnclick)},t.prototype.btnclick=function(){if(this.pifuvo)switch(this.c_state.selectedIndex){case 0:break;case 1:this.agencyskin.GainPifu(this.pifuvo);break;case 2:o.GlobalTip.Instance.showWordTips("暂未开放");break;case 3:s.pingtaiutils.Instance.playVideo("",this,this.playvideocallback);break;case 4:this.agencyskin.GainPifu(this.pifuvo)}},t.prototype.createMovieClip=function(){var e=new c;e.load(this.SWFPath),e.x=(Laya.stage.width-this.MCWidth)/2,e.y=(Laya.stage.height-this.MCHeight)/2,Laya.stage.addChild(e)},t.prototype.playvideocallback=function(){this.agencyskin.GainPifu(this.pifuvo)},t.prototype.showData=function(e){if(this.pifuvo=e,this.pifuvo)if(this.load_icon.icon=r.AssetPath.getroleicon(this.pifuvo.roleCFG.icon),this.agencyskin.RoleData.CharacterID==this.pifuvo.roleCFG.id)this.c_state.selectedIndex=0;else if(1==this.pifuvo.state)this.c_state.selectedIndex=1;else switch(this.pifuvo.roleCFG.getState){case 1:this.c_state.selectedIndex=3,this.txt_need.text=this.pifuvo.hasnum+"/"+this.pifuvo.roleCFG.need;break;case 2:this.c_state.selectedIndex=4,this.txt_need.text=this.pifuvo.roleCFG.need.toString();break;case 3:this.c_state.selectedIndex=2}},t.prototype.preFixNumber=function(e,t){return("0000000000"+e).slice(-t)},t.prototype.evalBgColor=function(){var e=16777215*Math.random();this.getColorChannals(e)},t.prototype.getColorChannals=function(e){var t=[];return t.push(e>>16),t.push(e>>8&255),t.push(255&e),t},t.prototype.dispose=function(){this.off(Laya.Event.CLICK,this,this.btnclick),e.prototype.dispose.call(this)},t}(fairygui.GButton);a.SkinItem=l},{"../Agency/AgencySkin":6,"../Config/AssetPath":15,"../PrefabControl/PanelResDic":45,"../WXSDK/pingtaiutils":68,"../utils/GlobalTip":73}],78:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(){this._text=null}return e.prototype.onStateEnter=function(){console.log("动画开始播放了"),this._text.text="动画状态:动画开始播放"},e.prototype.onStateUpdate=function(){console.log("动画状态更新了"),this._text.text="动画状态:动画更新中"},e.prototype.onStateExit=function(){console.log("动画退出了"),this._text.text="动画状态:动画开始退出"},e.prototype.addBox=function(){for(var e=0;8>e;e++)this.addVerticalBox(-.65,.165+.33*e*2,0),this.addVerticalBox(0,.165+.33*e*2,0),this.addVerticalBox(.65,.165+.33*e*2,0)},e.prototype.addVerticalBox=function(e,t,a){var n=this.scene.addChild(new Laya.MeshSprite3D(this.mesh1));n.meshRenderer.material=this.mat1,n.meshRenderer.castShadow=!0,n.meshRenderer.receiveShadow=!0,n.transform.position=new Laya.Vector3(e,t,a);var i=n.addComponent(Laya.Rigidbody3D);i.mass=10,i.friction=.4,i.restitution=.2;var o=new Laya.BoxColliderShape(.5,.33,2);i.colliderShape=o},e.ActionType_addscaleMinToMax="ActionType_addscaleMinToMax",e.ActionType_removescaleMaxToMin="ActionType_removescaleMaxToMin",e.ActionType_none="ActionType_none",e.ActionType_addmoveToMiddle="ActionType_addmoveToMiddle",e.ActionType_removemoveToRight="ActionType_removemoveToRight",e.ActionType_addmoveFromBottom="ActionType_addmoveFromBottom",e.ActionType_addmoveFromup="ActionType_addmoveFromup",e}();a.ViewAction=n},{}]},{},[41]);