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 __(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(__.prototype=a.prototype,new __)}}();!function(){return function r(e,t,a){function o(i,s){if(!t[i]){if(!e[i]){var l="function"==typeof require&&require;if(!s&&l)return l(i,!0);if(n)return n(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var h=t[i]={exports:{}};e[i][0].call(h.exports,function(t){return o(e[i][1][t]||t)},h,h.exports,r,e,t,a)}return t[i].exports}for(var n="function"==typeof require&&require,i=0;i"+f.WxApi.querychannel+" referrerInfoappId->"+f.WxApi.referrerInfoappId),e.LoginLocal()):(f.WxApi.recordAldEvent("微信登录失败"),e.LoginWX())})},AgencyLogin.prototype.LoginLocal=function(e){void 0===e&&(e=null),f.WxApi.recordAldEvent("开始本地登录"),e&&new g.PlayerAccount(e.code,"","",0,"","","","",f.WxApi.shareOpenId,f.WxApi.shareOpenId,C.Global.gameVersion),y.NetworkManager.Instance.login(null,Laya.Handler.create(this,this.LoginComplete),null)},AgencyLogin.prototype.LoginComplete=function(){f.WxApi.recordAldEvent("本地服务器登录完成..."),f.WxApi.aldSendOpenid(g.PlayerAccount.CurrentAccount.CurAccountData.openid),this.Success()},AgencyLogin.prototype.loginprogress=function(e){var t=n.ViewManager.Instance.getView(i.LoadingPanel);t&&t.showWord(e)},AgencyLogin.prototype.Success=function(){this.ResolveData(),this.initData(),this.StartMain(),w.ttad.InitAD()},AgencyLogin.prototype.StartMain=function(){console.log("当前配置表总关卡:",h.default.vec.length),this.getSingleTon(l.AgencyMain).StartMain()},AgencyLogin.prototype.ResolveData=function(){var e=g.PlayerAccount.CurrentAccount.nowConfig.gameConfig[0].config;if(e&&""!=e){var t,a=e.split("%file%"),n=a.length;for(t=0;t=i){e=n;break}return e},AgencyLottery.prototype.startFun=function(){this.mAniPath="res/spine/spineRes1/dragon.sk"},AgencyLottery.prototype.onError=function(){console.log("error")},AgencyLottery.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()},AgencyLottery.prototype.completeHandler=function(){this.play()},AgencyLottery.prototype.play=function(){this.mCurrIndex++,this.mCurrIndex>=this.mArmature.getAnimNum()&&(this.mCurrIndex=0),this.mArmature.play(this.mCurrIndex,!1)},AgencyLottery.key="AgencyLottery",AgencyLottery}(n.AgencyBaseControl);a.AgencyLottery=u},{"../CFG/LotteryCFG":12,"../CFG/RoleCFG":14,"../View/LotteryPanel":66,"../View/ViewManager":70,"../utils/GameUtils":87,"../utils/GlobalTip":88,"./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"),l=e("../View/MainPanel"),c=e("../Control/SceneControl"),h=e("../Config/AssetPath"),u=e("../Control/GameStateControl"),p=e("../WXSDK/WXGamePlatform"),d=e("../CFG/NpcCFG"),m=e("../WXSDK/PlayerAccount"),f=e("../PrefabControl/PropManager"),g=e("../WXSDK/FYHD_Sdk"),y=e("../View/GiftView"),C=e("../Control/AssetManager"),_=function(e){function AgencyMain(){var t=e.call(this)||this;return t._loadjd=0,t._alljd=0,t}return __extends(AgencyMain,e),AgencyMain.prototype.initSelf=function(){},AgencyMain.prototype.StartMain=function(){this._loadjd=0,this._alljd=20,p.WXGamePlatform.Instance.loadSubpackage("subpackage",this,this.sub1complete,this.loadprogress,null)},AgencyMain.prototype.sub1complete=function(){this._loadjd=20,this._alljd=30,p.WXGamePlatform.Instance.loadSubpackage("subpackage1",this,this.SubpackageOver,this.loadprogress,null)},AgencyMain.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))},AgencyMain.prototype.SubpackageOver=function(){var e=this;C.AssetManager.LoadAssetFun(function(){e._loadjd=50,e._alljd=40;var t=[],a=[];a.push(h.AssetPath.get3DModel("startpanel")),a.push(h.AssetPath.get3DModel("endpanel")),a.push(h.AssetPath.get3DModel("speedupeffect")),a.push(h.AssetPath.get3DModel("color_white")),a.push(h.AssetPath.get3DModel("color_yellow")),a.push(h.AssetPath.get3DModel("winline")),a.push(h.AssetPath.get3DModel("fireworks")),a.push(h.AssetPath.get3DModel("DirectionalLight")),a.push(h.AssetPath.get3DRoleModel(e.RoleData.roleCfg.name)),a.push(h.AssetPath.get3DRoleModel("Arrow"));var n=e.RoleData.levelmapArr,o=0;for(o=0;o=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("金币不足")}},AgencySkin.prototype.GainNoHaveSkin=function(){var e=[];for(var t in this.pifuDict)0==this.pifuDict[t].state&&e.push(this.pifuDict[t]);return e},AgencySkin.key="AgencySkin",AgencySkin}(n.AgencyBaseControl);a.AgencySkin=p},{"../CFG/RoleCFG":14,"../Control/LocalDataControl":23,"../Data/SkinData":34,"../Data/UserDataInfo":35,"../View/SkinPanel":68,"../View/ViewManager":70,"../utils/GameState":86,"../utils/GlobalTip":88,"./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"),l=e("../Control/ResourceControl"),c=e("../Control/SceneControl"),h=e("./AgencyInGame"),u=e("../View/EggPanel"),p=e("../WXSDK/PlayerAccount"),d=function(e){function AgencyTrial(){var t=e.call(this)||this;return t.isshiyonging=!1,t}return __extends(AgencyTrial,e),AgencyTrial.prototype.openview=function(e){i.ViewManager.Instance.add(o.TrialPanel,e)},AgencyTrial.prototype.ExitPanel=function(e){if(this.isshiyonging=!!e,this._selectvo=e,e){var t=[];t.push({url:s.AssetPath.get3DRoleModel(e.roleCFG.name)}),l.ResourceControl.Instance.loader3DArr(t,this,this.SceneCreateComplete,null,!0)}else{var a=Math.random();p.PlayerAccount.CurrentAccount.CurAccountData.WhiteUser&&a<=p.PlayerAccount.CurrentAccount.CurAccountData.HitEgg?i.ViewManager.Instance.add(u.default):r.GameStateControl.Instance.entergame()}i.ViewManager.Instance.close(o.TrialPanel)},AgencyTrial.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)},AgencyTrial.prototype.onSpriteClick=function(e){Math.random()},AgencyTrial.prototype.onRotate=function(e){},AgencyTrial.prototype.SceneCreateComplete=function(){c.SceneControl.Instance.CreatePlayer(this._selectvo.roleCFG),h.AgencyInGame.gamenum>1&&p.PlayerAccount.CurrentAccount.CurAccountData.WhiteUser?i.ViewManager.Instance.add(u.default):r.GameStateControl.Instance.entergame()},AgencyTrial.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)},AgencyTrial.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)},AgencyTrial.key="AgencyTrial",AgencyTrial}(n.AgencyBaseControl);a.AgencyTrial=d},{"../Config/AssetPath":15,"../Control/GameStateControl":21,"../Control/ResourceControl":28,"../Control/SceneControl":29,"../View/EggPanel":62,"../View/TrialPanel":69,"../View/ViewManager":70,"../WXSDK/PlayerAccount":75,"./AgencyBaseControl":1,"./AgencyInGame":2}],8:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function AgencyUserMessage(){var t=e.call(this)||this;return t.roleisinit=!1,t}return __extends(AgencyUserMessage,e),AgencyUserMessage.prototype.initSelf=function(){},AgencyUserMessage.prototype.GoldUp=function(e){this.RoleData.Money+=e},AgencyUserMessage.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)},AgencyUserMessage.prototype.init=function(){this.RoleData.init(),this.roleisinit=!0},AgencyUserMessage.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},AgencyUserMessage.prototype.LevelUp=function(){this.RoleData.LevelUp()},AgencyUserMessage.key="AgencyUserMessage",AgencyUserMessage}(e("./AgencyBaseControl").AgencyBaseControl);a.AgencyUserMessage=n},{"./AgencyBaseControl":1}],9:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function BuildCFG(){}return BuildCFG.initCfg=function(e){var t=0,a=e.split("\n");t=0;for(t=0;t0?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)}},GameStateControl.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)},GameStateControl.prototype.update=function(e){if(1==this.nowGameState){this._time=0;var t,a,n=s.PropManager.npcscriptDict;for(t in this._nums=0,this._all=0,n)1==(a=n[t]).getAction()&&(s.PropManager.mainRole.transform.position.z0)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,l.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()},GameStateControl}();a.GameStateControl=y},{"../Agency/AgencySkin":6,"../Agency/AgencyTrial":7,"../Agency/AgencyUserMessage":8,"../CFG/GameCFG":10,"../Control/AudioControl":18,"../Control/SceneControl":29,"../JoystickModule":43,"../PrefabControl/PanelResDic":48,"../PrefabControl/PropManager":49,"../Time/TimerService":59,"../WXSDK/RecordManager":76,"../WXSDK/Sdk":77,"../utils/DispatcherManager":85,"../utils/GameState":86}],22:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Global"),i=e("../utils/LayOUT"),o=function(e){function LayoutControl(){var t=e.call(this)||this;return t._uilayerZorder=0,t._upuilayerZorder=200,t._tipslayerZorder=1e3,t._guidelayerZorder=600,t.uiLayer=new fairygui.GComponent,t.topLayer=new fairygui.GComponent,t.background=new fairygui.GComponent,t._position=new Laya.Vector3,t._outPos=new Laya.Vector3,t.scaleDelta=0,LayoutControl.ins=t,t}return __extends(LayoutControl,e),Object.defineProperty(LayoutControl,"Instance",{get:function(){return null==LayoutControl.ins?new LayoutControl:LayoutControl.ins},enumerable:!0,configurable:!0}),LayoutControl.prototype.AddLayerByName=function(e,t){t==i.LayOUT.BG?LayoutControl.Instance.background.addChild(e):t==i.LayOUT.UI?(this._uilayerZorder++,LayoutControl.Instance.uiLayer.addChild(e),e.sortingOrder=this._uilayerZorder):t==i.LayOUT.UITop?(this._upuilayerZorder++,LayoutControl.Instance.uiLayer.addChild(e),e.sortingOrder=this._upuilayerZorder):t==i.LayOUT.TIP?(this._tipslayerZorder++,LayoutControl.Instance.uiLayer.addChild(e),e.sortingOrder=this._tipslayerZorder):t==i.LayOUT.GUIDE&&(this._guidelayerZorder++,LayoutControl.Instance.uiLayer.addChild(e),e.sortingOrder=this._guidelayerZorder)},LayoutControl.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)},LayoutControl.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},LayoutControl.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)}},LayoutControl.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)},LayoutControl.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)},LayoutControl}(Laya.EventDispatcher);a.LayoutControl=o},{"../Global":41,"../utils/LayOUT":90}],23:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Global"),i=e("../WXSDK/PlatfromType"),o=function(e){function LocalDataControl(){var t=e.call(this)||this;return LocalDataControl.ins=t,t}return __extends(LocalDataControl,e),Object.defineProperty(LocalDataControl,"Instance",{get:function(){return null==LocalDataControl.ins?new LocalDataControl:LocalDataControl.ins},enumerable:!0,configurable:!0}),LocalDataControl.prototype.init=function(){},LocalDataControl.prototype.AddData=function(e,t){this.AddLocalData(e,t)},LocalDataControl.prototype.getObj=function(e){return this.GetLocalCaCheData(e)},LocalDataControl.prototype.addstr=function(e,t){this.addCacheStr(e,t)},LocalDataControl.prototype.addnum=function(e,t){this.addCacheStr(e,t.toString())},LocalDataControl.prototype.getstr=function(e){return this.getCachestr(e)},LocalDataControl.prototype.getnum=function(e){return Number(this.getCachestr(e))},LocalDataControl.prototype.removeCache=function(e){this.removeselectCache(e)},LocalDataControl.prototype.clearAll=function(){this.clearAllCache()},LocalDataControl.prototype.AddLocalData=function(e,t){switch(n.Global.nowplatfrom){case i.PlatfromType.wx:this.setStorageSyncWX(e,t);break;default:Laya.LocalStorage.setJSON(e,t)}},LocalDataControl.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},LocalDataControl.prototype.addCacheStr=function(e,t){switch(n.Global.nowplatfrom){case i.PlatfromType.wx:this.setStorageSyncWX(e,t);break;default:Laya.LocalStorage.setItem(e,t)}},LocalDataControl.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},LocalDataControl.prototype.removeselectCache=function(e){switch(n.Global.nowplatfrom){case i.PlatfromType.wx:this.removeStorageWX(e);break;default:Laya.LocalStorage.removeItem(e)}},LocalDataControl.prototype.clearAllCache=function(){switch(n.Global.nowplatfrom){case i.PlatfromType.wx:this.clearStorageWX();break;default:Laya.LocalStorage.clear()}},LocalDataControl.prototype.setStorageSyncWX=function(e,t){var a=Laya.Browser.window.wx;a&&a.setStorageSync(e,t)},LocalDataControl.prototype.getStorageSyncWX=function(e){var t=Laya.Browser.window.wx;return t?t.getStorageSync(e):null},LocalDataControl.prototype.removeStorageWX=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.removeStorage(e)},LocalDataControl.prototype.clearStorageWX=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.clearStorageSync()},LocalDataControl}(Laya.EventDispatcher);a.LocalDataControl=o},{"../Global":41,"../WXSDK/PlatfromType":74}],24:[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"),l=e("../View/ViewManager"),c=e("../Data/ComponentEventData"),h=e("../PrefabControl/GamePool"),u=function(e){function PanelBaseControl(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 l=e.call(this)||this;return l.isguideing=!1,l.PackageName="",l.ResourcesName="",l._iscache=!0,l._ActionType=s.ViewAction.ActionType_none,l._clickBgIsColse=0,l.EventResDic={},l.EventGlobal={},l._iscache=r,l.PackageName=t,l.ResourcesName=a,l._isAddpackage=n,l._ActionType=i,l._clickBgIsColse=o,l.showModalWait(),l}return __extends(PanelBaseControl,e),PanelBaseControl.prototype.ResolveUI=function(e,t,a,i,o,r){for(var l in 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,this.contentPane._children){var c=this.contentPane._children[l];if("item_panel"==c.name){var h=c;if(h)for(var u in h._children){var p=h._children[u];this[p.name]=p}this.item_panel=c}else this[c.name]=c}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()},PanelBaseControl.prototype.LoadViewUI=function(e,t,a){this._loadTarget=t,this._onLoadedHandler=a,i.ResourceControl.Instance.loadGroup(e,this,this.LoadComplete)},PanelBaseControl.prototype.createLabel=function(e,t){var a=new Laya.Label;return a.font="Microsoft YaHei",a.text="SAMPLE DEMO",a.fontSize=30,a.color=e,t&&(a.stroke=4,a.strokeColor=t),Laya.stage.addChild(a),a},PanelBaseControl.prototype.loadUibyArr=function(e,t,a){this._loadTarget=t,this._onLoadedHandler=a,i.ResourceControl.Instance.Loaders(e,this,this.LoadComplete)},PanelBaseControl.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},PanelBaseControl.prototype.onSelectChange=function(e){console.log("你选择了第 "+(e+1)+" 项")},PanelBaseControl.prototype.LoadComplete=function(){this._loadTarget&&this._onLoadedHandler&&this._onLoadedHandler.call(this._loadTarget)},PanelBaseControl.prototype.removeEffectPackage=function(e){n.ResDataControl.Instance.ClearPackByName(e,!0)},PanelBaseControl.prototype.getpanelController=function(e){return this.item_panel?this.item_panel.getController(e):null},PanelBaseControl.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)},PanelBaseControl.prototype.getpanelTransition=function(e){return this.item_panel?this.item_panel.getTransition(e):null},PanelBaseControl.prototype.getChildformContentPanel=function(e){return this.contentPane?this.contentPane.getChild(e):null},PanelBaseControl.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)},PanelBaseControl.prototype.initView=function(){},PanelBaseControl.prototype.initEvent=function(){},PanelBaseControl.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))}},PanelBaseControl.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},PanelBaseControl.prototype.updateLabel=function(e){e.label=e.selected?"已选中":"未选中"},PanelBaseControl.prototype.windowanmoend=function(){Laya.timer.callLater(this,this.onShowView)},PanelBaseControl.prototype.onShowView=function(){this.closeModalWait(),this.showClickBg()},PanelBaseControl.prototype.showClickBg=function(){this._clickBg&&(this._clickBg.alpha=.55,2!=this._clickBgIsColse||this.hasClickListener()||this._clickBg.onClick(this,this.ClickExitView))},PanelBaseControl.prototype.ClickExitView=function(){l.ViewManager.Instance.close(this.viewKey,!0)},PanelBaseControl.prototype.getProxy=function(e){return r.PanelResDic.Instance.getSingleTon(e)},PanelBaseControl.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))}},PanelBaseControl.prototype.getTransitionByName=function(e){return this.contentPane.getTransition(e)},PanelBaseControl.prototype.dispacheDatatrigger=function(e,t){void 0===t&&(t=null),o.DispatcherManager.dispatchEvent(e,t)},PanelBaseControl.prototype.addDataEvent=function(e,t,a){if(!this.EventGlobal.hasOwnProperty(e)){var n=h.GamePool.GetItem(c.ComponentEventData.ResDicValue);this.EventGlobal[e]=n,n.type=e,n.thisObject=t,n.listener=a,o.DispatcherManager.addEventListener(e,t,a)}},PanelBaseControl.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]}},PanelBaseControl.prototype.ClearEventByType=function(e,t,a,n){if(e&&this.EventResDic[e.name])for(var i,o=this.EventResDic[e.name],r=0,s=o.length;r0)for(a=0,a=t.length-1;a>=0;a--)(n=t[a])&&(n.target&&n.target.off(n.type,n.thisObject,n.listener),n.clear()),t.splice(a,1);delete this.EventResDic[e]}}this.EventResDic={}},PanelBaseControl.prototype.clearEvent=function(){},PanelBaseControl.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()},PanelBaseControl.prototype.setclickBgIsColse=function(){this.isShowing&&this._clickBgIsColse>0&&this.contentPane&&(this._clickBg||""==PanelBaseControl.viewbgUrl||(this._clickBg=new fairygui.GLoader,this._clickBg.touchable=!0,this._clickBg.setSize(fairygui.GRoot.inst.width,fairygui.GRoot.inst.height),this._clickBg.url=PanelBaseControl.viewbgUrl,this._clickBg.fill=fairygui.LoaderFillType.ScaleFree,this._clickBg.alpha=0,this.contentPane.addChildAt(this._clickBg,0)))},PanelBaseControl.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={}},PanelBaseControl.viewbgUrl="",PanelBaseControl}(fairygui.Window);a.PanelBaseControl=u},{"../Control/ResDataControl":27,"../Control/ResourceControl":28,"../Data/ComponentEventData":30,"../PrefabControl/GamePool":47,"../PrefabControl/PanelResDic":48,"../View/ViewManager":70,"../utils/DispatcherManager":85,"../utils/ViewAction":93}],25:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../utils/DispatcherManager"),i=e("../PrefabControl/PanelResDic"),o=e("../Data/ComponentEventData"),r=e("../PrefabControl/GamePool"),s=function(e){function PanelChildControl(){var t=e.call(this)||this;return t.EventResDic={},t.EventGlobal={},t.DIALOG_WIDTH=220,t.DIALOG_HEIGHT=275,t.CLOSE_BTN_WIDTH=43,t.CLOSE_BTN_PADDING=5,t}return __extends(PanelChildControl,e),PanelChildControl.prototype.ClearEvent=function(){if(this.EventResDic){var e,t,a,n,i=this.EventResDic;for(e in i){if((t=i[e])&&t.length>0)for(a=0,a=t.length-1;a>=0;a--)(n=t[a])&&(n.target&&n.target.off(n.type,n.thisObject,n.listener),n.clear()),t.splice(a,1);delete this.EventResDic[e]}}this.EventResDic={}},PanelChildControl.prototype.dispose=function(){this.ClearGlobalEvent(),this.ClearEvent(),e.prototype.dispose.call(this)},PanelChildControl.prototype.constructFromXML=function(t){for(var a in e.prototype.constructFromXML.call(this,t),this._children){var n=this._children[a];this[n.name]=n}this.onInit()},PanelChildControl.prototype.onInit=function(){},PanelChildControl.prototype.getProxy=function(e){return i.PanelResDic.Instance.getSingleTon(e)},PanelChildControl.prototype.dispacheDatatrigger=function(e,t){void 0===t&&(t=null),n.DispatcherManager.dispatchEvent(e,t)},PanelChildControl.prototype.hasDataEvent=function(e){return n.DispatcherManager.hasEventListener(e)},PanelChildControl.prototype.AddEventData=function(e,t,a){if(!this.EventGlobal.hasOwnProperty(e)){var i=r.GamePool.GetItem(o.ComponentEventData.ResDicValue);this.EventGlobal[e]=i,i.type=e,i.thisObject=t,i.listener=a,n.DispatcherManager.addEventListener(e,t,a)}},PanelChildControl.prototype.onSkinLoadComplete=function(){var e=new Laya.Dialog,t=new Laya.Image(this.assets[0]);e.addChild(t);var a=new Laya.Button(this.assets[1]);a.pos(this.DIALOG_WIDTH-this.CLOSE_BTN_WIDTH-this.CLOSE_BTN_PADDING,this.CLOSE_BTN_PADDING),e.addChild(a),e.dragArea="0,0,"+this.DIALOG_WIDTH+","+this.DIALOG_HEIGHT,e.show()},PanelChildControl.prototype.removeDataEvent=function(e,t,a){if(this.EventGlobal[e]){var i=this.EventGlobal[e];n.DispatcherManager.removeEventListener(e,t,a),i.clear(),delete this.EventGlobal[e]}},PanelChildControl.prototype.AddEventByType=function(e,t,a,n,i){if(void 0===i&&(i=null),e){if(null==e.name||""==e.name)throw"childbaseview addListener target.name is null";var s=r.GamePool.GetItem(o.ComponentEventData.ResDicValue);s.target=e,s.type=t,s.thisObject=a,s.listener=n,this.EventResDic.hasOwnProperty(e.name)||(this.EventResDic[e.name]=[]),this.JudgeIsHaveEvent(e,t)||(e.on(t,a,n,i),this.EventResDic[e.name].push(s))}},PanelChildControl.prototype.JudgeIsHaveEvent=function(e,t){var a,n;for(var i in a=this.EventResDic[e.name])if((n=a[i])&&n.type==t)return!0;return!1},PanelChildControl.prototype.ClearEventByType=function(e,t,a,n){if(e&&this.EventResDic[e.name])for(var i,o=this.EventResDic[e.name],r=0,s=o.length;r0){var a=this.Sprite3DDic[t][0];return a&&!a.destroyed||(a=Laya.Sprite3D.instantiate(e)),this.Sprite3DDic[t].splice(0,1),a.transform.scale=e.transform.scale.clone(),a.active=!0,a}var n;return(n=Laya.Sprite3D.instantiate(e)).active=!0,n}return(n=Laya.Sprite3D.instantiate(e)).active=!0,n},PoolManager.RecoverSprite3D=function(e,t){if(void 0===t&&(t=!1),e)if(e.destroyed)console.warn("PoolManager Recover Error!","destroyed");else if(t||0!=e.active){var a=e.name;if(null!=this.Sprite3DDic[a]&&null!=this.Sprite3DDic[a]){var n=this.Sprite3DDic[a];if(n.length>this.PoolSize)return void e.destroy();n.push(e)}else(n=[]).push(e),this.Sprite3DDic[a]=n;e.transform.position=new Laya.Vector3(0,0,-100),e.removeSelf(),e.active=!1}else console.warn("PoolManager Recover Error!",e.name);else console.warn("PoolManager Recover Error!",null)},PoolManager.ClearPool=function(){for(var e in this.Sprite3DDic)for(var t=this.Sprite3DDic[e],a=0;athis.CheckInterval){if(n.ResourceControl.Instance.running)return void(this._time-=1e3);this.RefreshGroupRes(),this._time=0}},ResDataControl.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)},ResDataControl.prototype.ClearLiveDataByPackName=function(e){this.packageRes[e]&&(this.packageRes[e].clear(),delete this.packageRes[e])},ResDataControl.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.subpacksgeui+e,e):fairygui.UIPackage.addPackage(r.AssetPath.resources+r.AssetPath.ui+e,e)),this.AddLocalLiveData(e,a)},ResDataControl.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--}},ResDataControl.prototype.RefreshGroupRes=function(){var e,t,a=Laya.Browser.now();if(this.packageRes)for(e in this.packageRes)(t=this.packageRes[e]).ref<=0&&a-t.time>this.ClearInterval&&(this.ClearPackByName(t.packageName,!0),this.ClearLiveDataByPackName(t.packageName));if(this.urlRes){var n=this.urlRes;for(e in n)n[e]<=0&&this.RemoveResourcesByurl(e,!0)}},ResDataControl.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"},ResDataControl.prototype.createTab=function(e){var t=new l;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},ResDataControl.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)},ResDataControl.prototype.AddLocalLiveData=function(e,t){var a;t&&!this.NoLiveData.hasOwnProperty(e)&&(this.packageRes.hasOwnProperty(e)?a=this.packageRes[e]:((a=o.GamePool.GetItem(i.LocalData.ResDicValue)).packageName=e,this.packageRes[e]=a),a.ref++,a.time=Laya.Browser.now())},ResDataControl}();a.ResDataControl=c},{"../Config/AssetPath":15,"../Data/LocalData":32,"../PrefabControl/GamePool":47,"../Time/TimerService":59,"./ResourceControl":28}],28:[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 ResourceControl(){var t=e.call(this)||this;return t._groupIndex=0,t.running=!1,t._loadNum=0,t._loadedNum=0,t._preloadNum=0,t._cut=0,t._nowLoadArr=null,ResourceControl.ins=t,t}return __extends(ResourceControl,e),Object.defineProperty(ResourceControl,"Instance",{get:function(){return null==ResourceControl.ins?new ResourceControl:ResourceControl.ins},enumerable:!0,configurable:!0}),ResourceControl.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)},ResourceControl.prototype.onLoadConfigComplete=function(){null!=this._onConfigCompleteTarget&&null!=this._onConfigComplete&&this._onConfigComplete.call(this._onConfigCompleteTarget)},ResourceControl.prototype.errorsMsghandler=function(e){i.DispatcherManager.dispatchEvent("loadfailEvent",e)},ResourceControl.prototype.gameerrorsMsghandler=function(e){i.DispatcherManager.dispatchEvent("gameserrosEvent",e)},ResourceControl.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()},ResourceControl.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()},ResourceControl.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()},ResourceControl.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()},ResourceControl.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())},ResourceControl.prototype.loadStart1=function(){if(!this.running)if(this._nowLoadArr&&this._nowLoadArr.length>0){var e;this.running=!0,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()},ResourceControl.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))}},ResourceControl.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)},ResourceControl.prototype.loadStart=function(){if(!this.running&&0!=this._configs.length){this.running=!0,this._nowLoadData=this._configs[0];var e=this._nowLoadData.urls;this._nowLoadData.isShow&&fairygui.GRoot.inst.showModalWait();var t=this._nowLoadData.resouseType;null!=e&&("2D"==t||null==t?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)))}},ResourceControl.prototype.onLoading=function(e){this._nowLoadData&&(e=Math.ceil(Number(100*e)),null!=this._nowLoadData.progress&&this._nowLoadData.progress.call(this._nowLoadData.completeTarget,e))},ResourceControl.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()},ResourceControl.prototype.onError=function(e){fairygui.GRoot.inst.closeModalWait()},ResourceControl.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()},ResourceControl.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()},ResourceControl.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()},ResourceControl.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]))},ResourceControl}(Laya.EventDispatcher);a.ResourceControl=r},{"../Config/RecConfigs":16,"../utils/DispatcherManager":85}],29:[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"),l=e("../utils/DispatcherManager"),c=e("../utils/GameState"),h=e("../Agency/AgencyUserMessage"),u=e("../PrefabControl/PanelResDic"),p=e("../utils/GameUtils"),d=e("../CFG/NpcCFG"),m=e("../Game/NpcScript"),f=e("./ResourceControl"),g=e("../CFG/GameCFG"),y=e("../PrefabControl/CharacterState"),C=e("../Data/UserInfoEvent"),_=e("../PrefabControl/CharacterPool"),v=Laya.Sprite,w=Laya.Event,S=function(){function SceneControl(){this._initPosY=1,this.index=0,this.preRadian=0,SceneControl.ins=this}return Object.defineProperty(SceneControl,"Instance",{get:function(){return null==SceneControl.ins?new SceneControl:SceneControl.ins},enumerable:!0,configurable:!0}),SceneControl.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=_.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).RoleData,i=n.levelcfg.roleinitpos,o=p.GameUtils.cutstrtoArr(i.offsetPos),l=new Laya.Vector3(Number(o[0]),Number(o[1]),Number(o[2])),c=new Laya.Vector3;if("startpanel"==i.initbuild)c.x=r.PropManager.startPlane.transform.position.x+l.x,c.y=r.PropManager.startPlane.transform.position.y+l.y,c.z=r.PropManager.startPlane.transform.position.z+l.z,a=r.PropManager.startPlane.getChildByName("child_pos").transform.position;else{var d=r.PropManager.getPosVecbyScene(n.levelmapArr[0],i.initbuild);c.x=d.x+l.x,c.y=d.y+l.y,c.z=d.z+l.z,a=d}r.PropManager.mainRole.transform.position=c,this.cameraScript.SetCameraPosition(r.PropManager.mainRole.transform.position),this.PlayerScript.setnowSelectVec(a),this.PlayerScript.nowAction=y.CharacterState.stand,this.PlayerScript.PlayAnimator(y.CharacterState.stand)},SceneControl.prototype.createNpc=function(){console.log("CreatNpc---"),this.ClearNpc();var e,t=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage).RoleData.levelcfg.npc,a=0;for(var n in r.PropManager.npcnum=t.length,t){e=t[n];var o=null,s=d.default.dict[e.id],l=(Laya.Loader.getRes(i.AssetPath.get3DRoleModel(s.name)),p.GameUtils.cutstrtoArr(e.offsetPos)),c=new Laya.Vector3(Number(l[0]),Number(l[1]),Number(l[2])),f=new Laya.Vector3;if("startpanel"==e.scene)f.x=r.PropManager.startPlane.transform.position.x+c.x,f.y=r.PropManager.startPlane.transform.position.y+1+c.y,f.z=r.PropManager.startPlane.transform.position.z+c.z,o=r.PropManager.startPlane.getChildByName("child_pos").transform.position;else{var g=r.PropManager.getPosVecbyScene(e.scene,e.initbuild);f.x=g.x+c.x,f.y=g.y+c.y,f.z=g.z+c.z,o=g}var C=_.CharacterPool.AddCharacter(s.name,m.NpcScript,r.PropManager.scene3D);C.name="npc_"+a,C.transform.position=f;var v=C.getComponent(m.NpcScript);v.setnowSelectVec(o),v.npcinfo(s),r.PropManager.npcDict[C.name]=C,r.PropManager.npcscriptDict[C.name]=v,v.PlayAnimator(y.CharacterState.stand),a++}console.log("CreatNpc2---")},SceneControl.prototype.ShowUI=function(e){var t=e.transform.position,a=new Laya.Text;p.GameUtils.randRangeint(1,30);a.text="npc_"+this.index,a.fontSize=60,a.color="#ffffff",a.scaleX=.5,a.scaleY=.5,a.align="center",a.valign="middle",Laya.stage.addChild(a),Laya.timer.frameLoop(1,this,function(){var e=new Laya.Vector3;r.PropManager.carma.worldToViewportPoint(t,e),a.pos(e.x,e.y+20)}),this.index++},SceneControl.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;oa.transform.position.y&&(r.PropManager.diePosY=a.transform.position.y),s++;for(s=0;n.getChildByName("build_front_"+s);)t=(a=n.getChildByName("build_front_"+s)).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);)t=(a=n.getChildByName("build_left_"+s)).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);)t=(a=n.getChildByName("build_right_"+s)).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);)t=(a=n.getChildByName("build_frontleft_"+s)).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);)t=(a=n.getChildByName("build_frontright_"+s)).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);)t=(a=n.getChildByName("build_leftright_"+s)).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 l,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 p=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage).RoleData.LevelID<3;c.getChildByName("JumpBoost_"+s);){if(l=c.getChildByName("JumpBoost_"+s),p){var d=l.transform.position.clone();d.y+=3;var m=Laya.Sprite3D.instantiate(Laya.loader.getRes(i.AssetPath.get3DRoleModel("Arrow")),r.PropManager.scene3D,!1,d);r.PropManager.jiantouArr.push(m)}s++}r.PropManager.patternDict[e.name]=o,console.log("Pattern2----")},SceneControl.prototype.onSpriteClick=function(e){Math.random()},SceneControl.prototype.onRotate=function(e){Laya.Tween.to(this.sp,{rotation:e},1e3,Laya.Ease.elasticOut)},SceneControl.prototype.RefreshCharacterModel=function(){var e=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage).RoleData,t=[];t.push({url:i.AssetPath.get3DRoleModel(e.roleCfg.name)}),f.ResourceControl.Instance.loader3DArr(t,this,this.CharacterLoadEnd,null,!0,i.AssetPath.get3DModel(e.roleCfg.name))},SceneControl.prototype.RefreshTerrain=function(){var e,t,a,n=u.PanelResDic.Instance.getSingleTon(h.AgencyUserMessage).RoleData,o=n.levelcfg,s=n.levelmapArr;for(var l in r.PropManager.nowmapDict)r.PropManager.nowmapDict[l].active=!1;for(var c=0;ca){var o=(e-a)%(a-2);t=0==o?a:o+2}else t=e;this.levelcfg=l.default.dict[t],this.levelmapArr=c.GameUtils.cutstrtoArr(this.levelcfg.road),n.DispatcherManager.dispatchEvent(i.UserInfoEvent.userinfoEvent_levelid)},RoleData.prototype.play=function(){this.mCurrIndex++,this.mCurrIndex>=this.mArmature.getAnimNum()&&(this.mCurrIndex=0),this.mArmature.play(this.mCurrIndex,!1)},RoleData.prototype.onEvent=function(e){Laya.stage.addChild(this.mLabelSprite),this.mLabelSprite.x=this.mStartX,this.mLabelSprite.y=this.mStartY,this.mLabelSprite.graphics.clear()},RoleData.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(RoleData.prototype,"LevelID",{get:function(){return this._leveid},enumerable:!0,configurable:!0}),Object.defineProperty(RoleData.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(RoleData.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}),RoleData}(h.DataInfoBase);a.RoleData=d},{"../CFG/LevelCFG":11,"../CFG/RoleCFG":14,"../Control/LocalDataControl":23,"../Data/UserDataInfo":35,"../Data/UserInfoEvent":36,"../utils/DispatcherManager":85,"../utils/GameUtils":87,"./DataInfoBase":31}],34:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function SkinData(){this.state=0,this.hasnum=0}return SkinData.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)},SkinData}();a.SkinData=n},{}],35:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=Laya.Event,i=function(){function UserDataInfo(){}return UserDataInfo.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)},UserDataInfo.prototype.onDecreaseAlpha1=function(e){this.button1.off(n.CLICK,this,this.onDecreaseAlpha1),Laya.timer.once(3e3,this,this.onComplete1)},UserDataInfo.prototype.onDecreaseAlpha2=function(e){this.button2.off(n.CLICK,this,this.onDecreaseAlpha2),Laya.timer.frameOnce(60,this,this.onComplete2)},UserDataInfo.prototype.onComplete1=function(){this.button1.alpha-=.5},UserDataInfo.prototype.onComplete2=function(){this.button2.alpha-=.5},UserDataInfo.lasttime="lasttime",UserDataInfo.caplastflushtime="captime",UserDataInfo.capstorageappids="capappids",UserDataInfo.hasgetappids="hasgetappids",UserDataInfo.roleData="roleData",UserDataInfo.gold="gold",UserDataInfo.roleid="roleid",UserDataInfo.levelid="levelid",UserDataInfo.skin="skin",UserDataInfo.lastDay="lastDay",UserDataInfo.nowdayShare="dayshare",UserDataInfo.nowdayVideo="dayvideo",UserDataInfo}();a.UserDataInfo=i},{}],36:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function UserInfoEvent(){}return UserInfoEvent.UserInfoEvent_updateUserData="UserInfoEvent_updateUserData",UserInfoEvent.userinfoEvent_updateroleid="userinfoEvent_updateroleid",UserInfoEvent.userinfoEvent_levelid="userinfoEvent_levelid",UserInfoEvent.updatePlayerInfo="UserInfoEvent_updatePlayerInfo",UserInfoEvent}();a.UserInfoEvent=n},{}],37:[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"),l=e("./Time/TimesTamper"),c=e("./Config/AssetPath"),h=e("./Time/TimerService"),u=e("./GlobalWaiting"),p=e("./Control/PanelBaseControl"),d=e("./PrefabControl/GamePool"),m=e("./Control/LayoutControl"),f=e("./View/ViewManager"),g=e("./Control/ResourceControl"),y=e("./Control/ResDataControl"),C=e("./Control/AudioControl"),_=e("./Control/ConnectControl"),v=e("./WXSDK/pingtaiutils"),w=e("./Agency/AgencyLogin"),S=e("./Agency/AgencyUserMessage"),P=e("./Agency/AgencyMain"),b=e("./Agency/AgencyInGame"),A=e("./Agency/AgencySkin"),L=e("./Agency/AgencyTrial"),D=e("./Agency/AgencyLottery"),G=function(e){function GameContents(){return e.call(this)||this}return __extends(GameContents,e),GameContents.prototype.initGame=function(){s.RecConfigs.Instance.init(),o.DispatcherManager.init(),h.TimerService.Instance.init(),m.LayoutControl.Instance.initlayer(),f.ViewManager.Instance.init(),g.ResourceControl.Instance.init(),y.ResDataControl.Instance.init(),C.AudioControl.Instance.init(),_.ConnectControl.Connnect(),l.TimesTamper.Instance.init(),v.pingtaiutils.Instance.init(),this.initPoolObject(),this.initProxy(),this.initmapView(),this.beginLoadHandler()},GameContents.prototype.initPoolObject=function(){d.GamePool.Mark(r.ComponentEventData.ResDicValue,r.ComponentEventData)},GameContents.prototype.initProxy=function(){var e=i.PanelResDic.Instance;e.AgencyAdd(w.AgencyLogin),e.AgencyAdd(S.AgencyUserMessage),e.AgencyAdd(P.AgencyMain),e.AgencyAdd(b.AgencyInGame),e.AgencyAdd(A.AgencySkin),e.AgencyAdd(L.AgencyTrial),e.AgencyAdd(D.AgencyLottery)},GameContents.prototype.initmapView=function(){i.PanelResDic.Instance},GameContents.prototype.beginLoadHandler=function(){var e=[];e.push({url:c.AssetPath.getResConfig(),type:Laya.Loader.JSON}),e.push({url:c.AssetPath.getGameVersion(),type:Laya.Loader.JSON}),g.ResourceControl.Instance.Loaders(e,this,this.recloadComplete)},GameContents.prototype.recloadComplete=function(){var e=y.ResDataControl.Instance.GainResources(c.AssetPath.getGameVersion(),!1);n.Global.gameVersion=e?e.version:"1.0.0";var t=y.ResDataControl.Instance.GainResources(c.AssetPath.getResConfig(),!1);s.RecConfigs.Instance.initRec(t),g.ResourceControl.Instance.loadGroup("loading",this,this.onPreLoaded,this.onPreprogress)},GameContents.prototype.onPreprogress=function(e){},GameContents.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()},GameContents.prototype.Login=function(){i.PanelResDic.Instance.getSingleTon(w.AgencyLogin).Login()},GameContents}(Laya.EventDispatcher);a.GameContents=G},{"./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":18,"./Control/ConnectControl":19,"./Control/LayoutControl":22,"./Control/PanelBaseControl":24,"./Control/ResDataControl":27,"./Control/ResourceControl":28,"./Data/ComponentEventData":30,"./Global":41,"./GlobalWaiting":42,"./PrefabControl/GamePool":47,"./PrefabControl/PanelResDic":48,"./Time/TimerService":59,"./Time/TimesTamper":60,"./View/ViewManager":70,"./WXSDK/pingtaiutils":82,"./utils/DispatcherManager":85}],38:[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,l=Laya.Point,c=Laya.Rectangle,h=Laya.Handler,u=function(e){function CameraManager(){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(CameraManager,e),CameraManager.prototype.onAwake=function(){this.camera=this.owner,this._toVec=new Laya.Vector3,this.camera.fieldOfView=90},CameraManager.prototype.onStart=function(){this._transform=this.camera.transform,this._transform.rotate(new Laya.Vector3(0,0,0),!0,!1)},CameraManager.prototype.createMap=function(){this.tiledMap=new s,this.tiledMap.createMap("res/tiledMap/isometric_grass_and_water.json",new c(0,0,Laya.stage.width,Laya.stage.height),h.create(this,this.mapLoaded),null,new l(1600,800))},CameraManager.prototype.onStageClick=function(){var e=new l(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)},CameraManager.prototype.mapLoaded=function(){this.layer=this.tiledMap.getLayerByIndex(0);var e=32*Math.tan(180/Math.PI*30);this.sprite=new r,this.sprite.graphics.drawLine(0,0,-32,e,"#FF7F50"),this.sprite.graphics.drawLine(0,0,32,e,"#FF7F50"),this.sprite.graphics.drawLine(-32,e,0,2*e,"#FF7F50"),this.sprite.graphics.drawLine(32,e,0,2*e,"#FF7F50"),Laya.stage.addChild(this.sprite)},CameraManager.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)))},CameraManager.prototype.GameEndRotate=function(e,t){this.iscanfollow=!1,this._transform.translate(t,!1),this._transform.lookAt(e,this._upvec)},CameraManager.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},CameraManager}(Laya.Script3D);a.CameraManager=u},{"../CFG/GameCFG":10,"../PrefabControl/PropManager":49,"../utils/GameUtils":87}],39:[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"),l=e("../utils/DispatcherManager"),c=e("../utils/GameState"),h=e("../utils/GameUtils"),u=e("../Control/AssetManager"),p=e("../Control/PoolManager"),d=function(e){function NpcScript(){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.NowLastActionState="",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(NpcScript,e),NpcScript.prototype.onAwake=function(){this._animator=this.owner.getComponent(Laya.Animator),i.PropManager.setAnimator(this._animator)},NpcScript.prototype.onStart=function(){this._speedMoveV3=new Laya.Vector3(0,0,0),this._transform=this.owner.transform;var e=this.owner,t=e.getChildByName("lefttrail"),a=e.getChildByName("righttrail");console.log();var n=h.GameUtils.randRangeint(0,u.AssetManager.AllMapDic.length-1);n%=u.AssetManager.AllMapDic.length;var i=u.AssetManager.AllMapDic[n];this.LeftTrial=p.default.GetSprite3D(i),t.parent.addChild(this.LeftTrial),this.LeftTrial.transform.localPosition=t.transform.localPosition.clone(),this.LeftTrial.transform.localRotationEuler=t.transform.localRotationEuler.clone(),this.LeftTrial.transform.localScale=new Laya.Vector3(.001,.001,.001),this.RightTrial=p.default.GetSprite3D(i),a.parent.addChild(this.RightTrial),this.RightTrial.transform.localPosition=a.transform.localPosition.clone(),this.RightTrial.transform.localRotationEuler=a.transform.localRotationEuler.clone(),this.RightTrial.transform.localScale=new Laya.Vector3(.001,.001,.001),a.active=!1,t.active=!1,console.log(e.name)},NpcScript.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)},NpcScript.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))},NpcScript.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)}},NpcScript.prototype.setnowSelectVec=function(e){this._nowselectVec=e},NpcScript.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())}},NpcScript.prototype.onCollisionStay=function(e){if(e&&e.contacts&&e.contacts.length>0&&e.other){this.haveCollision=!0;e.contacts[0];var t=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))}},NpcScript.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)}},NpcScript.prototype.CheckEnd=function(e,t){if("SliderBoost"!=t.name&&-1==t.name.indexOf("npc")&&-1==t.name.indexOf("role"))if(this.HaveForceJump)this.HaveForceJump=!1;else if(this._lockxstate)this._lockxstate=0;else 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:case o.CharacterState.run:this.JumpAction(this._changeMoveX);break;case o.CharacterState.MoveX:this.JumpAction(this._speedMoveV3.x)}},NpcScript.prototype.JumpAction=function(e,t){if(void 0===t&&(t=!1),e>0)this.nowAction=o.CharacterState.jumpright;else if(e<0)this.nowAction=o.CharacterState.jumpleft;else if(t)if(-1!=this._TargetCollision.indexOf("build")){var a=h.GameUtils.randRangeint(0,100),n=0,i="";switch(-1!=this._TargetCollision.indexOf("leftright")?(n=this._nowNpcinfo.jump_left+this._nowNpcinfo.jump_right,i=(a=h.GameUtils.randRangeint(0,n))<=this._nowNpcinfo.jump_left?"left":"right"):-1!=this._TargetCollision.indexOf("frontright")?(n=this._nowNpcinfo.start_ahead+this._nowNpcinfo.jump_right,i=(a=h.GameUtils.randRangeint(0,n))<=this._nowNpcinfo.start_ahead?"front":"right"):-1!=this._TargetCollision.indexOf("frontleft")?(n=this._nowNpcinfo.start_ahead+this._nowNpcinfo.jump_left,i=(a=h.GameUtils.randRangeint(0,n))<=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,i=(a=h.GameUtils.randRangeint(0,n))<=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":default:this.nowAction=o.CharacterState.jump}}else this.nowAction=o.CharacterState.jump;else this.nowAction=o.CharacterState.jump},Object.defineProperty(NpcScript.prototype,"nowAction",{get:function(){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,h.GameUtils.randRangeint(0,100)<50?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 t=r.default.dict.panel_jump;this.jumpSpeed.x=t.buffx,this.jumpSpeed.y=t.buffy,this.LastAction==o.CharacterState.speedupjump?this.jumpSpeed.z=this.jumpSpeed.z*t.buffz:this.jumpSpeed.z=this._speedMoveV3.z*t.buffz,this.NowLastActionState==e?this.jumpSpeed.y=2*t.buffy:this.jumpSpeed.y=t.buffy,this._isActionNums=!0,this._isneedactionnum=1,h.GameUtils.randRangeint(0,100)<50?this.PlayAnimator(o.CharacterState.highjump1):this.PlayAnimator(o.CharacterState.highjump2);break;case o.CharacterState.downmove:t=r.default.dict.panel_downslip;this.jumpSpeed.x=t.buffx,this.jumpSpeed.y=t.buffy,this.jumpSpeed.z=this._speedMoveV3.z*t.buffz,this._chixuTime=t.time,this._isActionNums=!0,this._isneedactionnum=1,this.PlayAnimator(o.CharacterState.huachan);break;case o.CharacterState.cross:t=r.default.dict.box_Surmount;this.jumpSpeed.x=t.buffx,this.jumpSpeed.y=t.buffy+.5,this.jumpSpeed.z=this._speedMoveV3.z*t.buffz,this._chixuTime=t.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)}this.NowLastActionState=e}},enumerable:!0,configurable:!0}),NpcScript.prototype.update=function(e){if(1==this._nowRoleState)if(16,this._checktime+=16,i.PropManager.iscarmanpc||this._checktime>=500&&(this._checktime=0,this._nowNpcinfo&&i.PropManager.mainRole&&(this._transform.position.z+this._nowNpcinfo.distance0?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: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.y0?this.nowAction=o.CharacterState.jumpright:this._changeMoveX<0?this.nowAction=o.CharacterState.jumpleft:this.nowAction=o.CharacterState.jump),this._transform.position.y0){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){t=.016;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))}},NpcScript.prototype.GameOver=function(){this._ending=!1,n.TimerService.Instance.removeUpdateTarget(this),l.DispatcherManager.dispatchEvent(c.GameState.end)},NpcScript.prototype.Win=function(){n.TimerService.Instance.removeUpdateTarget(this),this._nowRoleState=2,this.PlayAnimator(o.CharacterState.sky),l.DispatcherManager.dispatchEvent(c.GameState.npcend,this.owner.name)},NpcScript.prototype.stop=function(){n.TimerService.Instance.removeUpdateTarget(this)},NpcScript.prototype.destroy=function(){n.TimerService.Instance.removeUpdateTarget(this),e.prototype.destroy.call(this)},NpcScript.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)},NpcScript.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))},NpcScript.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"}},NpcScript.prototype.TestJump=function(){this.nowAction=o.CharacterState.jump},NpcScript.prototype.getPostion=function(){return this._transform.position},NpcScript.prototype.getAction=function(){return this._nowRoleState},NpcScript.prototype.onDestroy=function(){console.log("拖尾回收成功----"),p.default.RecoverSprite3D(this.LeftTrial),p.default.RecoverSprite3D(this.RightTrial)},NpcScript}(Laya.Script3D);a.NpcScript=d},{"../CFG/BuildCFG":9,"../Control/AssetManager":17,"../Control/PoolManager":26,"../PrefabControl/CharacterState":46,"../PrefabControl/PropManager":49,"../Time/TimerService":59,"../utils/DispatcherManager":85,"../utils/GameState":86,"../utils/GameUtils":87,"./CameraManager":38}],40:[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"),l=e("../CFG/BuildCFG"),c=e("./CameraManager"),h=e("../utils/DispatcherManager"),u=e("../utils/GameState"),p=e("../utils/GameUtils"),d=e("../Control/GameStateControl"),m=e("../Control/AudioControl"),f=e("../WXSDK/WXGamePlatform"),g=e("../WXSDK/PlayerAccount"),y=e("../Control/AssetManager"),C=e("../Control/PoolManager"),_=function(e){function Player(){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.NowLastActionState="",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,Player.ins=t,t}return __extends(Player,e),Object.defineProperty(Player,"Instance",{get:function(){return null==Player.ins?new Player:Player.ins},enumerable:!0,configurable:!0}),Player.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;var t=e.getChildByName("lefttrail"),a=e.getChildByName("righttrail"),n=p.GameUtils.randRangeint(0,y.AssetManager.AllMapDic.length-1);n%=y.AssetManager.AllMapDic.length;var o=y.AssetManager.AllMapDic[n];this.LeftTrial=C.default.GetSprite3D(o),t.parent.addChild(this.LeftTrial),this.LeftTrial.transform.localPosition=t.transform.localPosition.clone(),this.LeftTrial.transform.localRotationEuler=t.transform.localRotationEuler.clone(),this.LeftTrial.transform.localScale=t.transform.localScale.clone(),this.LeftTrial.transform.localScale=new Laya.Vector3(.001,.001,.001),this.RightTrial=C.default.GetSprite3D(o),a.parent.addChild(this.RightTrial),this.RightTrial.transform.localPosition=a.transform.localPosition.clone(),this.RightTrial.transform.localRotationEuler=a.transform.localRotationEuler.clone(),this.RightTrial.transform.localScale=new Laya.Vector3(.001,.001,.001),a.active=!1,t.active=!1},Player.prototype.startRun=function(e){var t=this;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(),console.log("玩家的初始位置----",this._initPosVec),this._nowbuildname="",this._nowscenename="",this.nowAction=o.CharacterState.run,this._speedMoveV3.x=0,this._speedMoveV3.y=0,e?(this._speedMoveV3.z=2*-this._RoleData.movespeed,Laya.timer.once(3e3,this,function(){t._speedMoveV3.z=-t._RoleData.movespeed})):this._speedMoveV3.z=-this._RoleData.movespeed,this._iscanMove=!0,n.TimerService.Instance.addUpdateTarget(this)},Player.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)}},Player.prototype.onCollisionStay=function(e){if(e&&e.contacts&&e.contacts.length>0&&e.other){this._isColling=!0;e.contacts[0];var t=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))}},Player.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)}},Player.prototype.CheckEnd=function(e,t){if("SliderBoost"!=t.name&&-1==t.name.indexOf("npc"))if(this.isforceJump)this.isforceJump=!1;else if(this._lockxstate)this._lockxstate=0;else 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:case o.CharacterState.run:this.JumpAction(this._changeMoveX);break;case o.CharacterState.MoveX:this.JumpAction(this._speedMoveV3.x)}},Player.prototype.setnowSelectVec=function(e){this._nowselectVec=e},Player.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())}},Player.prototype.JumpAction=function(e){this.nowAction=e>0?o.CharacterState.jumpright:e<0?o.CharacterState.jumpleft:o.CharacterState.jump},Player.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))},Player.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(Player.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,p.GameUtils.randRangeint(0,100)<50?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,m.AudioControl.Instance.playGameSound("tiao"),f.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),m.AudioControl.Instance.playGameSound("tiao"),f.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),m.AudioControl.Instance.playGameSound("tiao"),f.WXGamePlatform.Instance.vibrateShort();break;case o.CharacterState.speedupjump:var t=l.default.dict.panel_jump;this.buff_speeduptime>0?(this._multiple.x=1,this._multiple.y=1,this._multiple.z=t.buffz*t.buffz,this.doublespeedup=!0):(this._multiple.x=1,this._multiple.y=1,this._multiple.z=t.buffz),this.buff_speeduptime=t.time,this.jumpSpeed.x=t.buffx*this._multiple.x,this.NowLastActionState==e?this.jumpSpeed.y=2*t.buffy:this.jumpSpeed.y=t.buffy,this.jumpSpeed.y=t.buffy,this.jumpSpeed.z=this._speedMoveV3.z*t.buffz*this._multiple.z,this._isActionNums=!0,this._isneedactionnum=1,p.GameUtils.randRangeint(0,100)<50?this.PlayAnimator(o.CharacterState.highjump1):this.PlayAnimator(o.CharacterState.highjump2),m.AudioControl.Instance.playGameSound("tiao"),Laya.timer.clear(this,this.playspeedSound),Laya.timer.once(200,this,this.playspeedSound),f.WXGamePlatform.Instance.vibrateShort();break;case o.CharacterState.downmove:t=l.default.dict.panel_downslip;this.buff_speeduptime>0?(this._multiple.x=1,this._multiple.y=1,this._multiple.z=t.buffz*t.buffz,this.doublespeedup=!0):(this._multiple.x=1,this._multiple.y=1,this._multiple.z=t.buffz),this.buff_speeduptime=t.time,this.jumpSpeed.x=t.buffx*this._multiple.x,this.jumpSpeed.y=t.buffy*this._multiple.y,this.jumpSpeed.z=this._speedMoveV3.z*t.buffz*this._multiple.z,this._isActionNums=!0,this._isneedactionnum=1,this.PlayAnimator(o.CharacterState.huachan),this.playspeedSound(),f.WXGamePlatform.Instance.vibrateShort();break;case o.CharacterState.sidespeedup:t=l.default.dict.box_sidejump;this.buff_speeduptime>0?(this._multiple.x=1,this._multiple.y=1,this._multiple.z=t.buffz*t.buffz,this.doublespeedup=!0):(this._multiple.x=1,this._multiple.y=1,this._multiple.z=t.buffz),this.buff_speeduptime=t.time,this.jumpSpeed.x=t.buffx*this._multiple.x,this.jumpSpeed.y=t.buffy*this._multiple.y,this.jumpSpeed.z=this._speedMoveV3.z*t.buffz*this._multiple.z,this._isActionNums=!1,this.playspeedSound(),f.WXGamePlatform.Instance.vibrateShort();break;case o.CharacterState.cross:t=l.default.dict.box_Surmount;this.buff_speeduptime>0?(this._multiple.x=1,this._multiple.y=1,this._multiple.z=t.buffz*t.buffz,this.doublespeedup=!0):(this._multiple.x=1,this._multiple.y=1,this._multiple.z=t.buffz),this.buff_speeduptime=t.time,this.jumpSpeed.x=t.buffx*this._multiple.x,this.jumpSpeed.y=(t.buffy+.5)*this._multiple.y,this.jumpSpeed.z=this._speedMoveV3.z*t.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),f.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)}this.NowLastActionState=e}},enumerable:!0,configurable:!0}),Player.prototype.playspeedSound=function(){m.AudioControl.Instance.playGameSound("speedup")},Player.prototype.ChangeTrial=function(e){this.LeftTrial&&this.RightTrial&&this.LeftTrial.active!=e&&(this.LeftTrial.active=e,this.RightTrial.active=e)},Player.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}},Player.prototype.update=function(e){if(16,this._iscanMove){var t=.016;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: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.y0?this.nowAction=o.CharacterState.jumpright:this._changeMoveX<0?this.nowAction=o.CharacterState.jumpleft:this.nowAction=o.CharacterState.jump),this._transform.position.y0?this.Revive():this.Lose(),this.nowAction=o.CharacterState.stand),this._transform.position.z0){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: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,f.WXGamePlatform.Instance.vibrateShort()))}else if(this._ending){t=.016;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(c.CameraManager).GameEndRotate(this._transform.position,this._endAnmoSpeed1))}},Player.prototype.Win=function(){m.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)},Player.prototype.Revive=function(){m.AudioControl.Instance.playGameSound("over"),u.GameState.isdie=!0,h.DispatcherManager.dispatchEvent(u.GameState.revive),this._iscanMove=!1,this.PlayAnimator(o.CharacterState.stand)},Player.prototype.Lose=function(){m.AudioControl.Instance.playGameSound("over"),u.GameState.isdie=!0,h.DispatcherManager.dispatchEvent(u.GameState.lose),this._iscanMove=!1,this.PlayAnimator(o.CharacterState.stand),this._ending=!0},Player.prototype.GameOver=function(){this._ending=!1,n.TimerService.Instance.removeUpdateTarget(this)},Player.prototype.TestJump=function(){this.nowAction=o.CharacterState.jump},Player.prototype.destroy=function(){n.TimerService.Instance.removeUpdateTarget(this),e.prototype.destroy.call(this)},Player.prototype.XMove=function(e){this.nowAction==o.CharacterState.run&&(this._moveTime=0,this._speedMoveV3.x=20*e,this.nowAction=o.CharacterState.MoveX)},Player.prototype.dispose=function(){n.TimerService.Instance.removeUpdateTarget(this)},Player.prototype.onDestroy=function(){console.log("拖尾回收成功2222222----"),C.default.RecoverSprite3D(this.LeftTrial),C.default.RecoverSprite3D(this.RightTrial)},Player}(Laya.Script3D);a.Player=_},{"../Agency/AgencyUserMessage":8,"../CFG/BuildCFG":9,"../Control/AssetManager":17,"../Control/AudioControl":18,"../Control/GameStateControl":21,"../Control/PoolManager":26,"../PrefabControl/CharacterState":46,"../PrefabControl/PanelResDic":48,"../PrefabControl/PropManager":49,"../Time/TimerService":59,"../WXSDK/PlayerAccount":75,"../WXSDK/WXGamePlatform":81,"../utils/DispatcherManager":85,"../utils/GameState":86,"../utils/GameUtils":87,"./CameraManager":38}],41:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function Global(){}return Global.curHeight=function(){return Laya.stage.height},Global.curWidth=function(){return Laya.stage.width},Global.setVars=function(){Global.stage=Laya.stage,Global.sethttpurl()},Global.getUrl=function(e){return-1==e.indexOf("wxlocal")?Global.resourcehtttp+e+Global.versions:e},Global.sethttpurl=function(){Global.isdebug?Global.httpurl="https://wxgamedev.51yoyoyo.com/":Global.httpurl="https://minport.51yoyoyo.com/"},Global.httpurl="",Global.resourcehtttp="",Global.cdnurl="https://wxgame.51yoyoyo.com/",Global.versions="",Global.initWidth=720,Global.initHeight=1280,Global.resconfigVersion="",Global.nowplatfrom="",Global.appid="wx46f4626932e5f48b",Global.gameVersion="1.0.1",Global.isdebug=!1,Global.AppKeyID=0,Global.MemberID=0,Global}();a.Global=n},{}],42:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function GlobalWaiting(){var t=e.call(this)||this;return t._isforcehide=!1,t._lastTime=0,t}return __extends(GlobalWaiting,e),GlobalWaiting.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)},GlobalWaiting.prototype.onAddedToStage=function(){this._lastTime=Laya.Browser.now(),Laya.timer.frameLoop(1,this,this.onTimer)},GlobalWaiting.prototype.onTimer=function(){if(this.img_0)if((Laya.Browser.now()-this._lastTime)/1e3>=0){this._isforcehide||(this.img_0.visible=!0);var e=this.img_0.rotation;(e+=10)>360&&(e%=360),this.img_0.rotation=e}else this.img_0.visible=!1},GlobalWaiting.prototype.hideimg=function(){this._isforcehide=!0,this.img_0&&(this.img_0.visible=!1)},GlobalWaiting.prototype.onRemoveFromStage=function(){Laya.timer.clear(this,this.onTimer)},GlobalWaiting}(fairygui.GComponent);a.GlobalWaiting=n},{}],43:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function JoystickModule(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(JoystickModule,e),JoystickModule.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)}},JoystickModule.prototype.setEventCallback=function(e,t,a,n){this._callobj=e,this._downCallback=t,this._movecallback=a,this._updatecallback=n},JoystickModule.prototype.Trigger=function(e){this.onTouchDown(e)},JoystickModule.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))},JoystickModule.prototype.completeHandler=function(){console.log("地图创建完成"),console.log("ClientW:"+Laya.Browser.clientWidth+" ClientH:"+Laya.Browser.clientHeight)},JoystickModule.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))},JoystickModule.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},JoystickModule.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,l=r-this._startStageY,c=0;if(this._iscanCBack=n>=2||n<=-2,this.offx=n,0==s&&0==l)return;s>0?s>this.radius?(c=this.radius,this.angle=90):(c=this.radius-s,this.angle=90-c/this.radius*90):0==s?this.angle=0:-s>this.radius?(c=this.radius,this.angle=-90):(c=this.radius+s,this.angle=-(90-c/this.radius*90));var h=Math.atan2(l,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(l)>Math.abs(p)&&(l=p),(o=this._startStageX+s)<0&&(o=0),(r=this._startStageY+l)>fairygui.GRoot.inst.height&&(r=fairygui.GRoot.inst.height),this._button.x=o,this._button.y=r,this.dis=Math.sqrt(s*s+l*l),this._iacanCallback=!0,this._iscanCBack&&this._callobj&&this._movecallback&&this._iacanCallback&&this._movecallback.call(this._callobj,this.offx)}},JoystickModule.prototype.dispose=function(){this._clickpanel.off(Laya.Event.MOUSE_DOWN,this,this.onTouchDown)},JoystickModule.JoystickMoving="JoystickMoving",JoystickModule.JoystickUp="JoystickUp",JoystickModule}(Laya.EventDispatcher);a.JoystickModule=n},{}],44:[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");new(function(){function Main(){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.window.tt&&s.WxApi.CheckWXUpdate(),Laya.stage.on("resize",this,this.onResize)}return Main.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,(new r.GameContents).initGame()},Main}())},{"./Config/AssetPath":15,"./GameContents":37,"./Global":41,"./WXSDK/Sdk":77}],45:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Config/AssetPath"),i=function(){function CharacterPool(){}return CharacterPool.AddCharacter=function(e,t,a){var i,o=CharacterPool.roledict[e];if(o&&o.length>0)(i=o.shift()).active=!0,a.addChild(i);else{var r=Laya.Loader.getRes(n.AssetPath.get3DRoleModel(e));i=Laya.Sprite3D.instantiate(r,a,!1,new Laya.Vector3(0,0,0))}t&&(i.addComponent(t).resouseName=e);var s=new Laya.Quaternion;return Laya.Quaternion.createFromAxisAngle(new Laya.Vector3(0,1,0),180*Math.PI/180,s),i.transform.rotation=s,i},CharacterPool.ClearCharacter=function(e,t,a){CharacterPool.roledict[t]||(CharacterPool.roledict[t]=[]),a&&a.destroy(),e.active=!1,e.removeSelf(),CharacterPool.roledict[t].push(e)},CharacterPool.roledict={},CharacterPool}();a.CharacterPool=i},{"../Config/AssetPath":15}],46:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function CharacterState(){}return CharacterState.rollover1="rollover1",CharacterState.rollover2="rollover2",CharacterState.runwallleft="runwallleft",CharacterState.rightjump="rightjump",CharacterState.runwallright="runwallright",CharacterState.leftjump="leftjump",CharacterState.climbwall="climbwall",CharacterState.climbend="climbend",CharacterState.stand="stand",CharacterState.sky="sky",CharacterState.land1="land1",CharacterState.land2="land2",CharacterState.highjump1="highjump1",CharacterState.highjump2="highjump2",CharacterState.run="run",CharacterState.jump="jump",CharacterState.climbup="climbup",CharacterState.falldown="falldown",CharacterState.climbleft="climbleft",CharacterState.climbright="climbright",CharacterState.jumpright="jumpright",CharacterState.jumpleft="jumpleft",CharacterState.ClimbMotion="ClimbMotion",CharacterState.huachan="huachan",CharacterState.hurdle="hurdle",CharacterState.speedupjump="speedupjump",CharacterState.MoveX="MoveX",CharacterState.downmove="downmove",CharacterState.sidespeedup="sidespeedup",CharacterState.cross="cross",CharacterState.climbupblock="climbupblock",CharacterState}();a.CharacterState=n},{}],47:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=Laya.Animation,i=function(e){function GamePool(){var t=e.call(this)||this;return t.AniConfPath="res/fighter/fighter.json",t}return __extends(GamePool,e),GamePool.RemoveItem=function(e,t){GamePool.contain[e]&&(-1==GamePool.contain[e].indexOf(t)&&GamePool.contain[e].push(t))},GamePool.GetItem=function(e){for(var t=[],a=1;a50&&(e="color_yellow"));this._tanselizi=PropManager.getlizibyName(e),this._tanselizi.transform.position=t,this._tanselizi.particleSystem.play(),Laya.timer.once(500,this,this.EffectEndColor)},PropManager.prototype.EffectEndColor=function(){this._tanselizi&&(this._tanselizi.particleSystem.stop(),this._tanselizi.active=!1)},PropManager.prototype.SpeedUpEffect1=function(e,t){(!this._engamelizi4||this._engamelizi4&&!this._engamelizi4.active)&&(this._engamelizi4=PropManager.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 a=t.clone();a.y+=5,a.z-=10,this._engamelizi4.transform.position=a},PropManager.prototype.CloseSpeedUpEffect1=function(){this._engamelizi4&&this._engamelizi4.active&&(this._engamelizi4.active=!1)},PropManager.prototype.SpeedUpEffect=function(e,t){(!this._engamelizi3||this._engamelizi3&&!this._engamelizi3.active)&&(this._engamelizi3=PropManager.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 a=t.clone();a.y+=5,this._engamelizi3.transform.position=a},PropManager.prototype.CloseSpeedUpEffect=function(){this._engamelizi3&&this._engamelizi3.active&&(this._engamelizi3.active=!1)},PropManager.prototype.GameOverEffecf=function(e,t,a){this._engamelizi1=PropManager.getlizibyName("fireworks"),this._engamelizi1.transform.position=t,this._engamelizi1.particleSystem.play(),a&&(this._engamelizi2=PropManager.getlizibyName("winline"),this._engamelizi2.transform.position=t,this._engamelizi2.particleSystem.play())},PropManager.prototype.CloseGameOverEffect=function(){this._engamelizi1&&(this._engamelizi1.particleSystem.stop(),this._engamelizi1.active=!1),this._engamelizi2&&(this._engamelizi2.particleSystem.stop(),this._engamelizi2.active=!1)},PropManager.prototype.EffectEnd=function(e){e&&(e.particleSystem.stop(),e.active=!1)},PropManager.getlizibyName=function(e){var t;return PropManager.liziDict[e]?t=PropManager.liziDict[e]:(t=Laya.Sprite3D.instantiate(Laya.Loader.getRes(n.AssetPath.get3DModel(e))),PropManager.liziDict[e]=t,PropManager.scene3D.addChild(t)),t.active=!0,t},PropManager.nowmapDict={},PropManager.diePosY=0,PropManager.gamewinPosZ=0,PropManager.patternDict={},PropManager.npcDict={},PropManager.npcscriptDict={},PropManager.npcnum=0,PropManager.iscarmanpc=!1,PropManager.liziDict={},PropManager.jiantouArr=[],PropManager.actionnums=575,PropManager.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}},PropManager}();a.PropManager=o},{"../Config/AssetPath":15,"../utils/GameUtils":87}],50:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelChildControl"),i=e("./CpaEvent"),o=e("../WXSDK/PlayerAccount"),r=e("./RecommendView"),s=e("../Time/TimerService"),l=function(e){function BaoKuanGameView(){var t=e.call(this)||this;return t._time=0,t.key=0,t._istart=!1,t}return __extends(BaoKuanGameView,e),BaoKuanGameView.prototype.onInit=function(){this.initView(),this.initEvent()},BaoKuanGameView.prototype.initView=function(){this.c_state=this.getController("c_state"),this.t0=this.getTransition("t0"),this.c_state.selectedIndex=0},BaoKuanGameView.prototype.initEvent=function(){console.log("监听互推事件---BaokuanGame0"),this.AddEventData(i.default.YQHomeData,this,this.yqhomedataHandler)},BaoKuanGameView.prototype.yqhomedataHandler=function(){console.log("监听互推事件---BaokuanGame1"),this.RefreshBKYX(),s.TimerService.Instance.addUpdateTarget(this)},BaoKuanGameView.prototype.update=function(e){this._istart&&(this._time+=e,this._time>=5e3&&(this._time=0,this.RefreshBKYX(!0)))},BaoKuanGameView.prototype.RefreshBKYX=function(e){if(void 0===e&&(e=!1),o.PlayerAccount.CurrentAccount.CurAccountData.recommend){console.log("监听互推事件---BaokuanGame2"),this.c_state.selectedIndex=1;for(var t=r.Recommend.cainixihuanData,a=0;a<4;a++){this.key+a>=t.length-1&&(this.key=0);var n=t[this.key+a];this["item_"+a].showData(n,!0)}this.key+=4,this.key>=t.length-1&&(this.key=0),this._istart=!0,e&&this.t0.play(null,1)}},BaoKuanGameView}(n.PanelChildControl);a.default=l},{"../Control/PanelChildControl":25,"../Time/TimerService":59,"../WXSDK/PlayerAccount":75,"./CpaEvent":53,"./RecommendView":55}],51:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelBaseControl"),i=e("./RecommendView"),o=e("../View/ViewManager"),r=e("../Time/TimerService"),s=e("../utils/DispatcherManager"),l=e("../utils/GameState"),c=e("../View/CompletePanel"),h=e("../Data/RoleData"),u=function(e){function ChoutiPanView(t){var a=e.call(this,"main","choutipanView")||this;return a._iscanmove=!1,a.isend=0,a._movetime=0,a._flushtime=0,a.dir=!0,a._nowvalue=0,a.isend=t,a}return __extends(ChoutiPanView,e),ChoutiPanView.prototype.initView=function(){this.list_0.setVirtual(),this.list_0.itemRenderer=Laya.Handler.create(this,this.itemrenderlist,null,!1),this.list_1.setVirtual(),this.list_1.itemRenderer=Laya.Handler.create(this,this.itemrenderlist1,null,!1),this._nowList0=i.Recommend.gdyxData,this._nowList1=i.Recommend.gdyxData,this.list_0.numItems=this._nowList0.length,this.list_1.numItems=this._nowList1.length,this._isStart=!0,this._iscanmove=!0,r.TimerService.Instance.addUpdateTarget(this)},ChoutiPanView.prototype.initEvent=function(){this.AddEventByType(this.btn_return,Laya.Event.CLICK,this,this.onclosefun),this.AddEventByType(this.btn_jixugame,Laya.Event.CLICK,this,this.onclosefun),this.AddEventByType(this.list_1,Laya.Event.MOUSE_DOWN,this,this.downclick),this.AddEventByType(this.list_1,Laya.Event.MOUSE_UP,this,this.upclick),this.AddEventByType(this.list_1,Laya.Event.MOUSE_OUT,this,this.upclick)},ChoutiPanView.prototype.itemrenderlist=function(e,t){e=1&&(this._nowvalue=1,this.dir=!1)):(this._nowvalue-=.001,this._nowvalue<=0&&(this._nowvalue=0,this.dir=!0)),this.list_1.scrollPane.setPercY(this._nowvalue))},ChoutiPanView.prototype.onclosefun=function(){if(1==this.isend)o.ViewManager.Instance.close(ChoutiPanView),s.DispatcherManager.dispatchEvent(l.GameState.lose);else if(2==this.isend){var e=h.RoleData.Instance.levelcfg.winGold;o.ViewManager.Instance.close(ChoutiPanView),o.ViewManager.Instance.add(c.CompletePanel,e)}else o.ViewManager.Instance.close(ChoutiPanView)},ChoutiPanView.prototype.destory=function(){r.TimerService.Instance.removeUpdateTarget(this),e.prototype.destory.call(this)},ChoutiPanView.key="ChoutiPanView",ChoutiPanView}(n.PanelBaseControl);a.default=u},{"../Control/PanelBaseControl":24,"../Data/RoleData":33,"../Time/TimerService":59,"../View/CompletePanel":61,"../View/ViewManager":70,"../utils/DispatcherManager":85,"../utils/GameState":86,"./RecommendView":55}],52:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelChildControl"),i=e("./CpaEvent"),o=e("./RecommendView"),r=e("../Time/TimerService"),s=e("../Control/SceneControl"),l=function(e){function CpaDownsView(){var t=e.call(this)||this;return t._iscanmove=!1,t._movetime=0,t._flushtime=0,t.dir=!0,t._nowvalue=0,t}return __extends(CpaDownsView,e),CpaDownsView.prototype.onInit=function(){this.c_state=this.getController("c_state"),this.c_state.selectedIndex=0,this.initView(),this.initEvent()},CpaDownsView.prototype.initView=function(){this.list_0.setVirtual(),this.list_0.itemRenderer=Laya.Handler.create(this,this.itemrenderlist,null,!1),this._isStart=!1},CpaDownsView.prototype.initEvent=function(){this.AddEventData(i.default.YQHomeData,this,this.yqhomedataHandler),this.AddEventByType(this.list_0,Laya.Event.MOUSE_DOWN,this,this.downclick),this.AddEventByType(this.list_0,Laya.Event.MOUSE_UP,this,this.upclick),this.AddEventByType(this.list_0,Laya.Event.MOUSE_OUT,this,this.upclick)},CpaDownsView.prototype.downclick=function(){s.SceneControl.IsShowSign||(this._isdown=!0,this._iscanmove=!1,Laya.timer.clear(this,this.timeoutCallback))},CpaDownsView.prototype.timeoutCallback=function(){s.SceneControl.IsShowSign||(this._iscanmove=!0)},CpaDownsView.prototype.upclick=function(){s.SceneControl.IsShowSign||this._isdown&&(this._isdown=!1,this._nowvalue=this.list_0.scrollPane.percX,Laya.timer.once(2e3,this,this.timeoutCallback))},CpaDownsView.prototype.update=function(e){this._isStart&&this.list_0.scrollPane&&this._nowList&&this._iscanmove&&(this.dir?(this._nowvalue+=.001,this._nowvalue>=1&&(this._nowvalue=1,this.dir=!1)):(this._nowvalue-=.001,this._nowvalue<=0&&(this._nowvalue=0,this.dir=!0)),this.list_0.scrollPane.setPercX(this._nowvalue))},CpaDownsView.prototype.itemrenderlist=function(e,t){e.5),this.txt_word1&&(this.txt_word1.text=i.GameUtils.randRangeint(235470,1561430).toString()+"人玩"))},CpaItem}(n.PanelChildControl);a.default=r},{"../Control/PanelChildControl":25,"../WXSDK/FYHD_Sdk":71,"../utils/GameUtils":87}],55:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../utils/DispatcherManager"),i=e("./CpaEvent"),o=e("../WXSDK/FYHD_Sdk"),r=function(){return function(e){this.game_flg=e.game_flg,this.game_id=e.game_id,this.game_name=e.game_name,this.id=e.id,this.location_flg=e.location_flg,this.location_id=e.location_id,this.location_name=e.location_name,this.matter_type=e.matter_type}}();a.recommendPan=r;var s=function(){function Recommend(){Recommend.InitData()}return Recommend.InitData=function(){for(var e in Recommend.cainixihuanData=Recommend.GetCaiNiXiaHuanDatas(),Recommend.jiesuanData=Recommend.GetJIeSuanDatas(),Recommend.gdyxData=Recommend.GetGDYXDatas(),Recommend.baokuanyouxiData=Recommend.GetBaoKuanYouXiDatas(),Recommend.moreData=Recommend.GetMoreDatas(),o.FYHD_Sdk.pushData)Recommend.recommendDic[o.FYHD_Sdk.pushData[e].location_flg]=new r(o.FYHD_Sdk.pushData[e]);Recommend.getdata=!0,n.DispatcherManager.dispatchEvent(i.default.YQHomeData),console.log("互推数据初始化recommend--------------")},Recommend.GetSSDatas=function(){var e=[];if(!o.FYHD_Sdk.pushData)return e;for(var t=0;t0){this.list_0.numItems=this._nowlist.length,this.visible=!0;for(var e=0;e0&&this._iscanmove&&(this.dir?(this._nowvalue+=.001,this._nowvalue>=1&&(this._nowvalue=1,this.dir=!1)):(this._nowvalue-=.001,this._nowvalue<=0&&(this._nowvalue=0,this.dir=!0)),this.list_0.scrollPane.setPercY(this._nowvalue))},ShiwantuijianView.prototype.dispose=function(){this._iscanmove=!1,o.TimerService.Instance.removeUpdateTarget(this),e.prototype.dispose.call(this)},ShiwantuijianView}(n.PanelChildControl);a.default=r},{"../Control/PanelChildControl":25,"../Time/TimerService":59,"./RecommendView":55}],57:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./RecommendView"),i=e("../View/ViewManager"),o=e("../Control/PanelBaseControl"),r=e("../utils/GameUtils"),s=e("../WXSDK/FYHD_Sdk"),l=function(e){function TuijianView(){return e.call(this,"main","tuijianView")||this}return __extends(TuijianView,e),TuijianView.prototype.initView=function(){this.list_1.setVirtual(),this.list_1.itemRenderer=Laya.Handler.create(this,this.itemrenderlist1,null,!1),this.list_2.setVirtual(),this.list_2.itemRenderer=Laya.Handler.create(this,this.itemrenderlist2,null,!1),this._nowlist1=n.Recommend.gdyxData,this._nowlist2=n.Recommend.gdyxData,this.list_1.numItems=7,this.list_2.numItems=this._nowlist2.length},TuijianView.prototype.initEvent=function(){this.AddEventByType(this.btn_close,Laya.Event.CLICK,this,this.onclosefun),this.AddEventByType(this.more,Laya.Event.CLICK,this,this.JumpApp)},TuijianView.prototype.itemrenderlist1=function(e,t){e<7&&t.showData(this._nowlist1[e])},TuijianView.prototype.itemrenderlist2=function(e,t){e=10?(t.getMonth()+1).toString():"0"+(t.getMonth()+1),n=t.getDate()>=10?t.getDate().toString():"0"+t.getDate();return t.getFullYear()+"-"+a+"-"+n},TimeUtils.LXandJXTimeType=function(e){var t="";if(e<0)t="0秒";else if(e<60)t=Math.floor(e)+"秒";else if(e<3600)t=Math.floor(e/60)+"分钟";else{var a;t=(a=Math.floor(e/60/60))+"小时",t+=Math.floor((e-60*a*60)/60)+"分钟"}return t},TimeUtils.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},TimeUtils.formatTime1=function(e){var t="",a=Math.floor(e/3600);return a>0&&(t+=a+"小时"),t+=Math.floor(e%3600/60)+"分钟",t+=Math.floor(e%60)+"秒"},TimeUtils.formatTime5=function(e){var t="",a=Math.floor(e/3600);a>0&&(t+=a+"小时");var n=Math.floor(e%3600/60);return n>0&&(t+=n+"分"),t+=Math.floor(e%60)+"秒"},TimeUtils.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);return i>0&&(t+=i+"分钟"),t+=Math.ceil(e%60)+"秒"},TimeUtils.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++),a<2){var o=Math.floor(e%3600/60);o>0&&(t+=o+"分",a++)}a<2&&(t+=Math.ceil(e%60)+"秒");return t},TimeUtils.formatTime3=function(e){var t="";return t+=Math.floor(e/86400)+"天",t+=Math.floor(e%86400/3600)+"小时",t+=Math.floor(e%86400%3600/60)+"分"},TimeUtils.formatTime4=function(e){var t="";e>86400&&(t+=Math.floor(e/86400)+"天");e>3600&&(t+=Math.floor(e%86400/3600)+"小时");e>60&&(t+=Math.floor(e%86400%3600/60)+"分钟");return t},TimeUtils.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},TimeUtils.getTwo=function(e){var t=String(e);return t.length<2&&(t="0"+t),t},TimeUtils.datetoTime=function(e){return Date.parse(e)/1e3},TimeUtils}();a.TimeUtils=n},{}],59:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function TimerService(){var t=e.call(this)||this;return t._timeScale=1,t._unscalableList=[],TimerService.ins=t,t}return __extends(TimerService,e),Object.defineProperty(TimerService,"Instance",{get:function(){return null==TimerService.ins?new TimerService:TimerService.ins},enumerable:!0,configurable:!0}),TimerService.prototype.init=function(){Laya.timer.frameLoop(1,this,this.onTimer)},TimerService.prototype.initEvent=function(){},TimerService.prototype.stop=function(){Laya.timer.clear(this,this.onTimer)},TimerService.prototype.recover=function(){this.stop(),Laya.timer.frameLoop(1,this,this.onTimer)},TimerService.prototype.onTimer=function(){var e=0;for(e=0;e=3e4&&(this._time=0,i.LocalDataControl.Instance.addstr(n.UserDataInfo.lasttime,this._serverTime.toString())),this._onlinetime>=9e4&&(this._onlinetime=0,this.sendonlineTongji()))},TimesTamper.prototype.sendonlineTongji=function(){this.serverTime-this._onlinedistime>0&&(this._onlinedistime=this.serverTime)},Object.defineProperty(TimesTamper.prototype,"serverTime",{get:function(){return this._serverTime},enumerable:!0,configurable:!0}),TimesTamper}();a.TimesTamper=o},{"../Control/LocalDataControl":23,"../Data/UserDataInfo":35}],61:[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"),l=e("../WXSDK/PlayerAccount"),c=e("../View/ViewManager"),h=e("../WXSDK/GuangGao"),u=e("../utils/GameState"),p=e("../Game/Player"),d=e("../PrefabControl/PropManager"),m=e("../utils/DispatcherManager"),f=e("../PrefabControl/CharacterState"),g=e("../WXSDK/RecordManager"),y=e("../WXSDK/ttad"),C=function(e){function CompletePanel(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.time=9,a.count=!1,a.fuhuo=!1,a.getgold=t,a}return __extends(CompletePanel,e),CompletePanel.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),this.scene.addChild(new Laya.Camera(0,.1,100)).transform.translate(new Laya.Vector3(0,1,0))}))},CompletePanel.prototype.garbageCollection=function(){this.scene.destroy(),this.scene=null,Laya.Resource.destroyUnusedResources()},CompletePanel.prototype.btn1click=function(){0==this.c_state.selectedIndex?this.duihao.visible?this.playvideocallback():(this.getProxy(r.AgencyUserMessage).GoldUp(this.getgold),this.getProxy(r.AgencyUserMessage).LevelUp(),this._gameProxy.returnmainview(!0)):1==this.c_state.selectedIndex?(this.getProxy(r.AgencyUserMessage).GoldUp(this.getgold),this._gameProxy.returnmainview()):2==this.c_state.selectedIndex&&this.sharerevive()},CompletePanel.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)}))},CompletePanel.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)},CompletePanel.prototype.btn0click=function(){0==this.c_state.selectedIndex?this.playvideocallback():1==this.c_state.selectedIndex?(this.getProxy(r.AgencyUserMessage).GoldUp(this.getgold),this._gameProxy.returnmainview()):2==this.c_state.selectedIndex&&(this.count=!1,this.playvideorevive())},CompletePanel.prototype.playvideorevive=function(){var e=this;y.ttad.ShowVideo(function(t){t?(u.GameState.fuhuocishu--,c.ViewManager.Instance.close(CompletePanel),u.GameState.isdie=!1,p.Player.Instance._iscanMove=!0,p.Player.Instance.nowAction=f.CharacterState.run,""==p.Player.Instance._nowscenename||""==p.Player.Instance._nowbuildname?(console.log("玩家位置----",p.Player.Instance._initPosVec),console.log("玩家速度_moveVec",p.Player.Instance._moveVec),p.Player.Instance._transform.position=new Laya.Vector3(0,1,3)):(console.log("当前场景名字---",p.Player.Instance._nowscenename),console.log("当前建筑名字---",p.Player.Instance._nowbuildname),console.log("建筑物位置----",d.PropManager.getPosVecbyScene(p.Player.Instance._nowscenename,p.Player.Instance._nowbuildname)),p.Player.Instance._transform.position=d.PropManager.getPosVecbyScene(p.Player.Instance._nowscenename,p.Player.Instance._nowbuildname).clone()),p.Player.Instance._speedMoveV3.z=2*-p.Player.Instance._RoleData.movespeed,Laya.timer.once(3e3,e,function(){p.Player.Instance._speedMoveV3.z=-p.Player.Instance._RoleData.movespeed})):e.count=!0})},CompletePanel.prototype.sharerevive=function(){var e=this;g.RecordManager.Instance.ShareVideo(function(t){t?(g.RecordManager.Instance.RecordStart(),u.GameState.fuhuocishu--,c.ViewManager.Instance.close(CompletePanel),u.GameState.isdie=!1,p.Player.Instance._iscanMove=!0,p.Player.Instance.nowAction=f.CharacterState.run,""==p.Player.Instance._nowscenename||""==p.Player.Instance._nowbuildname?(console.log("玩家位置----",p.Player.Instance._initPosVec),p.Player.Instance._transform.position=new Laya.Vector3(0,1,3)):(console.log("当前场景名字---",p.Player.Instance._nowscenename),console.log("当前建筑名字---",p.Player.Instance._nowbuildname),console.log("建筑物位置----",d.PropManager.getPosVecbyScene(p.Player.Instance._nowscenename,p.Player.Instance._nowbuildname)),p.Player.Instance._transform.position=d.PropManager.getPosVecbyScene(p.Player.Instance._nowscenename,p.Player.Instance._nowbuildname).clone()),p.Player.Instance._speedMoveV3.z=2*-p.Player.Instance._RoleData.movespeed,Laya.timer.once(3e3,e,function(){p.Player.Instance._speedMoveV3.z=-p.Player.Instance._RoleData.movespeed})):e.count=!0})},CompletePanel.prototype.playvideocallback=function(){var e=this;y.ttad.ShowVideo(function(t){t&&(e.getProxy(r.AgencyUserMessage).GoldUp(3*e.getgold),e.getProxy(r.AgencyUserMessage).LevelUp(),e._gameProxy.returnmainview(!0),e.BattleBtn.visible=!1)})},CompletePanel.prototype.ShareVideoCallBack=function(){var e=this;g.RecordManager.Instance.ShareVideo(function(t){t&&(e.getProxy(r.AgencyUserMessage).GoldUp(3*e.getgold),e.BattleBtn.visible=!1,e.ShareVideo.visible=!1)})},CompletePanel.prototype.ClickKuang=function(){this.duihao.visible?(this.duihao.visible=!1,this.btn_1.visible=this.duihao.visible,this.btn_2.visible=!this.duihao.visible):(this.duihao.visible=!0,this.btn_1.visible=this.duihao.visible,this.btn_2.visible=!this.duihao.visible)},CompletePanel.prototype.destory=function(){Laya.timer.clear(this,this.CountTime),y.ttad.Clear(),e.prototype.destory.call(this)},CompletePanel.prototype.initView=function(){var e=this;this.tianjia.visible=!1,this.TianJiaAni=this.getTransitionByName("tianjiaani"),this.TianJiaAni.stop(),this.count=!0,this._gameProxy=this.getProxy(s.AgencyInGame),this.c_state=this.getControllerByBame("c_state"),this.txt_gold.text=this.getgold.toString(),this.duihao=this.kuang.getChildAt(1),this.duihao.visible=l.PlayerAccount.CurrentAccount.CurAccountData.Choose,this.share_goldnum=this.ShareVideo.getChildAt(4),this.ShareVideoBtn=this.ShareVideo.getChildAt(1),this.jiesuanbtn=this.ShareVideo.getChildAt(2),this.share_goldnum.text=this.getgold.toString(),this.btn_1.visible=this.duihao.visible,this.btn_2.visible=!this.duihao.visible,u.GameState.recordscree?this.BattleBtn.visible=!1:(this.BattleBtn.visible=!1,l.PlayerAccount.CurrentAccount.CurAccountData.ShowBattleBtn&&(this.BattleBtn.visible=!0)),u.GameState.isdie?u.GameState.fuhuocishu>0?(this.c_state.selectedIndex=2,Laya.timer.loop(1e3,this,this.CountTime)):this.c_state.selectedIndex=1:0==o.GameStateControl.Instance.endGamePlayerArr.length?this.c_state.selectedIndex=0:this.c_state.selectedIndex=1,0==this.c_state.selectedIndex?(this.ShareVideo.visible=!0,this.jiesuanbtn.visible=!1,Laya.timer.once(2e3,this,function(){e.jiesuanbtn.visible=!0})):this.ShareVideo.visible=!1,h.GuangGao.CheatBanner(this.btn_1)},CompletePanel.prototype.playanimator=function(){this.TianJiaAni.play(null,1)},CompletePanel.prototype.ClickJieSuan=function(){this.ShareVideo.visible=!1},CompletePanel.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),this.AddEventByType(this.BattleBtn,Laya.Event.CLICK,this,this.ShareBattle),this.AddEventByType(this.btn_2,Laya.Event.CLICK,this,this.btn1click),this.AddEventByType(this.kuang,Laya.Event.CLICK,this,this.ClickKuang),this.AddEventByType(this.ShareVideoBtn,Laya.Event.CLICK,this,this.ShareVideoCallBack),this.AddEventByType(this.jiesuanbtn,Laya.Event.CLICK,this,this.ClickJieSuan)},CompletePanel.prototype.CountTime=function(){this.count&&this.time>0&&(this.time-=1,this.timenum.text=this.time.toString(),this.time<1&&(Laya.timer.clear(this,this.CountTime),u.GameState.fuhuocishu--,c.ViewManager.Instance.close(CompletePanel),m.DispatcherManager.dispatchEvent(u.GameState.lose)))},CompletePanel.prototype.ShareBattle=function(){var e=this;g.RecordManager.Instance.ShareVideo(function(t){t&&(e.BattleBtn.visible=!1)})},CompletePanel.key="CompletePanel",CompletePanel}(n.PanelBaseControl);a.CompletePanel=C},{"../Agency/AgencyInGame":2,"../Agency/AgencyUserMessage":8,"../Control/GameStateControl":21,"../Control/PanelBaseControl":24,"../Game/Player":40,"../PrefabControl/CharacterState":46,"../PrefabControl/PropManager":49,"../View/ViewManager":70,"../WXSDK/GuangGao":72,"../WXSDK/PlayerAccount":75,"../WXSDK/RecordManager":76,"../WXSDK/ttad":83,"../utils/DispatcherManager":85,"../utils/GameState":86,"../utils/ViewAction":93}],62:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelBaseControl"),i=e("../utils/GameUtils"),o=e("../Time/TimerService"),r=e("../WXSDK/GuangGao"),s=e("../utils/ViewAction"),l=e("./ViewManager"),c=e("../Control/SceneControl"),h=e("../Control/GameStateControl"),u=e("../utils/GlobalTip"),p=e("../WXSDK/ttad"),d=function(e){function EggPanel(){var t=e.call(this,"main","eggview",!1,s.ViewAction.ActionType_none,1)||this;return t._isComplete=!1,t._isShowBanner=!1,t._bannerVal=.5,t._maxClickCnt=18,t._clickCnt=0,t._interval=100,t._decrement=1,t._time=0,t}return __extends(EggPanel,e),EggPanel.prototype.initView=function(){this.hitani=this.getTransitionByName("hitani"),this.pro_0.value=1,this._bannerVal=i.GameUtils.randRangefloat(.2,.4),o.TimerService.Instance.addUpdateTarget(this),p.ttad.Clear();var e=Laya.stage.height;this.btn_1.y=e-this.btn_1.height-15,this.getrewardbtn.y=this.btn_1.y,this.getrewardbtn.visible=!1,0==c.SceneControl.EggGGroup&&(this.n6.visible=!0)},EggPanel.prototype.bannercallback=function(){},EggPanel.prototype.initEvent=function(){this.AddEventByType(this.btn_1,Laya.Event.CLICK,this,this.qiaoDa),this.AddEventByType(this.btn_close,Laya.Event.CLICK,this,EggPanel.onclosefun),this.AddEventByType(this.getrewardbtn,Laya.Event.CLICK,this,EggPanel.VideoGetReward)},EggPanel.prototype.update=function(e){this._time+=e,this._time>=this._interval&&(this._time=0,this.Daojishi())},EggPanel.prototype.Daojishi=function(){var e=this.pro_0.value;(e-=this._decrement)<=0&&(e=1),this.pro_0.value=e,this._clickCnt=Math.ceil(e*this._maxClickCnt/100)},EggPanel.prototype.qiaoDa=function(){var e=this;if(!this._isComplete){null==this.hitani||this.hitani.playing||this.hitani.play(null,1),this._clickCnt++,this._clickCnt>this._maxClickCnt&&(this._clickCnt=this._maxClickCnt);var t=this._clickCnt/this._maxClickCnt;t>1&&(t=1),this.pro_0.value=100*t,t>=this._bannerVal&&!this._isShowBanner&&(this._isShowBanner=!0,this.getrewardbtn.visible=!0,Laya.timer.once(2e3,this,function(){e.getrewardbtn.visible=!1})),t>=1&&(this._isComplete=!0,EggPanel.getreward())}},EggPanel.getreward=function(){u.GlobalTip.Instance.showWordTips("获得开局加速"),EggPanel.onclosefun()},EggPanel.VideoGetReward=function(){p.ttad.ShowVideo(function(e){e?(u.GlobalTip.Instance.showWordTips("获得开局加速"),EggPanel.onclosefun()):EggPanel.onclosefun()})},EggPanel.prototype.hidebanner=function(){r.GuangGao.hidebanner()},EggPanel.onclosefun=function(){l.ViewManager.Instance.close(EggPanel)},EggPanel.prototype.destory=function(){o.TimerService.Instance.removeUpdateTarget(this),e.prototype.destory.call(this),h.GameStateControl.Instance.entergame(!0)},EggPanel.key="EggPanel",EggPanel}(n.PanelBaseControl);a.default=d},{"../Control/GameStateControl":21,"../Control/PanelBaseControl":24,"../Control/SceneControl":29,"../Time/TimerService":59,"../WXSDK/GuangGao":72,"../WXSDK/ttad":83,"../utils/GameUtils":87,"../utils/GlobalTip":88,"../utils/ViewAction":93,"./ViewManager":70}],63:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../Control/PanelBaseControl"),i=e("../utils/GameUtils"),o=e("../Time/TimerService"),r=e("../WXSDK/GuangGao"),s=e("./ViewManager"),l=e("../utils/GlobalTip"),c=e("../WXSDK/PlayerAccount"),h=e("../Data/RoleData"),u=e("../WXSDK/ttad"),p=function(e){function GiftView(){var t=e.call(this,"main","giftcheatview")||this;return t._isComplete=!1,t._isShowBanner=!1,t._bannerVal=.5,t._maxClickCnt=18,t._clickCnt=0,t._interval=100,t._decrement=1,t._time=0,t}return __extends(GiftView,e),GiftView.prototype.initView=function(){this.anniu=this.item.asCom.getChildAt(2),this.kuaisudianji=this.item.asCom.getChildAt(0),this.shou=this.item.asCom.getChildAt(3),this.di=this.item.asCom.getChildAt(1),this.getrewardbtn=this.item.asCom.getChildAt(4),this.getrewardbtn.visible=!1,this.clickani=this.item.getTransition("clickbtnani"),this.jindu.value=1,this._bannerVal=i.GameUtils.randRangefloat(.2,.4),o.TimerService.Instance.addUpdateTarget(this),u.ttad.Clear(),Laya.timer.loop(2e3,this,this.playAnimator)},GiftView.prototype.playAnimator=function(){this.clickani.play(null,1)},GiftView.prototype.initEvent=function(){this.AddEventByType(this.anniu,Laya.Event.CLICK,this,this.qiaoDa),this.AddEventByType(this.getrewardbtn,Laya.Event.CLICK,this,this.VideoGetReward)},GiftView.prototype.update=function(e){this._time+=e,this._time>=this._interval&&(this._time=0,this.Daojishi())},GiftView.prototype.Daojishi=function(){var e=this.jindu.value;(e-=this._decrement)<=0&&(e=1),this.jindu.value=e,this._clickCnt=Math.ceil(e*this._maxClickCnt/100)},GiftView.prototype.qiaoDa=function(){var e=this;if(this.shou.visible&&(this.shou.visible=!1,this.kuaisudianji.visible=!1,Laya.timer.clear(this,this.playAnimator)),!this._isComplete){this._clickCnt++,this._clickCnt>this._maxClickCnt&&(this._clickCnt=this._maxClickCnt);var t=this._clickCnt/this._maxClickCnt;t>1&&(t=1),this.jindu.value=100*t,t>=this._bannerVal&&!this._isShowBanner&&(this._isShowBanner=!0,this.getrewardbtn.visible=!0,Laya.timer.once(2e3,this,function(){e.getrewardbtn.visible=!1})),t>=1&&(this._isComplete=!0,GiftView.getreward())}},GiftView.getreward=function(){h.RoleData.Instance.Money+=c.PlayerAccount.CurrentAccount.CurAccountData.CheatReward,l.GlobalTip.Instance.showWordTips("获得"+c.PlayerAccount.CurrentAccount.CurAccountData.CheatReward+"金币"),GiftView.onclosefun()},GiftView.prototype.VideoGetReward=function(){u.ttad.ShowVideo(function(e){e?(h.RoleData.Instance.Money+=c.PlayerAccount.CurrentAccount.CurAccountData.CheatReward,l.GlobalTip.Instance.showWordTips("获得"+c.PlayerAccount.CurrentAccount.CurAccountData.CheatReward+"金币"),GiftView.onclosefun()):GiftView.onclosefun()})},GiftView.prototype.hidebanner=function(){r.GuangGao.hidebanner()},GiftView.onclosefun=function(){s.ViewManager.Instance.close(GiftView)},GiftView.prototype.destory=function(){r.GuangGao.hidebanner(),o.TimerService.Instance.removeUpdateTarget(this),e.prototype.destory.call(this)},GiftView.key="GiftView",GiftView}(n.PanelBaseControl);a.default=p},{"../Control/PanelBaseControl":24,"../Data/RoleData":33,"../Time/TimerService":59,"../WXSDK/GuangGao":72,"../WXSDK/PlayerAccount":75,"../WXSDK/ttad":83,"../utils/GameUtils":87,"../utils/GlobalTip":88,"./ViewManager":70}],64:[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 WordTipsPanel(){var t=e.call(this,"loading","wordTips")||this;return t.nowword="",t}return __extends(WordTipsPanel,e),WordTipsPanel.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)},WordTipsPanel.prototype.showWord=function(e){this.nowword=e,this.text_word.text=e,this.t1.play(Laya.Handler.create(this,this.playEndCallback),1)},WordTipsPanel.prototype.onInit=function(){e.prototype.onInit.call(this),this.t1=this.getpanelTransition("t1")},WordTipsPanel.prototype.createCantralRect=function(){this.rect=new Laya.Sprite,this.rect.graphics.drawRect(-100,-100,200,200,"gray"),Laya.stage.addChild(this.rect),this.updateRectPos()},WordTipsPanel.prototype.updateRectPos=function(){this.rect.x=Laya.stage.width/2,this.rect.y=Laya.stage.height/2},WordTipsPanel.prototype.playEndCallback=function(){i.DispatcherManager.dispatchEvent(o.GameState.removeselect,this)},WordTipsPanel.key="WordTipsPanel",WordTipsPanel}(n.PanelBaseControl);a.WordTipsPanel=r},{"../Control/PanelBaseControl":24,"../utils/DispatcherManager":85,"../utils/GameState":86}],65:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function LoadingPanel(){return e.call(this,"loading","loading")||this}return __extends(LoadingPanel,e),LoadingPanel.prototype.onInit=function(){e.prototype.onInit.call(this)},LoadingPanel.prototype.showWord=function(e){this.pro.value=e},LoadingPanel.prototype.onBoyClick=function(e){var t=e.target;1===t.scaleX?t.scale(1.2,1.2):t.scale(1,1)},LoadingPanel.prototype.onTxtClick=function(e){e.stopPropagation()},LoadingPanel.prototype.destory=function(){this.clearEvent(),e.prototype.destory.call(this)},LoadingPanel.key="LoadingPanel",LoadingPanel}(e("../Control/PanelBaseControl").PanelBaseControl);a.LoadingPanel=n},{"../Control/PanelBaseControl":24}],66:[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("../CFG/LotteryCFG"),s=e("../Config/AssetPath"),l=e("../CFG/RoleCFG"),c=e("../Agency/AgencyLottery"),h=e("../WXSDK/GuangGao"),u=e("../WXSDK/ttad"),p=function(e){function LotteryPanel(){return e.call(this,"main","LotteryView",!1,i.ViewAction.ActionType_none,1)||this}return __extends(LotteryPanel,e),LotteryPanel.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)},LotteryPanel.prototype.onHttpRequestError=function(e){console.log(e)},LotteryPanel.prototype.initEvent=function(){this.AddEventByType(this.backbtn,Laya.Event.CLICK,this,this.onclosefun),this.AddEventByType(this.lotterybtn,Laya.Event.CLICK,this,this.choujiangclick)},LotteryPanel.prototype.playComplte=function(){this.tw&&(this.tw.clear(),this.tw=null),this.backbtn.enabled=!0,this.lotterybtn.enabled=!0,this.agencylottery.getreward(this._selectcfg)},LotteryPanel.prototype.onclosefun=function(){this.tw&&(this.tw.clear(),this.tw=null),h.GuangGao.Clear(),o.ViewManager.Instance.close(LotteryPanel)},LotteryPanel.prototype.initView=function(){this.agencylottery=this.getProxy(c.AgencyLottery);for(var e=r.default.vec,t=0;t6e3){var r=Number(i.reward_item)%6e3;o=y.PlayerAccount.CurrentAccount.CurAccountData.GetSkinAttr(r),console.log(o)}var s,l=!0,c=!0;nNumber(t.panel)?1:void 0},FYHD_Sdk.Ad_ClickType={Video:"video_click",Watch:"watch",Share:"share",Banner:"banner",Push:"push",PushClick:"icon_click"},FYHD_Sdk.pushData=[],FYHD_Sdk.isHaveDate=!1,FYHD_Sdk.ShowAd="ShowAd",FYHD_Sdk}();a.FYHD_Sdk=r},{"../Push/ChoutiPanView":51,"../Push/RecommendView":55,"../View/ViewManager":70}],72:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("./PlayerAccount"),i=e("./ttad"),o=function(){return function(){this.appNameHidden=!1,this.color="C93B3BFF",this.size=100,this.borderWidth=50,this.borderColor="A1A0A0FF"}}();a.WxGameItem=o;var r=function(){function GuangGao(){this.isVideoLoadCom=!1}return Object.defineProperty(GuangGao,"hasbanner",{get:function(){return!!n.PlayerAccount.CurrentAccount.CurAccountData.banner},enumerable:!0,configurable:!0}),Object.defineProperty(GuangGao,"hasvideo",{get:function(){if(Laya.Browser.onWeiXin&&n.PlayerAccount.CurrentAccount.CurAccountData.video){n.PlayerAccount.CurrentAccount.CurAccountData.GetGlobe;return!0}return!1},enumerable:!0,configurable:!0}),GuangGao.InitVideo=function(){var e=this;Laya.Browser.onWeiXin&&n.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)},GuangGao.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()})})):e(!1)},GuangGao.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()})},GuangGao.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){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()})}else t(null)},GuangGao.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}},GuangGao.Clear=function(){GuangGao.clearTween(),Laya.timer.clearAll(this),Laya.Tween.clearAll(this),this.canshowbanner=!1,this.curbanner&&this.curbanner.hide()},GuangGao.hidebanner=function(){Laya.Browser.onWeiXin&&this.curbanner&&this.curbanner.hide()},GuangGao.showbanner=function(){Laya.Browser.onWeiXin&&this.curbanner&&this.curbanner.show()},Object.defineProperty(GuangGao,"cancheat",{get:function(){return!!n.PlayerAccount.CurrentAccount.CurAccountData.cheat},enumerable:!0,configurable:!0}),GuangGao.SetPosBanner=function(e,t){var a=this;if(Laya.Browser.onPC)t(!1);else{var n=Laya.Browser.window.wx.getSystemInfoSync(),i=e.y*n.windowHeight/Laya.stage.height,o=this.bannerAdUnitId;console.log("adUnitId:"+o),this.curbanner&&this.curbanner.destroy();var r=Laya.Browser.window.wx.createBannerAd({adUnitId:o,style:{left:0,top:0,width:720}});r.onError(function(e){console.log(e),t(!1)}),r.onLoad(function(){a.curbanner=r,a.curbanner.style.top=i,a.curbanner&&(console.log("banner show"),a.curbanner.show(),Laya.timer.once(2300,a,function(){a.curbanner.style.top=n.windowHeight-GuangGao.bannerhigt,t(!0)}))}),r.onResize(function(e){GuangGao.bannerhigt=e.height,a.curbanner.style.width=n.windowWidth,a.curbanner.style.top=i})}},GuangGao.CheatBanner=function(e,t,a){void 0===t&&(t=null),void 0===a&&(a=0),i.ttad.Showbanner()},GuangGao.clearTween=function(){GuangGao.tween&&(GuangGao.tween.clear(),GuangGao.tween=null)},GuangGao.prototype.loadVideo=function(e){var t=this;if(Laya.Browser.onWeiXin)if(this._onLoadVideo=e,this._rewardedVideoAd)this.isVideoLoadCom?(this._onLoadVideo&&this._onLoadVideo(!0),this._onLoadVideo=null):(this._onLoadVideo&&this._onLoadVideo(!1),this._onLoadVideo=null);else{var a=GuangGao.videlAdUnitId;this._rewardedVideoAd=Laya.Browser.window.wx.createRewardedVideoAd({adUnitId:a});var n=!1;this._rewardedVideoAd.onLoad(function(){console.log("[LOG] 激励视频广告加载成功"),t.isVideoLoadCom=!0,n||(n=!0,t._onLoadVideo&&t._onLoadVideo(!0),t._onLoadVideo=null)}),this._rewardedVideoAd.onError(function(e){console.log("[LOG] 激励视频广告加载失败"),console.log(e),t.isVideoLoadCom=!1,t._onLoadVideo&&t._onLoadVideo(!1),t._onLoadVideo=null}),this._rewardedVideoAd.onClose(function(e){!e||e.isEnded?(t._onVideoClose&&t._onVideoClose(!0),t._onVideoClose=null):(t._onVideoClose&&t._onVideoClose(!1),t._onVideoClose=null)})}else e&&e(!0)},GuangGao.prototype.showVideo=function(e){var t=this;Laya.Browser.onWeiXin?(this._onVideoClose=e,this._rewardedVideoAd.show().catch(function(e){t._rewardedVideoAd.load().then(function(){t._rewardedVideoAd.show()})})):e&&e(!0)},GuangGao.videlAdUnitId="adunit-0c687084c908ee89",GuangGao.bannerAdUnitId="adunit-8c2d586135fa6d4f",GuangGao.afsfsaafsfsa=!1,GuangGao.asfasfsaffsa=!1,GuangGao.canshowbanner=!0,GuangGao.bannerhigt=0,GuangGao}();a.GuangGao=r},{"./PlayerAccount":75,"./ttad":83}],73:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=Laya.Event,i=Laya.HttpRequest,o=e("./PlayerAccount"),r=e("./Sdk"),s=e("../Time/TimesTamper"),l=e("../Global"),c="https://parkourracetoutiao2api.xwxgame.com/",h=function(){function PROTOCOLS(){}return PROTOCOLS.Login="user/login",PROTOCOLS.game="game/start",PROTOCOLS.end="game/play",PROTOCOLS.Sign="sign/sign",PROTOCOLS.Buy="theme/buy",PROTOCOLS.Equip="theme/equip",PROTOCOLS.share="fission/share",PROTOCOLS.vd="fission/vd",PROTOCOLS.revival="game/revival",PROTOCOLS.fission="theme/fission",PROTOCOLS.themefission="theme/fission",PROTOCOLS.treasure="treasure/click",PROTOCOLS.Config="config/table",PROTOCOLS.Lottery="lottery/lottery",PROTOCOLS.GetAchieve="achievement/getRewards",PROTOCOLS.usersync="user/sync",PROTOCOLS}();a.PROTOCOLS=h;var u=function(){function NetworkManager(){NetworkManager.instance=this}return Object.defineProperty(NetworkManager,"Instance",{get:function(){return NetworkManager.instance?NetworkManager.instance:new NetworkManager},enumerable:!0,configurable:!0}),NetworkManager.prototype.login=function(e,t,a){var r=o.PlayerAccount.CurrentAccount,s=l.Global.gameVersion,u="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(c+h.Login,u,"post","text")},NetworkManager.prototype.onHttpRequestProgress=function(e,t){e&&(console.log("HttpRequestProgress:..."),e.run())},NetworkManager.prototype.onLoginRequestComplete=function(e,t){var a=JSON.parse(t.data);if("0"!=a.code)return console.log("登录异常错误!错误信息:",t.data),void r.WxApi.recordAldEvent("登录异常错误!错误信息:= "+a.code,"httpRequest.dat");o.PlayerAccount.ServerTime=a.t,s.TimesTamper.Instance.updateServiceTime(Number(a.t)),r.WxApi.recordAldEvent("登录正式成功"),o.PlayerAccount.CurrentAccount.SetAccountData(a,e)},NetworkManager.prototype.onHttpRequestError=function(e,t){null!=e&&e.runWith(t),r.WxApi.recordAldEvent("Error! Http request error.. ","httpRequest.dat"),r.WxApi.ShowLoading("连接网络失败..."),Laya.timer.once(8e3,this,function(){r.WxApi.HideLoading()}),console.log("Error! Http request error..."+t.data)},NetworkManager.prototype.HttpPostRequest=function(e,t,a,s,l){void 0===l&&(l=!0);var u="",p=c+e,d=o.PlayerAccount.CurrentAccount.CurAccountData;if(1==l&&(u="token="+d.m_token+"&"),r.WxApi.ShowLoading("连接网络中..."),e==h.game||e==h.end||e==h.fission||e==h.vd||e==h.themefission||e==h.Lottery||e==h.usersync){for(var m="abcdefghijkimnopqrstuvwxyz0123456789",f="{",g="",y=0;y<4;y++)g+=m[Math.floor(100*Math.random())%m.length];for(y=0;y>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},NetworkManager}();a.NetworkManager=u},{"../Global":41,"../Time/TimesTamper":60,"./PlayerAccount":75,"./Sdk":77}],74:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function PlatfromType(){}return PlatfromType.pc="pc",PlatfromType.wx="wx",PlatfromType.qq="qq",PlatfromType.tt="tt",PlatfromType}();a.PlatfromType=n},{}],75:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n,i,o,r,s=e("../WXSDK/Sdk"),l=e("../utils/GameUtils"),c=e("./NetworkManager"),h=e("../utils/DispatcherManager"),u=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]="砖石购买"}(a.requiretype||(a.requiretype={})),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"}(n=a.AccountConfig||(a.AccountConfig={})),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"}(i=a.AccountUser||(a.AccountUser={})),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"}(a.heroAttr||(a.heroAttr={})),function(e){e[e.sign_days=0]="sign_days",e[e.sign_time=1]="sign_time"}(o=a.signdata||(a.signdata={})),function(e){e[e.id=0]="id",e[e.name=1]="name",e[e.entity_id=2]="entity_id",e[e.icon=3]="icon"}(r=a.entity||(a.entity={})),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"}(a.skinattr||(a.skinattr={}));var p=function(){function AccountData(e,t,a,n,i,o,r,s,l,c,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=l,this.lottery=c,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(AccountData.prototype,"DieDistance",{get:function(){return Number(this.m_app_setting.DieDistance)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"HitEgg",{get:function(){return Number(this.m_app_setting.HitEgg)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"EndCheat",{get:function(){return Number(this.m_app_setting.EndCheat)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"CheatReward",{get:function(){return Number(this.m_app_setting.CheatReward)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"WhiteUser",{get:function(){return"1"==this.m_app_setting.WhiteUser},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"StrategySwitch",{get:function(){return"1"==this.m_app_setting.StrategySwitch},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"ShowSign",{get:function(){return"1"==this.m_app_setting.ShowSign},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"Choose",{get:function(){return"1"==this.m_app_setting.choose},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"ShowBattleBtn",{get:function(){return"1"==this.m_app_setting.ShowBattleBtn},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"lotterytime",{get:function(){return Number(this.lottery.day_video_times)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"share",{get:function(){return"1"==this.m_app_setting.share},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"sharecontent",{get:function(){return this.m_app_setting.sharecontent},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"ShareImage",{get:function(){return this.m_app_setting.ShareImage},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"cheattime",{get:function(){return Number(this.m_app_setting.cheattime)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"banner",{get:function(){return"1"==this.m_app_setting.banner},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"video",{get:function(){return"1"==this.m_app_setting.video},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"BtnCanMove",{get:function(){return"1"==this.m_app_setting.BtnCanMove},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"checkscence",{get:function(){return"1"==this.m_app_setting.checkscence},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"banner_dis",{get:function(){return Number(this.m_app_setting.banner_dis)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"bannerMoveTime",{get:function(){return Number(this.m_app_setting.bannerMoveTime)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"createBannerTimes",{get:function(){return Number(this.m_app_setting.createBannerTimes)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"bannerMoveProp",{get:function(){return Number(this.m_app_setting.bannerMoveProp)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"isShareThenVideo",{get:function(){return"1"==this.m_app_setting.isShareThenVideo},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"isShowHuiTui",{get:function(){return"1"==this.m_app_setting.isShowHuiTui},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"start_sprint",{get:function(){return Number(this.m_app_setting.start_sprint)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"IsVideoModel",{get:function(){return"1"==this.m_app_setting.IsVideoModel},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"videoModelNum",{get:function(){return Number(this.m_app_setting.videoModelNum)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"VideoModelTitle",{get:function(){return this.m_app_setting.VideoModelTitle},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"failcount",{get:function(){return Number(this.m_app_setting.failcount)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"spminspeed",{get:function(){return Number(this.m_app_setting.spminspeed)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"bgm",{get:function(){return"1"==this.m_app_setting.bgm},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"camerahight",{get:function(){return Number(this.m_app_setting.camerahight)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"ctnfilename",{get:function(){return this.m_app_setting.ctnfilename},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"cheat",{get:function(){return"1"==this.m_app_setting.cheat},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"shakestage",{get:function(){return this.m_app_setting.shakestage&&"1"==this.m_app_setting.shakestage},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"stageconfigcdn",{get:function(){return"1"==this.m_app_setting.stageconfigcdn},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"playerspeed",{get:function(){return Number(this.m_app_setting.playerspeed)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"videlAdUnitId",{get:function(){return this.m_app_setting.videlAdUnitId},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"bannerAdUnitId",{get:function(){return this.m_app_setting.bannerAdUnitId},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"tri",{get:function(){return"1"==this.m_app_setting.tri},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"recommend",{get:function(){return"1"==this.m_app_setting.recommend},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"recommendflg",{get:function(){return this.m_app_setting.recommendflg},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"egg",{get:function(){return"1"==this.m_app_setting.egg},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"eggrate",{get:function(){return Number(this.m_app_setting.eggrate)},enumerable:!0,configurable:!0}),Object.defineProperty(AccountData.prototype,"UseId",{get:function(){return this.userId},enumerable:!0,configurable:!0}),AccountData.prototype.GetConfig=function(e){var t=n[e];return this.m_configs[t]},AccountData.prototype.GetUser=function(e){var t=i[e];return this.m_user[t]},Object.defineProperty(AccountData.prototype,"GetVideoTotal",{get:function(){return Number(this.m_user_video.total)},enumerable:!0,configurable:!0}),AccountData.prototype.GetSign=function(e){var t=o[e];return this.m_sign[t]},AccountData.prototype.GetRewardConfig=function(e){return this.m_RewardDic[e]},AccountData.prototype.GetEntity=function(e,t){return this.m_EntityDic[e]?this.m_EntityDic[e][r[t]]:null},AccountData.prototype.GetRewardDic=function(){var e=this.GetConfig(n.rewards);for(var t in e)this.m_RewardDic[e[t].id]=e[t]},AccountData.prototype.GetEntityDic=function(){var e=this.GetConfig(n.entity);for(var t in e)this.m_EntityDic[e[t].entity_id]=e[t]},AccountData.prototype.GetThemeById=function(e){var t=this.GetConfig(n.theme);if(t)for(var a=0;a4*this.times+1&&(Laya.stage.clearTimer(this,this.shakeObject),Laya.stage.pos(0,0),this.num=0,this.isShake=!1,null!=t&&t())},WxApi.ShowTxt=function(e){Laya.Browser.window.tt?Laya.Browser.window.tt.showToast({title:e}):console.log(e)},Object.defineProperty(WxApi,"SystemFrom",{get:function(){if(!Laya.Browser.onWeiXin)return n.other;var e=Laya.Browser.window.wx.getSystemInfoSync().system,t=-1!=e.indexOf("iOS"),a=-1!=e.indexOf("Android");return t?n.ios:a?n.android:n.other},enumerable:!0,configurable:!0}),Object.defineProperty(WxApi,"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}),WxApi.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("上传分数成功")}})},WxApi.cpVersionGreaterOrEqual=function(e,t){console.log("[LOG]基础库版本号 curVer:"+e+" targVer:"+t);var a=e.split("."),n=t.split("."),i=a.length;n.lengths)return!0;if(r=n.length},WxApi.newaccount=!1,WxApi.sceneValue="",WxApi.shareOpenId="",WxApi.querychannel="",WxApi.referrerInfoappId="",WxApi.isShowing=!1,WxApi.CanShake=!0,WxApi.times=1.3,WxApi.num=0,WxApi.offsetArr=[0,0],WxApi.offset=14,WxApi.canshakestage=!1,WxApi}();a.WxApi=i},{}],78:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("../utils/DispatcherManager"),i=e("../WXSDK/SocketNofify"),o=function(){function ServerSocket(){this._offlinestate=0,this._connetNums=0,this._socketconneting=!1,ServerSocket.ins=this}return Object.defineProperty(ServerSocket,"Instance",{get:function(){return null==ServerSocket.ins?new ServerSocket:ServerSocket.ins},enumerable:!0,configurable:!0}),ServerSocket.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))},ServerSocket.prototype.isConnect=function(){return!(!this.sock||!this.sock.connected)},ServerSocket.prototype.ioErro=function(e){void 0===e&&(e=null),this._socketconneting=!1,this._connetNums++,this.closewaitpanel(),this.removeSocket(),this._offlinestate=1},ServerSocket.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)},ServerSocket.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))},ServerSocket.prototype.onSocketClose=function(e){void 0===e&&(e=null),this._socketconneting=!1,this.closewaitpanel(),this._offlinestate=1,n.DispatcherManager.dispatchEvent(i.SocketNofify.SOCKET_CLOSE)},ServerSocket.prototype.closewaitpanel=function(){fairygui.GRoot.inst.closeModalWait()},ServerSocket.prototype.openwaitpanel=function(){fairygui.GRoot.inst.showModalWait()},ServerSocket.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)},ServerSocket.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)))},ServerSocket.prototype.onReceiveMessage=function(e){void 0===e&&(e=null);JSON.parse(e)},ServerSocket}();a.ServerSocket=o},{"../WXSDK/SocketNofify":79,"../utils/DispatcherManager":85}],79:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function SocketNofify(){}return SocketNofify.SOCKET_CONNECT_SUCCEED="SOCKET_CONNECT_SUCCEED",SocketNofify.SOCKET_CLOSE="SOCKET_CLOSE",SocketNofify.Game_againConnetSocket="Game_againConnetSocket",SocketNofify}();a.SocketNofify=n},{}],80:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function WECHATEVENT(){}return WECHATEVENT.WECHATEVENT_onhide="WECHATEVENT_onhide",WECHATEVENT.WECHATEVENT_onAudioInterruptionEnd="WECHATEVENT_onAudioInterruptionEnd",WECHATEVENT.WECHATEVENT_losefocus="WECHATEVENT_losefocus",WECHATEVENT.WECHATEVENT_getfocus="WECHATEVENT_getfocus",WECHATEVENT.WECHATEVENT_updateVideoNums="WECHATEVENT_updateVideoNums",WECHATEVENT.message_9891002="9891002",WECHATEVENT.message_9891101="9891101",WECHATEVENT.WECHATEVENT_loginSucceed="WECHATEVENT_loginSucceed",WECHATEVENT.WECHATEVENT_onshow="WECHATEVENT_onshow",WECHATEVENT.WECHATEVENT_fromscorfk="WECHATEVENT_fromscorfk",WECHATEVENT.message_9891001="9891001",WECHATEVENT.message_9891102="9891102",WECHATEVENT.message_9891103="9891103",WECHATEVENT}();a.WECHATEVENT=n},{}],81:[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"),l=e("../Data/UserDataInfo"),c=e("../utils/GlobalTip"),h=e("../utils/DispatcherManager"),u=e("../Control/AudioControl"),p=function(){function WXGamePlatform(){this.isShareing=!1,this.bannerRunTime=0,this._bannerTypeList=[],this._screenwidth=0,this.bannerheight=0,this.bannerwidth=0,this.isonResize=!1,this._openrankDict={},WXGamePlatform.ins=this}return Object.defineProperty(WXGamePlatform,"Instance",{get:function(){return null==WXGamePlatform.ins?new WXGamePlatform:WXGamePlatform.ins},enumerable:!0,configurable:!0}),WXGamePlatform.prototype.init=function(){this.showShareMenu({withShareTicket:!0}),this.onAudioInterruptionBegin(),this.onAudioInterruptionEnd()},WXGamePlatform.prototype.initShareDian=function(e){if(e&&e.length>0){var t;for(var a in e)t=e[a],WXGamePlatform.ShareDict[t.key]=t;var n=e[0];this.onShareAppMessage(n.tile,o.Global.cdnurl+n.img)}},WXGamePlatform.prototype.initData=function(){r.DateControl.Fresh?(WXGamePlatform.dayShareNum=0,WXGamePlatform.dayVideoNum=0,this.updateDayShareInfo(),this.updateDayVideoInfo()):(WXGamePlatform.dayShareNum=s.LocalDataControl.Instance.getnum(l.UserDataInfo.nowdayShare),WXGamePlatform.dayVideoNum=s.LocalDataControl.Instance.getnum(l.UserDataInfo.nowdayVideo))},WXGamePlatform.prototype.updateDayShareInfo=function(){s.LocalDataControl.Instance.addstr(l.UserDataInfo.nowdayShare,WXGamePlatform.dayShareNum.toString())},WXGamePlatform.prototype.updateDayVideoInfo=function(){s.LocalDataControl.Instance.addstr(l.UserDataInfo.nowdayVideo,WXGamePlatform.dayVideoNum.toString())},WXGamePlatform.prototype.createUserAndLogin=function(e,t,a,n){void 0===a&&(a=null),void 0===n&&(n=null),WXGamePlatform.loginCallobj=e,WXGamePlatform.loginsucceedcallback=t,WXGamePlatform.loginprogressCallback=a;var i=Laya.Browser.window.wx;if(i){var o=WXGamePlatform.Instance.getLaunchOptionsSync();if(o){var r=o.query;r&&r.ChanID&&(WXGamePlatform.QuDaoID=r.ChanID);var s=o.referrerInfo;""==WXGamePlatform.QuDaoID&&s&&s.appId&&(WXGamePlatform.QuDaoID=s.appId),o.scene&&(WXGamePlatform.fromscene=Number(o.scene))}i.getSystemInfoSync().SDKVersion;if(i.getUpdateManager){var l=i.getUpdateManager();l.onCheckForUpdate(function(a){1==a.hasUpdate?(l.onUpdateReady(function(){Laya.Browser.window.wx.showModal({title:"更新提示",content:"新版本已经准备好,是否重启应用?",success:function(e){e.confirm?l.applyUpdate():WXGamePlatform.Instance.exitGame()}})}),l.onUpdateFailed(function(){WXGamePlatform.Instance.exitGame()})):WXGamePlatform.Instance.login(e,t,n)})}else{WXGamePlatform.Instance.login(e,t,n)}}},WXGamePlatform.prototype.createUserInfoButton=function(e,t,a){this.userinfocallobj=e,this.userinfosuccallback=t,this.userinfofailcallback=a;var n=Laya.Browser.window.wx,i=n.getSystemInfoSync();if(i){var o=(i.windowWidth-151)/2,r=i.windowHeight-172-40;WXGamePlatform.Instance.userinfobutton=n.createUserInfoButton({type:"image",image:"wxlocal/login.png",style:{left:o,top:r,width:151,height:72}}),WXGamePlatform.Instance.userinfobutton.onTap(WXGamePlatform.Instance.userinfoButtonClick)}},WXGamePlatform.prototype.getaccredit=function(e,t){if(0==WXGamePlatform.accreditstate){var a=Laya.Browser.window.wx;a?a.getSetting({success:function(a){var n=a.authSetting;n.hasOwnProperty("scope.userInfo")&&1==n["scope.userInfo"]?t&&e&&t.call(e,!0):t&&e&&t.call(e,!1)}}):t&&e&&t.call(e,!0)}else t&&e&&t.call(e,!0)},WXGamePlatform.prototype.userinfoButtonClick=function(e){var t=WXGamePlatform.Instance;e&&("getUserInfo:ok"==e.errMsg?(WXGamePlatform.accreditstate=1,t.closeuserinfobUtton(),t.getUserInfo(!1,t.userinfocallobj,t.userinfosuccallback,t.userinfofailcallback)):t.userinfocallobj&&t.userinfofailcallback&&t.userinfofailcallback.call(t.userinfocallobj))},WXGamePlatform.prototype.closeuserinfobUtton=function(){var e=WXGamePlatform.Instance;e.userinfobutton&&(e.userinfobutton.offTap(e.userinfoButtonClick),e.userinfobutton.destroy(),e.userinfobutton=null)},WXGamePlatform.prototype.getUserInfo=function(e,t,a,n){fairygui.GRoot.inst.showModalWait();var i=WXGamePlatform.Instance,o=Laya.Browser.window.wx;o&&o.getUserInfo({success:function(o){var r=o.userInfo;WXGamePlatform.nickName=r.nickName,e?i.login(t,a,n):t&&a&&a.call(t,WXGamePlatform.nickName)}})},WXGamePlatform.prototype.login=function(e,t,a){var n=WXGamePlatform.Instance;Laya.Browser.window.wx&&Laya.Browser.window.wx.login({success:function(e){WXGamePlatform.code=e.code;var t={};""!=WXGamePlatform.QuDaoID&&(t.ChanID=WXGamePlatform.QuDaoID),t.Code=WXGamePlatform.code,t.AppID=o.Global.appid,t.Version=o.Global.gameVersion},fail:function(i){n.login(e,t,a)}})},WXGamePlatform.prototype.loginSucceedCallback=function(e){WXGamePlatform.loginCallobj&&WXGamePlatform.loginsucceedcallback&&WXGamePlatform.loginsucceedcallback.call(WXGamePlatform.loginCallobj,e)},WXGamePlatform.prototype.loadSubpackage=function(e,t,a,n,i){if(Laya.Browser.window.wx){this._subcallobj=t,this._subcallback=a,this._updatecallback=n,this._subfailcallback=i;var o=Laya.Browser.window.wx;if(o.loadSubpackage){var r=o.loadSubpackage({name:e,success:function(e){var t=WXGamePlatform.Instance;t._subcallback&&t._subcallobj&&t._subcallback.call(t._subcallobj)},fail:function(e){var t=WXGamePlatform.Instance;t._subfailcallback&&t._subcallobj&&t._subfailcallback.call(t._subcallobj)}});r.onProgressUpdate&&r.onProgressUpdate(function(e){var t=WXGamePlatform.Instance;t._updatecallback&&t._subcallobj&&t._updatecallback.call(t._subcallobj,e.progress)})}else t&&a&&a.call(t)}else t&&a&&a.call(t)},WXGamePlatform.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)}})},WXGamePlatform.prototype.onShareAppMessage=function(e,t){Laya.Browser.window.wx&&Laya.Browser.window.wx.onShareAppMessage(function(){return{title:e,imageUrl:t}})},WXGamePlatform.prototype.shareAppMessage=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.shareAppMessage(e)},WXGamePlatform.prototype.showShareMenu=function(e){void 0===e&&(e=null),Laya.Browser.window.wx&&Laya.Browser.window.wx.showShareMenu(e)},WXGamePlatform.prototype.updateShareMenu=function(e){void 0===e&&(e=null),Laya.Browser.window.wx&&Laya.Browser.window.wx.updateShareMenu(e)},WXGamePlatform.prototype.showMenu=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.showShareMenu()},WXGamePlatform.prototype.setStorageSync=function(e,t){var a=Laya.Browser.window.wx;a&&a.setStorageSync(e,t)},WXGamePlatform.prototype.getStorageSync=function(e){var t=Laya.Browser.window.wx;return t?t.getStorageSync(e):null},WXGamePlatform.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)}})},WXGamePlatform.prototype.toast=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.showToast({title:e})},WXGamePlatform.prototype.postMessage=function(e,t){void 0===t&&(t=null);var a=Laya.Browser.window.wx;a&&a.getOpenDataContext().postMessage({action:e,data:t})},WXGamePlatform.prototype.createInnerAudioContext=function(){return Laya.Browser.window.wx?Laya.Browser.window.wx.createInnerAudioContext():null},WXGamePlatform.prototype.getSystemInfoSync=function(){return Laya.Browser.window.wx?Laya.Browser.window.wx.getSystemInfoSync():null},WXGamePlatform.prototype.previewImage=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.previewImage(e)},WXGamePlatform.prototype.onHide=function(e,t){Laya.Browser.window.wx&&Laya.Browser.window.wx.onHide(function(a){WXGamePlatform.isShowing=!1,t&&e&&t.call(e,a)})},WXGamePlatform.prototype.getLaunchOptionsSync=function(){return Laya.Browser.window.wx?Laya.Browser.window.wx.getLaunchOptionsSync():null},WXGamePlatform.prototype.hideToast=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.hideToast(e)},WXGamePlatform.prototype.showModal=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.showModal(e)},WXGamePlatform.prototype.clearStorage=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.clearStorageSync()},WXGamePlatform.prototype.vibrateShort=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.vibrateShort()},WXGamePlatform.prototype.removeStorage=function(e){Laya.Browser.window.wx&&Laya.Browser.window.wx.removeStorage(e)},WXGamePlatform.prototype.onAudioInterruptionBegin=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.onAudioInterruptionBegin(function(){u.AudioControl.Instance.ClearAllSOUND()})},WXGamePlatform.prototype.onAudioInterruptionEnd=function(){Laya.Browser.window.wx&&Laya.Browser.window.wx.onAudioInterruptionEnd(function(){var e=WXGamePlatform.Instance;Laya.timer.clear(e,e.onAudioEndCallback),Laya.timer.once(500,e,e.onAudioEndCallback)})},WXGamePlatform.prototype.onAudioEndCallback=function(){h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_onAudioInterruptionEnd)},WXGamePlatform.prototype.exitGame=function(){var e=Laya.Browser.window.wx;e&&e.exitMiniProgram()},WXGamePlatform.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"})}},WXGamePlatform.prototype.onMemoryWarning=function(){var e=Laya.Browser.window.wx;e&&e.onMemoryWarning&&e.onMemoryWarning(function(){})},WXGamePlatform.prototype.onError=function(){var e=Laya.Browser.window.wx;e&&e.onError&&e.onError(function(e){console.log("*****onError",e)})},WXGamePlatform.prototype.startShareApp=function(e,t,a,n){void 0===t&&(t=null),void 0===a&&(a=null),void 0===n&&(n=null),WXGamePlatform.nowShareindex=0,WXGamePlatform.ShareDict[e]&&this.shareApp(WXGamePlatform.ShareDict[e],t,a,n)},WXGamePlatform.prototype.shareApp=function(e,t,a,n){this.nowshareObj=t,this.nowshareinfo=e,this.nowsharesucceedfun=a,this.nowsharefailfun=n,this.startShareTime=Laya.Browser.now(),this.isShareing=!0,WXGamePlatform.callbackfailstate=0,this.shareAppMessage({title:e.tile,imageUrl:o.Global.cdnurl+e.img,query:"",success:function(e){},fail:function(e){c.GlobalTip.Instance.showWordTips("您取消了分享"),n&&t&&n.call(t)},cancel:function(e){WXGamePlatform.callbackfailstate=1}})},WXGamePlatform.prototype.onShow=function(e,t,a){void 0===e&&(e=null),void 0===t&&(t=null),void 0===a&&(a=null),this.showobj=e,this.showCallback=t;var n=Laya.Browser.window.wx;n&&n.onShow(function(e){WXGamePlatform.isShowing=!0,e&&e.scene&&(WXGamePlatform.fromscene=Number(e.scene)),Laya.timer.frameOnce(1,WXGamePlatform.Instance,WXGamePlatform.Instance.onShowSucceed)})},WXGamePlatform.prototype.onShowSucceed=function(){var e=WXGamePlatform.Instance;if(e.showobj&&e.showCallback&&e.showCallback.call(e.showobj),e.isShareing){e.isShareing=!1;var t=!1;if(0==WXGamePlatform.callbackfailstate)((Laya.Browser.now()-e.startShareTime)/1e3>=WXGamePlatform.ShareTime||WXGamePlatform.nowShareindex>=3)&&(t=!0);WXGamePlatform.callbackfailstate=0,t?(WXGamePlatform.dayShareNum++,e.updateDayShareInfo(),e.nowshareObj&&e.nowsharesucceedfun&&e.nowsharesucceedfun.call(e.nowshareObj)):(WXGamePlatform.nowShareindex++,e.showModal({title:"提示",content:"请每次分享到不同群,是否重新分享?",showCancel:!0,cancelText:"取消",confirmText:"确定",success:function(e){var t=WXGamePlatform.Instance;e.confirm?WXGamePlatform.Instance.shareApp(t.nowshareinfo,t.nowshareObj,t.nowsharesucceedfun,t.nowsharefailfun):t.nowsharefailfun&&t.nowshareObj&&t.nowsharefailfun.call(t.nowshareObj)},fail:function(){},complete:function(){}}))}},WXGamePlatform.prototype.playVideo=function(e,t,a,n,o){var r=this;void 0===t&&(t=null),void 0===a&&(a=null),void 0===n&&(n=null),void 0===o&&(o=!0);var s=Laya.Browser.window.wx;if(s&&s.createRewardedVideoAd&&!WXGamePlatform.videoplaying){var l=this.lockVideoLeftTime();if(l>0)return void c.GlobalTip.Instance.showWordTips("广告尚未准备好,请"+l+"秒后再试");h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_losefocus),WXGamePlatform.istongjiVideoNum=o,this.nowvideokey=e,WXGamePlatform.videoplaying=!0,this.videocallobj=t,this.videosucceedCallback=a,this.videofailCallback=n,this.videoAd=s.createRewardedVideoAd({adUnitId:"adunit-0c687084c908ee89"}),this.videoAd.onClose(this.closeAD),this.videoAd.onError(this.onerro),this.videoAd.load().then(function(){return r.videoAd.show()}).catch(function(e){console.log(e.errMsg),WXGamePlatform.Instance.failVideo()})}},WXGamePlatform.prototype.lockVideoLeftTime=function(){var e=(Laya.Browser.now()-WXGamePlatform.lastVideoTime)/1e3;return e=WXGamePlatform.VideoTime-e,Math.ceil(e)},WXGamePlatform.prototype.onerro=function(e){var t=WXGamePlatform.Instance;WXGamePlatform.videoplaying=!1,t.videoAd.offError(t.onerro),t.videoAd.offClose(t.closeAD),h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_getfocus)},WXGamePlatform.prototype.closeAD=function(e){WXGamePlatform.lastVideoTime=Laya.Browser.now();var t=WXGamePlatform.Instance;e&&e.isEnded||null==e?(WXGamePlatform.istongjiVideoNum&&(WXGamePlatform.dayVideoNum++,t.updateDayVideoInfo(),h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_updateVideoNums)),t.videocallobj&&t.videosucceedCallback&&t.videosucceedCallback.call(t.videocallobj)):(c.GlobalTip.Instance.showWordTips("未观看完整视频,无法获得奖励"),t.videocallobj&&t.videofailCallback&&t.videofailCallback.call(t.videocallobj)),WXGamePlatform.videoplaying=!1,t.videoAd.offError(t.onerro),t.videoAd.offClose(t.closeAD),h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_getfocus)},WXGamePlatform.prototype.failVideo=function(){WXGamePlatform.lastVideoTime=Laya.Browser.now(),WXGamePlatform.videoplaying=!1,c.GlobalTip.Instance.showWordTips("广告加载失败,试试别的方式吧~");var e=WXGamePlatform.Instance;e.videoAd.offError(e.onerro),e.videoAd.offClose(e.closeAD),e.videocallobj&&e.videofailCallback&&e.videofailCallback.call(e.videocallobj),h.DispatcherManager.dispatchEvent(i.WECHATEVENT.WECHATEVENT_getfocus)},WXGamePlatform.prototype.isCanVideo=function(){if(WXGamePlatform.dayVideoNumt)&&(e18e4?(this.bannerAd.offError(this.bannerError),this.bannerAd.offResize(this.bannerResize),this.bannerAd.destory(),this.createNewBanner(t)):this.showBanner(t);else this.createNewBanner(t)}},WXGamePlatform.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-8c2d586135fa6d4f",adIntervals:30,style:{left:0,top:a.screenHeight-105,width:a.screenWidth*n}}),this.bannerAd&&(this.bannerAd.onError(this.bannerError),this.showBanner(e))}},WXGamePlatform.prototype.bannerResize=function(e){var t=WXGamePlatform.Instance;t.bannerAd.offResize(t.bannerResize),t.isonResize=!1;var a=t.nowStype;if(a){var n=t.getSystemInfoSync(),i=Laya.Browser.clientHeight/Laya.stage.displayHeight,o=Laya.Browser.clientWidth/Laya.stage.displayWidth;t.bannerwidth=e.width,t.bannerheight=e.height,a.hasOwnProperty("x")&&0!=a.x?t.bannerAd.style.left=a.x*o:t.bannerAd.style.left=.5*(n.windowWidth-e.width),a.hasOwnProperty("y")&&0!=a.y?t.bannerAd.style.top=a.y*i:t.bannerAd.style.top=n.windowHeight-e.height-15}},WXGamePlatform.prototype.bannerError=function(e){},WXGamePlatform.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()}},WXGamePlatform.prototype.hideBanner=function(e){if(void 0===e&&(e=""),this.bannerAd&&this.bannerAd.hide(),""!=e){for(var t=0;t0){var a=this._bannerTypeList[this._bannerTypeList.length-1];this.createBanner(a.type,a.style)}}},WXGamePlatform.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)},WXGamePlatform.prototype.changeFriendRank=function(e){this.postMessage(e)},WXGamePlatform.prototype.prePageRank=function(){},WXGamePlatform.prototype.nextPageRank=function(){},WXGamePlatform.prototype.closeFriendRank=function(e){for(var t in this.closeziyuStage(),this._openrankDict[e]&&delete this._openrankDict[e],this._openrankDict){var a=this._openrankDict[t];this.openFriendRank(a.type,a.viewType,a.rect,a.parent,a.data);break}},WXGamePlatform.prototype.initziyuStage=function(e,t){},WXGamePlatform.prototype.closeziyuStage=function(){},WXGamePlatform.prototype.storeToCloud=function(e,t){var a=s.LocalDataControl.Instance,n=a.getnum("param1"),i=e=Math.floor(e),o=t=Math.floor(t);it&&(a=t),a},e.randRangefloat=function(e,t){var a=Math.random()*(t-e+1)+e;return a>t&&(a=t),a},e.getTexbyPkgAndName=function(e,t){var a=fairygui.UIPackage.getByName(e);return a?a.getItemAssetByName(t):null},e.cutfenhaoPoint=function(e){var t=e.split(";");return new Laya.Point(Number(t[0]),Number(t[1]))},e.cutfenhaotoArrnum=function(e){var t=[];if(""==e)return t;for(var a=e.split(";"),n=0;no)return 1;if(i0)GlobalTip.showWordList[GlobalTip.showWordList.length-1].nowword;if(GlobalTip.wordList.length>0){var t=GlobalTip.wordList.shift();i.LayoutControl.Instance.AddLayerByName(t,o.LayOUT.TIP),GlobalTip.showWordList.push(t),t.showWord(e)}else if(GlobalTip.showWordList.length<10){var a=new n.WordTipsPanel;i.LayoutControl.Instance.AddLayerByName(a,o.LayOUT.TIP),GlobalTip.showWordList.push(a),a.showWord(e)}else{(a=GlobalTip.showWordList.shift()).showWord(e),GlobalTip.showWordList.push(a)}},GlobalTip.prototype.addwordList=function(e){if(e){e.removeFromParent();var t=GlobalTip.showWordList.indexOf(e);-1!=t&&GlobalTip.showWordList.splice(t,1),i.LayoutControl.Instance.ClearLayerByName(o.LayOUT.TIP),GlobalTip.wordList.push(e)}},GlobalTip.wordList=[],GlobalTip.showWordList=[],GlobalTip.maxNum=10,GlobalTip.isEvent=!1,GlobalTip}();a.GlobalTip=l},{"../Control/LayoutControl":22,"../View/GlobalTipPanel":64,"../utils/DispatcherManager":85,"../utils/GameState":86,"../utils/LayOUT":90}],89:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function LEvent(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(LEvent,e),LEvent.prototype.clone=function(e){return new LEvent(this.type,e||this._obj)},LEvent.prototype.toString=function(){console.log(this.CLASS_NAME,"type","bubbles","cancelable")},Object.defineProperty(LEvent.prototype,"param",{get:function(){return this._obj},enumerable:!0,configurable:!0}),LEvent}(Laya.Event);a.LEvent=n},{}],90:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function LayOUT(){}return LayOUT.BG="BG",LayOUT.UI="UI",LayOUT.UITop="UITop",LayOUT.TIP="TIP",LayOUT.GUIDE="GUIDE",LayOUT}();a.LayOUT=n},{}],91:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){function Singleton(){return e.call(this)||this}return __extends(Singleton,e),Singleton.Instance=function(e){if(null==e.key)throw new Error("getinstance erro");return this._dict[e.key]},Singleton.getInstanceOrCreate=function(e){if(null==e.key)throw new Error("getInstanceOrCreate erro");return this.create(e),this._dict[e.key]},Singleton.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]},Singleton.remove=function(e){var t=e.key;null!=this._dict[t]&&this._dict[t].destory()},Singleton.prototype.destory=function(){},Singleton._dict={},Singleton}(Laya.EventDispatcher);a.Singleton=n},{}],92:[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=Laya.MovieClip,l=e("../WXSDK/ttad"),c=function(e){function SkinItem(){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(SkinItem,e),SkinItem.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"#"+e+t+(a=2==a.length?a:"0"+a)},SkinItem.prototype.constructFromXML=function(t){for(var a in e.prototype.constructFromXML.call(this,t),this._children){var n=this._children[a];this[n.name]=n}this.onInit()},SkinItem.prototype.onInit=function(){this.initView(),this.initEvent()},SkinItem.prototype.initView=function(){this.agencyskin=i.PanelResDic.Instance.getSingleTon(n.AgencySkin),this.c_state=this.getController("c_state")},SkinItem.prototype.initEvent=function(){this.on(Laya.Event.CLICK,this,this.btnclick)},SkinItem.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:this.playvideocallback();break;case 4:this.agencyskin.GainPifu(this.pifuvo)}},SkinItem.prototype.createMovieClip=function(){var e=new s;e.load(this.SWFPath),e.x=(Laya.stage.width-this.MCWidth)/2,e.y=(Laya.stage.height-this.MCHeight)/2,Laya.stage.addChild(e)},SkinItem.prototype.playvideocallback=function(){var e=this;l.ttad.ShowVideo(function(t){t&&e.agencyskin.GainPifu(e.pifuvo)})},SkinItem.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}},SkinItem.prototype.preFixNumber=function(e,t){return("0000000000"+e).slice(-t)},SkinItem.prototype.evalBgColor=function(){var e=16777215*Math.random();this.getColorChannals(e)},SkinItem.prototype.getColorChannals=function(e){var t=[];return t.push(e>>16),t.push(e>>8&255),t.push(255&e),t},SkinItem.prototype.dispose=function(){this.off(Laya.Event.CLICK,this,this.btnclick),e.prototype.dispose.call(this)},SkinItem}(fairygui.GButton);a.SkinItem=c},{"../Agency/AgencySkin":6,"../Config/AssetPath":15,"../PrefabControl/PanelResDic":48,"../WXSDK/ttad":83,"../utils/GlobalTip":88}],93:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function ViewAction(){this._text=null}return ViewAction.prototype.onStateEnter=function(){console.log("动画开始播放了"),this._text.text="动画状态:动画开始播放"},ViewAction.prototype.onStateUpdate=function(){console.log("动画状态更新了"),this._text.text="动画状态:动画更新中"},ViewAction.prototype.onStateExit=function(){console.log("动画退出了"),this._text.text="动画状态:动画开始退出"},ViewAction.prototype.addBox=function(){for(var e=0;e<8;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)},ViewAction.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},ViewAction.ActionType_addscaleMinToMax="ActionType_addscaleMinToMax",ViewAction.ActionType_removescaleMaxToMin="ActionType_removescaleMaxToMin",ViewAction.ActionType_none="ActionType_none",ViewAction.ActionType_addmoveToMiddle="ActionType_addmoveToMiddle",ViewAction.ActionType_removemoveToRight="ActionType_removemoveToRight",ViewAction.ActionType_addmoveFromBottom="ActionType_addmoveFromBottom",ViewAction.ActionType_addmoveFromup="ActionType_addmoveFromup",ViewAction}();a.ViewAction=n},{}]},{},[44]);