!function(){"use strict";class e extends Laya.Image{constructor(){super(),this.scaleTime=80,this.clickId=!1,this.on(Laya.Event.MOUSE_DOWN,this,this.scaleSmall),this.on(Laya.Event.MOUSE_OVER,this,this.overs),this.on(Laya.Event.MOUSE_UP,this,this.scaleBig),this.on(Laya.Event.MOUSE_OUT,this,this.mouseout)}scaleBig(e){this.clickId&&(this.clickId=!1,this.alpha=1,this.CZ&&this.CZ())}overs(){this.alpha=.7}mouseout(){this.alpha=1}scaleSmall(e){this.clickId=!0}onDestroy(){this.ClearRunTime()}ClearRunTime(){this.off(Laya.Event.MOUSE_DOWN,this,this.scaleSmall),this.off(Laya.Event.MOUSE_UP,this,this.scaleBig),this.off(Laya.Event.MOUSE_OUT,this,this.mouseout),this.off(Laya.Event.MOUSE_OVER,this,this.overs),this.CZ=null}}class t{static getM_Vector(e,t){let i=new Laya.Vector3;return Laya.Vector3.add(e,t,i),new Laya.Vector3(.5*i.x,.5*i.y,.5*i.z)}static SpliteString(e,t){var i=t||";";let a=e.split(i),n=[];for(let e=0;e.5?-1:1;return Math.random()*e}static get64Encode(e){for(var t,i,a,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,o=e.length,r="";s>2),r+=n.charAt((3&t)<<4),r+="==";break}if(i=e.charCodeAt(s++),s==o){r+=n.charAt(t>>2),r+=n.charAt((3&t)<<4|(240&i)>>4),r+=n.charAt((15&i)<<2),r+="=";break}a=e.charCodeAt(s++),r+=n.charAt(t>>2),r+=n.charAt((3&t)<<4|(240&i)>>4),r+=n.charAt((15&i)<<2|(192&a)>>6),r+=n.charAt(63&a)}return r}static randomInt(e,t){return t=2)if(Math.random()<=1){if(!l.callback)return;l.callback(!0,1)}else{if(!l.callback)return;Math.random()<=.5?kt.Instance.ShowTips("分享失败!"):kt.Instance.ShowTips("请分享到不同的群!"),l.callback(!1,1)}else{if(!l.callback)return;Math.random()<=.5?kt.Instance.ShowTips("分享失败!"):kt.Instance.ShowTips("请分享到不同的群!"),l.callback(!1,1)}}})}}l.IsSharing=!1;class c{static Reg(){}}var d=Laya.Templet,p=Laya.Event;class u{constructor(){this.mStartX=200,this.mStartY=500,this.mActionIndex=0,this.mCurrIndex=0,this.mCurrSkinIndex=0}static get Instance(){return this.instance||(this.instance=new u)}GetThing(e){return this._thing?this._thing[e-1]:null}GetTheme(e){return this._theme?this._theme[e-1]:null}GetRoad(e){return this._road?this._road[e-1]:null}GetRate(e){return this._rate?this._rate[e-1]:null}GetStreet(e){return this._block?this._block[e-1]:null}GetGlobal(e){if(this._globe)for(let t=0;t=this.mArmature.getAnimNum()&&(this.mCurrIndex=0),this.mArmature.play(this.mCurrIndex,!1)}}class g{loadUI(){Laya.loader.load(["res/threeDimen/ui/button.png"],Laya.Handler.create(this,function(){var e=Laya.stage.addChild(new Laya.Button("res/threeDimen/ui/button.png","切换注视目标"));e.size(200,40),e.labelBold=!0,e.labelSize=30,e.sizeGrid="4,4,4,4",e.scale(Laya.Browser.pixelRatio,Laya.Browser.pixelRatio),e.pos(Laya.stage.width/2-e.width*Laya.Browser.pixelRatio/2,Laya.stage.height-100*Laya.Browser.pixelRatio),e.on(Laya.Event.CLICK,this,function(){this.index++,this.index%3==1?this.camera.transform.lookAt(this.box.transform.position,this.upVector):this.index%3==2?this.camera.transform.lookAt(this.cylinder.transform.position,this.upVector):this.camera.transform.lookAt(this.capsule.transform.position,this.upVector)})}))}}g.MainScene="subpackage/LayaScene_MainScene/Conventional/main.ls",g.Player=["subpackage/LayaScene_Character/Conventional/Character1.lh","subpackage/LayaScene_Character/Conventional/Character2.lh","subpackage/LayaScene_Character/Conventional/Character3.lh","subpackage/LayaScene_Character/Conventional/Character4.lh","subpackage/LayaScene_Character/Conventional/Character5.lh","subpackage/LayaScene_Character/Conventional/Character6.lh","subpackage/LayaScene_Character/Conventional/Character7.lh","subpackage/LayaScene_Character/Conventional/Character8.lh"],g.Enemy="subpackage/LayaScene_Character/Conventional/enemy.lh",g.PlayerShot="subpackage/LayaScene_Property/Conventional/PlayerShoot.lh",g.Mound="subpackage/LayaScene_Property/Conventional/Mound.lh",g.Barrier=["subpackage/LayaScene_barrier/Conventional/barrier_1.lh","subpackage/LayaScene_barrier/Conventional/barrier_2.lh","subpackage/LayaScene_barrier/Conventional/barrier_3.lh","subpackage/LayaScene_barrier/Conventional/barrier_4.lh","subpackage/LayaScene_barrier/Conventional/move_barrier.lh","subpackage/LayaScene_barrier/Conventional/stone_1.lh","subpackage/LayaScene_barrier/Conventional/stone_2.lh","subpackage/LayaScene_barrier/Conventional/stone_3.lh","subpackage/LayaScene_barrier/Conventional/stone_4.lh","subpackage/LayaScene_barrier/Conventional/Block1.lh"],g.Particle=["subpackage/LayaScene_Particle/Conventional/Explode.lh","subpackage/LayaScene_Particle/Conventional/Hit.lh","subpackage/LayaScene_Particle/Conventional/Blood.lh"],g.Config={level:"level",road:"road",block:"block",thing:"thing",atk:"atk",rate:"rate",global:"global",theme:"theme"};class y{constructor(){this._outHitResult=new Laya.HitResult,this.outs=new Array,this.posX=0,this.posY=0,this.point=new Laya.Vector2}addBoxXYZ(e,t,i){var a=new Laya.BlinnPhongMaterial;Laya.Texture2D.load("res/threeDimen/Physics/rocks.jpg",Laya.Handler.create(null,function(e){a.albedoTexture=e}));var n=.75*Math.random()+.25,s=.75*Math.random()+.25,o=.75*Math.random()+.25,r=new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(n,s,o));this.scene.addChild(r),r.meshRenderer.material=a,this.tmpVector.setValue(e,t,i),r.transform.position=this.tmpVector,this.tmpVector.setValue(360*Math.random(),360*Math.random(),360*Math.random()),r.transform.rotationEuler=this.tmpVector;var h=r.addComponent(Laya.Rigidbody3D),l=new Laya.BoxColliderShape(n,s,o);h.colliderShape=l,h.mass=10}}y.moveTime=1;var m=Laya.TiledMap,w=Laya.Rectangle,f=Laya.Browser,I=Laya.Handler;class v{constructor(){this.stage=1,this.equipId=1,this.mLastMouseX=0,this.mLastMouseY=0,this.mX=0,this.mY=0}static get Instance(){return v.instance||(v.instance=new v)}static GlobalMessage(){v.tower_reward=Number(u.Instance.GetGlobal("tower_reward")),v.block_reward=Number(u.Instance.GetGlobal("block_reward")),v.enemy_reward=Number(u.Instance.GetGlobal("enemy_reward"))}InitPlayer(){var e=D.Instance.CurModel;v.instance.stage=Number(e.GetUserAttr(P.stage))+1,v.instance.equipId=Number(e.GetUserAttr(P.equip_themes)[1]),this.SetInfo()}SpeedUp(e,t,i,a){let n=[{t:D.Instance.CurModel.ServerTime},{attr:"rate"},{level:e},{channel:t},{amount:i}];T.Instance.HttpPostRequest(B.protocols.UpgradeAttr,n,e=>{a&&a(!0)},e=>{a&&a(!1)})}SetInfo(){let e=D.Instance.CurModel.GetUserAttr(P.attrs).power;this.powerLevel=e?Number(e):1;let t=u.Instance._atk.length,i=this.powerLevel>t?t:this.powerLevel;v.bulletAttack=u.Instance.GetAtk(i).atk;let a=D.Instance.CurModel.GetUserAttr(P.attrs).rate;this.rateLevel=a?Number(a):1;let n=u.Instance._rate.length,s=this.rateLevel>n?n:this.rateLevel;v.bulletTime=u.Instance.GetRate(s).rate}createMap(){this.tiledMap=new m,this.mX=this.mY=0,this.tiledMap.createMap("res/tiledMap/desert.json",new w(0,0,f.width,f.height),new I(this,this.completeHandler))}completeHandler(){console.log("地图创建完成"),console.log("ClientW:"+f.clientWidth+" ClientH:"+f.clientHeight),Laya.stage.on(Laya.Event.RESIZE,this,this.resize),this.resize()}mouseDown(){this.mLastMouseX=Laya.stage.mouseX,this.mLastMouseY=Laya.stage.mouseY,Laya.stage.on(Laya.Event.MOUSE_MOVE,this,this.mouseMove)}mouseMove(){this.tiledMap.moveViewPort(this.mX-(Laya.stage.mouseX-this.mLastMouseX),this.mY-(Laya.stage.mouseY-this.mLastMouseY))}mouseUp(){this.mX=this.mX-(Laya.stage.mouseX-this.mLastMouseX),this.mY=this.mY-(Laya.stage.mouseY-this.mLastMouseY),Laya.stage.off(Laya.Event.MOUSE_MOVE,this,this.mouseMove)}resize(){this.tiledMap.changeViewPort(this.mX,this.mY,f.width,f.height)}PowerUp(e,t,i,a){let n=[{t:D.Instance.CurModel.ServerTime},{attr:"power"},{level:e},{channel:t},{amount:i}];T.Instance.HttpPostRequest(B.protocols.UpgradeAttr,n,e=>{a&&a(!0)},e=>{a&&a(!1)})}}v.bulletAttack=1,v.bulletTime=.3;class L{}L.playerRayLengthF=1.3,L.playerRayLengthLR=.3,L.bulletRayLength=1,L.bulletMaxDis=40,L.barrierRoadLength=50,L.barrierRoadAverageNum=50,L.playerspeed=.1,L.matespeed=.2,L.hitmaxcount=2,L.boommaxcount=2,L.blockLRmoveMaxDis=5,L.arriveStandWidth=5,L.enemySpeed=.1,L.shootspeed=.8,L.sliderFactor=.02,L.playerMoveMaxX=4.5;var x=Laya.Sprite,S=Laya.Event,C=Laya.SoundManager,k=Laya.Handler;class b{static GameInfo(){v.Instance.InitPlayer()}static SetCfg(e){u.Instance._level=e[g.Config.level],u.Instance._road=e[g.Config.road],u.Instance._block=e[g.Config.block],u.Instance._thing=e[g.Config.thing],u.Instance._atk=e[g.Config.atk],u.Instance._rate=e[g.Config.rate],u.Instance._theme=e[g.Config.theme],u.Instance._globe=e[g.Config.global],v.GlobalMessage()}setup(){var e=this.createButton("播放音效");e.x=(Laya.stage.width-2*e.width+10)/2,e.y=(Laya.stage.height-e.height)/2,Laya.stage.addChild(e);var t=this.createButton("播放音乐");t.x=e.x+10+e.width,t.y=e.y,Laya.stage.addChild(t),e.on(S.CLICK,this,this.onPlaySound),t.on(S.CLICK,this,this.onPlayMusic)}createButton(e){var t=new x;return t.size(110,40),t.graphics.drawRect(0,0,110,40,"#FF7F50"),t.graphics.fillText(e,55,8,"25px SimHei","#FFFFFF","center"),Laya.stage.addChild(t),t}onPlayMusic(e){console.log("播放音乐"),C.playMusic("res/sounds/bgm.mp3",1,new k(this,this.onComplete))}onPlaySound(e){console.log("播放音效"),C.playSound("res/sounds/btn.mp3",1,new k(this,this.onComplete))}onComplete(){console.log("播放完成")}static Appseting(e){y.shareimage=e.shareimage,y.sharetitle=e.sharetitle,y.bannerCanMove=Number(e.bannerCanMove),y.moveTime=Number(e.moveTime),y.OpenSceneValue=Number(e.OpenSceneValue),y.freeUpdateVideotime=Number(e.freeUpdateVideotime),y.freecoinValue=Number(e.freecoinValue),y.freeGetcoinTime=Number(e.freeGetcoinTime),y.cheat=e.cheat,y.cheattime=e.cheattime,y.checkscene=e.checkscene,L.playerspeed=Number(e.playerspeed),L.matespeed=Number(e.friendspeed),L.shootspeed=Number(e.bulletspeed),L.sliderFactor=Number(e.sliderFactor),L.playerMoveMaxX=Number(e.playerMoveMaxX),L.playerRayLengthF=Number(e.playerRayLengthF),L.playerRayLengthLR=Number(e.playerRayLengthLR),L.bulletRayLength=Number(e.bulletRayLength),L.bulletMaxDis=Number(e.bulletMaxDis),L.barrierRoadLength=Number(e.barrierRoadLength),L.barrierRoadAverageNum=Number(e.barrierRoadAverageNum),L.hitmaxcount=Number(e.hitmaxcount),L.boommaxcount=Number(e.boommaxcount),L.blockLRmoveMaxDis=Number(e.blockLRmoveMaxDis),L.arriveStandWidth=Number(e.arriveStandWidth),L.enemySpeed=Number(e.enemySpeed)}static get Cheat(){return"1"==y.cheat}static get CheatTime(){return Number(y.cheattime)}static get CheckScene(){return"1"==y.checkscene}}var M=Laya.Event,_=Laya.HttpRequest;const R="https://gungangfengyunapi.xwxgame.com/";class B{}B.protocols={Login:"user/login",Userauth:"user/auth",BuyLand:"shop/land",UserSync:"user/sync",ShopBuild:"shop/build",ShopUpgrade:"shop/upgrade",ShopSale:"shop/sale",RoleUpgrade:"role/upgrade",Fissionvd:"fission/vd",DailyTaskrefresh:"dailytask/refresh",DailyTaskrewards:"dailytask/rewards",Rankingvmoney:"ranking/vmoney",Lotterylottery:"lottery/lottery",AchievementgetRewards:"achievement/getRewards",Fissiondeduct:"fission/deduct",Sign:"sign/sign",InvitegetRewards:"invite/getRewards",InvitetargetRewards:"invite/targetRewards",GameResult:"game/play",Easter:"game/revival",GetCfg:"config/table",DoubleAward:"fission/vd",KunDiscard:"kun/discard",KunEquip:"kun/equip",KunMove:"kun/move",KunBuy:"kun/buy",Opentreasure:"treasure/open",Entertreasure:"treasure/enter",Buy:"theme/buy",Equip:"theme/equip",themefission:"theme/fission",Start:"game/start",UpgradeAttr:"attr/upgrade"};class T{PostTokenRequest(e,t,i,a=!0){let n="",s=R+e;n=n=`token=${D.Instance.CurModel.m_token}`;let o=new _;o.once(M.COMPLETE,this,this.onHttpRequestComplete,[t,i,o,a]),o.once(M.ERROR,this,this.onHttpRequestError,[i,o]),o.send(s,n,"post","text"),a&&N.ShowLoading("")}onHttpRequestComplete(e,i,a,n){let s;(n&&N.HideLoading(),s=JSON.parse(a.data),console.log("请求成功:"+JSON.stringify(s)),0==s.code)?(D.Instance.RefreshModel(s),null!=e&&e(s)):null!=i&&i(t.SpliteString(s.message,",")[0])}onHttpRequestError(e,t,i){if(null!=e){var a=JSON.parse(t.data);e(a)}console.log("Error! Http request error, code: "+a),i&&N.HideLoading()}static get Instance(){return T.instance||(T.instance=new T)}login(e,t,i){console.log("发送登录请求");var a=D.Instance,n=s.VER;let o=`code=${a.m_code}&nickname=${a.m_nickname}&avatar=${a.m_avatar}&gender=${a.m_gender}&country=${a.m_country}&province=${a.m_province}&city=${a.m_city}&device=${a.m_device}&share_id=${a.m_share_id}&scene=${a.channel}&v=${n}`;console.log("登录 参数: "+o);let r=new _;r.once(M.PROGRESS,this,this.onHttpRequestProgress,[e,r]),r.once(M.COMPLETE,this,this.onLoginRequestComplete,[t,r]),r.once(M.ERROR,this,this.onHttpRequestError,[i,r]),r.send(R+B.protocols.Login,o,"post","text")}onHttpRequestProgress(){}onLoginRequestComplete(e,t){let i=JSON.parse(t.data);if(console.log(i),console.log("登录完成"),"0"!=i.code){var a=JSON.stringify(t.data);return console.log("登录异常错误!错误信息:",a),void e(i)}D.Instance.SetUserModel(new E(i.token,i.configs,i.app_setting,i.user,i.user_base,i.user_invite,i.user_lottery,i.user_treasure,i.t,i.user_achievement,i.user_sign,i.user_arena,i.is_new,i.user_shop,i.user_daily_task,i.user_video)),b.Appseting(i.app_setting);var n=i.table_version;D.Instance.CurModel.JundgCfg(n,t=>{t&&(b.GameInfo(),e(i))}),N.ShareMessage()}PostCfgRequest(e,t){let i="",a=R+B.protocols.GetCfg;i=`token=${D.Instance.CurModel.m_token}`;let n=new _;n.once(M.COMPLETE,this,()=>{var i=JSON.parse(n.data);0==i.code?null!=e&&i.configs&&e(i.configs):null!=t&&t(i)}),n.once(M.ERROR,this,()=>{var e=JSON.parse(n.data);null!=t&&t(e)}),n.send(a,i,"post","text")}HttpPostRequest(e,i,a,n,s=!0,o=!0){let r="",h=R+e;if(1==s&&(r=`token=${D.Instance.CurModel.m_token}&`),e==B.protocols.UserSync||e==B.protocols.Fissionvd||e==B.protocols.Lotterylottery||e==B.protocols.Fissiondeduct||e==B.protocols.KunBuy||e==B.protocols.KunDiscard||e==B.protocols.KunEquip||e==B.protocols.KunMove||e==B.protocols.Start||e==B.protocols.GameResult||e==B.protocols.themefission||e==B.protocols.Opentreasure||e==B.protocols.UpgradeAttr){let e="abcdefghijkimnopqrstuvwxyz0123456789",a="{",n="";for(let t=0;t<4;t++)n+=e[Math.floor(100*Math.random())%e.length];for(let e=0;e{t.progress&&t.progress(i)}),i.once(Laya.Event.ERROR,this,()=>{t.error&&t.error(i)}),i.once(Laya.Event.COMPLETE,this,()=>{t.complete&&t.complete(i)})),i.send("https://r.94xj.net/e",e,"post","json",["Content-Type","application/json"])}static ErrorReport(){this.errorRequest({code:1003,msg:"invalid code",user_id:0,game:"parkourrace",type:"backend",platform:"weixin"},{complete:e=>{},error:e=>{}})}}var V,P,A;!function(e){e[e.train=0]="train",e[e.sign=1]="sign",e[e.rewards=2]="rewards"}(V||(V={})),function(e){e[e.user_id=0]="user_id",e[e.diamond=1]="diamond",e[e.energy=2]="energy",e[e.list_kun=3]="list_kun",e[e.stage=4]="stage",e[e.vmoney=5]="vmoney",e[e.equip_kun=6]="equip_kun",e[e.unlock_kun=7]="unlock_kun",e[e.buyed_kun=8]="buyed_kun",e[e.money=9]="money",e[e.progress_themes=10]="progress_themes",e[e.equip_themes=11]="equip_themes",e[e.get_themes=12]="get_themes",e[e.attrs=13]="attrs"}(P||(P={}));class E{constructor(e,t,i,a,n,s,o,r,h,l,c,d,p,u,g,y){this.loginSeverTime=0,this.m_avatar="",this.localTime=Laya.timer.currTimer,this.loginSeverTime=h,this.m_token=e,this.m_user=a,this.m_base=n,this.m_invite=s,this.m_lottery=o,this.m_treasure=r,this.m_achievement=l,this.m_sign=c,this.m_arena=d,this.m_shop=u,this.user_video=y,this.user_daily_task=g,this.m_userid=this.m_user.user_id,this.m_openid=this.m_base.openid,this.m_nickname=this.m_base.nickname,this.is_new=Number(p)}GetUserAttr(e){var t=P[e];return this.m_user[t]}get ServerTime(){let e=Laya.timer.currTimer;return this.loginSeverTime+Math.ceil((e-this.localTime)/1e3)}HasTheme(e){for(var t=this.GetUserAttr(P.get_themes),i=0;i{i.VER=e,Laya.LocalStorage.setJSON(s.CFG,i),b.SetCfg(i),t(!0)},e=>{console.log("配置获取失败"+e),t(!1)})):(console.log("本地没有cfg"),T.Instance.PostCfgRequest(i=>{console.log("cfg"+i),i.VER=e,Laya.LocalStorage.setJSON(s.CFG,i),b.SetCfg(i),t(!0)},e=>{console.log("配置获取失败"+e)}))}}class D{get CurModel(){return this.curModel}constructor(e,t,i,a,n,s,o,r,h,l){D.instance=this,this.m_code=e,this.m_nickname=t||"",this.m_avatar=i||"",this.m_gender=a||0,this.m_city=o||"",this.m_device=r||"",this.m_share_id=h||"",this.channel=l||"",this.m_country=n||"",this.m_province=s||""}static get Instance(){return D.instance?D.instance:(D.instance=new D("11","","",0,"","","","","",""),D.instance)}SetUserModel(e){this.curModel=e}RefreshModel(e){e.user&&(this.curModel.m_user=e.user),e.user_invite&&(this.curModel.m_invite=e.user_invite),e.user_lottery&&(this.curModel.m_lottery=e.user_lottery),e.user_achievement&&(this.curModel.m_achievement=e.user_achievement),e.user_sign&&(this.curModel.m_sign=e.user_sign),e.user_shop&&(this.curModel.m_shop=e.user_shop),e.user_daily_task&&(this.curModel.user_daily_task=e.user_daily_task),e.user_video&&(this.curModel.user_video=e.user_video)}}!function(e){e[e["登录加载"]=0]="登录加载",e[e["界面开启"]=1]="界面开启"}(A||(A={}));class N{static get ShareId(){return this.shareId}static get Chanel(){return this._chanel}static init(e){this.EventStatistics(),Laya.Browser.window.wx.showShareMenu({withShareTicket:!0}),Laya.Browser.window.wx.onShow(this.InitWx)}static InitWx(e){var t=e.query.share_id;this.shareId=t||"",s.wxValue=e.scene;var i=Laya.LocalStorage.getItem("scene");i?(s.wxValue=i,console.log("读取配置场景值:"+i)):(console.log("第一次拉取场景值:"+s.wxValue),Laya.LocalStorage.setItem("scene",s.wxValue));var a=e.query.channel;this._chanel=a||"",Laya.Browser.window.wx.offShow(N.InitWx)}static ShareMessage(){if(s.isWx){var e,i,a=D.Instance.CurModel.ServerTime;if(e=y.sharetitle,i=y.shareimage,null==e)e="枪王之王...",i="res/share.png";else{let a=t.SpliteString(e),n=t.SpliteString(i);e=a[t.randomInt(0,a.length-1)],i=n[t.randomInt(0,n.length-1)]}console.log("_title:",e),console.log("_url:",i),Laya.Browser.window.wx.onShareAppMessage(()=>({title:e,imageUrl:i,query:"share_id="+D.Instance.CurModel.m_userid+"_other_"+a+"_"+Math.floor(9999*Math.random()).toString()}))}}static Login(e){N.Lodining||(N.Lodining=!0,Laya.Browser.window.wx.login({success:function(t){console.log("wx.login: success! res.code="+t.code),t.code?(N.Lodining=!1,console.log("将要传递的参数:"+t),e(t)):(console.log("获取用户登录态失败!"+t.errMsg),e("error"))},fail:function(t){console.log("wx.login: failed, res="+t),N.Lodining=!1,e("error")}}))}static ShowLoading(e="加载中...",t=!0){console.log(e),Laya.Browser.window&&Laya.Browser.window.wx?(t&&Laya.Browser.window.wx.showLoading({title:e,mask:!0}),kt.Instance.OpenMask()):kt.Instance.OpenMask()}static HideLoading(e=!0){Laya.Browser.window&&Laya.Browser.window.wx?(e&&Laya.Browser.window.wx.hideLoading(),kt.Instance.CloseMask()):kt.Instance.CloseMask()}static SystemInfo(){if(Laya.Browser.window.wx)return N.sysdata||(N.sysdata=Laya.Browser.window.wx.getSystemInfoSync()),N.sysdata}static ShowToast(e,t=!0){if(Laya.Browser.window.wx){var i=t?"success":"none";e=e||"暂未开放...",Laya.Browser.window.wx.showToast({title:e,icon:i})}else console.log(e)}static ShortVibrate(){if(Laya.Browser.window.wx&&h.Instance.vibrate){if(N.vibrating)return;N.vibrating=!0,Laya.Browser.window.wx.vibrateShort({complete:function(e){N.vibrating=!1}})}}static LongVibrate(){if(Laya.Browser.window.wx&&h.Instance.vibrate){if(N.vibrating)return;N.vibrating=!0,Laya.Browser.window.wx.vibrateLong({complete:function(e){N.vibrating=!1}})}}static Success(e){s.isWx&&Laya.Browser.window.wx.aldStage.onEnd({stageId:e,stageName:"第"+e+"关",event:"complete",params:{desc:"关卡完成"}})}static AldEvent(e,t){Laya.Browser.window&&Laya.Browser.window.wx&&Laya.Browser.window.wx.aldSendEvent(e,{key:""})}static EventStatistics(){let e=Laya.LocalStorage.getItem("uuidTimes");if(e){let t=new Date(Number(e)),i=new Date(Laya.timer.currTimer);i.setHours(0,0,0,0),t.valueOf(){console.log("授权结果.."),console.log(e),1==e.authSetting["scope.userInfo"]&&(N.isAuth=!0,Laya.Browser.window.wx.getUserInfo({lang:"zh_CN",success:e=>{D.Instance.CurModel.m_nickname=e.userInfo.nickName,D.Instance.CurModel.m_avatar=e.userInfo.avatarUrl,console.log("已经受过权")},fail:()=>{console.log("调用getUserInfo fail")}}))}})}static RequestAuth(e){if(N.isAuth)null!=e&&e(!0);else if(s.isWx){console.log("-----授权"),(()=>{let t=Laya.stage.width,i=Laya.stage.height;console.log("准备授权");let a=Laya.Browser.window.wx.createUserInfoButton({type:"text",text:"",style:{left:0,top:0,width:t,height:i,lineHeight:40,backgroundColor:"#00000000",textAlign:"center",fontSize:16,borderRadius:4}}),n=t=>{if(console.log("res:"+JSON.stringify(t)),t.userInfo){a.hide(),a.offTap(n),a.destroy(),console.log("userinfo",t),D.Instance.CurModel.m_nickname=t.userInfo.nickName,D.Instance.CurModel.m_avatar=t.userInfo.avatarUrl;let i=[{nickname:t.userInfo.nickName},{avatar:t.userInfo.avatarUrl},{gender:t.userInfo.gender},{city:t.userInfo.city},{country:t.userInfo.country},{province:t.userInfo.province}];T.Instance.HttpPostRequest(B.protocols.Userauth,i,()=>{N.isAuth=!0,null!=e&&e(!0)},null)}else a.hide(),a.offTap(n),a.destroy(),null!=e&&e(!1)};a.show(),a.onTap(n)})()}else N.isAuth=!0,null!=e&&e(!0)}static showbjWxGameQuan(e){if(s.isWx)if(e){if(null==this.button){let e=Laya.Browser.window.wx.getSystemInfoSync();if(!e)return;var t=.5*e.windowHeight,i=109*e.windowHeight/Laya.stage.height,a=80*i/109;Laya.stage.width,this.button=Laya.Browser.window.wx.createGameClubButton({type:"image",image:"res/talk.png",style:{left:.5*e.windowWidth+150*e.windowWidth/Laya.stage.width,top:t-240*e.windowHeight/Laya.stage.height,width:a,height:i}})}this.button.show()}else this.button&&this.button.hide()}}N.Lodining=!1,N.shareId="",N._chanel="",N.isAuth=!1,N.vibrating=!1,N.IsNew=0;var z,G,U=Laya.Sprite3D;!function(e){e[e.WarnTips=1]="WarnTips",e[e.HpText=2]="HpText"}(z||(z={}));class H{constructor(){this.poolDic=new i,this.prefabDic=new i,this.singleobjDic=new i}static get Instance(){return H.instance||(H.instance=new H)}InitSelf(e,t){null!=t&&(this.prefabDic.has(e)||this.prefabDic.set(e,t))}onComplete(e){Laya.Sprite3D.load("res/threeDimen/staticModel/lizard/lizard.lh",Laya.Handler.create(this,function(e){var t=this.scene.addChild(e);t.transform.position=new Laya.Vector3(-.6,0,0),t.transform.localScale=new Laya.Vector3(.075,.075,.075);var i=Laya.Sprite3D.instantiate(t,this.scene,!1,new Laya.Vector3(.6,0,0));i.transform.localScale=new Laya.Vector3(.075,.075,.075);for(var a=0;a0){var t=this.singleobjDic.get(e).shift();return t.visible=!0,t}return this.GetByType(e)}return this.GetByType(e)}RecoverUi(e,t){t.visible=!1,t.removeSelf(),this.singleobjDic.has(e)||this.singleobjDic.set(e,new Array),this.singleobjDic.get(e).push(t)}RecoverModel(e){if(e){e.active=!1,e.removeSelf();var t=e.name;this.poolDic.has(t)||this.poolDic.set(t,new Array),this.poolDic.get(t).push(e)}}GetModel(e){if("PlayerShoot"==e&&H.bulletCount++,this.poolDic.has(e)){if(this.poolDic.get(e).length>0){var t=this.poolDic.get(e).shift();return t.active=!0,t}return this.prefabDic.has(e)?((i=U.instantiate(this.prefabDic.get(e))).name=e,console.log("正在克隆中>>>>>"+e+"__id:"+i.id),i):null}var i;return this.prefabDic.has(e)?((i=U.instantiate(this.prefabDic.get(e))).name=e,console.log("正在克隆中>>>>>"+e+"__id:"+i.id),i):null}onStateEnter(){console.log("动画开始播放了")}onStateUpdate(){console.log("动画状态更新了")}onStateExit(){console.log("动画退出了")}GetByType(e){var t;return e==z.WarnTips?((t=new Laya.Text).width=720,t.height=60,t.align="center",t.valign="middle",t.fontSize=35,t.bold=!0,t.pivotX=360,t.pivotY=30,t.color="#ffffff",t.stroke=5,t.strokeColor="#000000",t):e==z.HpText?((t=new Laya.Text).font="Microsoft YaHei",t.width=260,t.height=50,t.align="center",t.valign="middle",t.fontSize=30,t.bold=!0,t.pivotX=130,t.pivotY=25,t.color="#ffffff",t):void 0}}H.modeltype={Mound:"Mound",PlayerShoot:"PlayerShoot",Player:"Character",Enemy:"enemy"},H.bulletCount=0;class O{constructor(e,t=0,i=0,a=0){this.m_t=0,this.target=0,this.follow=0,this.m_tiny=0,this.m_t=e,this.target=i,this.follow=t,this.m_tiny=a}ChangeT(e){this.m_t=e}get t(){return this.m_t}update(){this.follow=F.MixNumber(this.follow,this.target,this.m_t),0!=this.m_tiny&&this.target!=this.follow&&Math.abs(this.target-this.follow)<=this.m_tiny&&(this.follow=this.target)}}class F{static get VecZero(){return new Laya.Vector3}static RandomNumber(e,t){if(e>=t)return 0;var i=t-e;return Math.random()*i+e}static SpToCam(e){return e.x=-e.x,e.y=e.y-180,e.z=-e.z,e}static MixVector3(e,t,i,a=null){return null==a&&(a=this.m_mixVector),a.x=F.MixNumber(e.x,t.x,i),a.y=F.MixNumber(e.y,t.y,i),a.z=F.MixNumber(e.z,t.z,i),a}static MixNumber(e,t,i){return e=(t-e)*(i=F.Clamp(i,0,1))+e}static Clamp(e,t,i){return ei&&(e=i),e}}F.m_mixVector=new Laya.Vector3,function(e){e[e.mound=8]="mound",e[e.wall=9]="wall",e[e.opponent=10]="opponent",e[e.obstacle1=11]="obstacle1",e[e.obstacle2=12]="obstacle2",e[e.obstacle3=13]="obstacle3"}(G||(G={}));class W{onPreLoadFinish(){var e=this.scene.addChild(Laya.Loader.getRes("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh")),t=Laya.Loader.getRes("res/threeDimen/skinModel/LayaMonkey2/LayaMonkey.lh");t.transform.translate(new Laya.Vector3(2.5,0,0));var i=new Laya.Vector3(.5,.5,.5);t.transform.localScale=i,e.addChild(t),this.addButton(100,120,160,30,"移动父级猴子",20,function(t){e.transform.translate(new Laya.Vector3(-.1,0,0))}),this.addButton(100,160,160,30,"放大父级猴子",20,function(t){var i=new Laya.Vector3(.2,.2,.2);e.transform.localScale=i}),this.addButton(100,200,160,30,"旋转父级猴子",20,function(t){e.transform.rotate(new Laya.Vector3(-15,0,0),!0,!1)}),this.addButton(100,250,160,30,"移动子级猴子",20,function(e){t.transform.translate(new Laya.Vector3(-.1,0,0))}),this.addButton(100,290,160,30,"放大子级猴子",20,function(e){var i=new Laya.Vector3(1,1,1);t.transform.localScale=i}),this.addButton(100,330,160,30,"旋转子级猴子",20,function(e){t.transform.rotate(new Laya.Vector3(-15,0,0),!0,!1)})}addButton(e,t,i,a,n,s,o){Laya.loader.load(["res/threeDimen/ui/button.png"],Laya.Handler.create(null,function(){var r=Laya.stage.addChild(new Laya.Button("res/threeDimen/ui/button.png",n));r.size(i,a),r.labelBold=!0,r.labelSize=s,r.sizeGrid="4,4,4,4",r.scale(Laya.Browser.pixelRatio,Laya.Browser.pixelRatio),r.pos(e,t),r.on(Laya.Event.CLICK,this,o)}))}}W.Idle="Idle",W.CrouchFiring="CrouchFiring",W.Dance="Dance",W.RunAndGun="RunAndGun",W.RunningHysteric="RunningHysteric";var j=Laya.Text;class q{static get Instance(){return this.instance||(this.instance=new q)}CameraFollow(e){this.Camera&&this.Camera.MoveGame(e)}Init(e,t){this.startPosTra=t.transform,e&&(this._maincamera=e,this.Camera=this._maincamera.addComponent(at),this.Camera.Init())}createSampleText(){var e=new j;return e.overflow=j.HIDDEN,e.color="#FFFFFF",e.font="Impact",e.fontSize=20,e.borderColor="#FFFF00",e.x=80,Laya.stage.addChild(e),e.text="A POWERFUL HTML5 ENGINE ON FLASH TECHNICAL\nA POWERFUL HTML5 ENGINE ON FLASH TECHNICAL\nA POWERFUL HTML5 ENGINE ON FLASH TECHNICAL",e}SetCameraAction(e,t){this.Camera&&this.Camera.CameraAction(e,t)}}var X=Laya.BitmapFont,Y=Laya.Text,Z=Laya.Handler;class J{constructor(){this.tarDis=30,this.constructArr=[],this.fontName="diyFont"}static get Instance(){return this.instance||(this.instance=new J)}Init(e){this.constructArr.push(e.getChildAt(2)),this.constructArr.push(e.getChildAt(1)),this.constructArr.push(e.getChildAt(0))}CheckMainRolePos(e){this.tarDis-e>0||this.SwitchRoad()}loadFont(){var e=new X;e.loadFont("res/bitmapFont/test.fnt",new Z(this,this.onFontLoaded,[e]))}onFontLoaded(e){e.setSpaceWidth(10),Y.registerBitmapFont(this.fontName,e),this.createText(this.fontName)}createText(e){var t=new Y;t.width=250,t.wordWrap=!0,t.text="Do one thing at a time, and do well.",t.font=e,t.leading=5,t.pos(Laya.stage.width-t.width>>1,Laya.stage.height-t.height>>1),Laya.stage.addChild(t)}SwitchRoad(){let e=this.constructArr.pop();e.transform.localPositionZ=this.tarDis+60,this.constructArr.unshift(e),this.tarDis=this.tarDis+30}SetConstruct(){for(let e=this.constructArr.length-1;e>=0;e--){this.constructArr[e].transform.localPositionZ=30*(2-e)}this.tarDis=30}}var K=Laya.Sprite,$=Laya.Handler;class Q{static get Instance(){return Q.instance||(Q.instance=new Q)}showApe(){var e=new K;Laya.stage.addChild(e),e.loadImage("res/apes/monkey3.png"),Laya.loader.load("res/apes/monkey2.png",$.create(this,function(){var e=Laya.loader.getRes("res/apes/monkey2.png"),t=new K;t.graphics.drawTexture(e,0,0),Laya.stage.addChild(t),t.pos(200,0)}))}SetLevel(e){let i=u.Instance._level.length,a=v.Instance.stage;v.Instance.stage>i&&(a=t.randomInt(1,i)),this.curLevelData=u.Instance.GetLevel(a),this._level||(this._level=new ee),this._level.SetLevel(this.curLevelData)}}class ee{constructor(){this.road_list=[],this.fail_gold=0}createApes(){var e=Math.PI/2;this.apesCtn=new K,Laya.stage.addChild(this.apesCtn);for(var t=0;t<4;t++){var i=new K;i.loadImage("res/apes/monkey"+t+".png"),i.pivot(55,72),i.pos(150*Math.cos(e*t),150*Math.sin(e*t)),this.apesCtn.addChild(i)}this.apesCtn.pos(Laya.stage.width/2,Laya.stage.height/2)}SetLevel(e){this.road_list=t.SpliteString(e.road_list),this.gold=Number(e.gold),this.fail_gold=Number(e.fail_gold),this.enemy=e.enemy,this.enemy_hp=e.enemy_hp,this.isgold=1==Number(e.isgold),this.enemy_cloth=e.enemy_cloth?Number(e.enemy_cloth):1}}class te{static get Instance(){return this.instance||(this.instance=new te)}constructor(){this.MoundrDic=new i}Init(e){this.moundContainer=e}MakeMound(e){let t=H.Instance.GetModel(H.modeltype.Mound);if(!t)return;this.moundContainer.addChild(t);let i=t.getComponent(Ve);i||(i=t.addComponent(Ve)),i.SetMound(e),this.MoundrDic.set(t.id,i)}Reset(){let e=[];for(const t in this.MoundrDic.container)e.push(t);if(e.length>0)for(let t=0;t1&&(i=1),180*Math.acos(i)/Math.PI}}var ae=Laya.Sprite;class ne{constructor(){this.attackmaxcount=0,this.explodemaxcount=0}static get Instance(){return ne.instance||(ne.instance=new ne)}AttackEffect(e){if(this.attackmaxcount>=L.hitmaxcount)return;let t=H.Instance.GetModel("Hit");t.transform.position=e,ot.Instance.effectCon.addChild(t),this.attackmaxcount++,Laya.timer.once(800,this,this.RecoverEffect,[t],!1)}RecoverEffect(e){H.Instance.RecoverModel(e),this.attackmaxcount--}mapLoaded(){this.layer=this.tiledMap.getLayerByIndex(0);var e=32*Math.tan(180/Math.PI*30);this.sprite=new ae,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)}ExplodeEffect(e){if(this.explodemaxcount>=L.boommaxcount)return;let t=H.Instance.GetModel("Explode");t.transform.position=e,ot.Instance.effectCon.addChild(t),this.explodemaxcount++,Laya.timer.once(800,this,this.RecoverExpolde,[t],!1)}RecoverExpolde(e){H.Instance.RecoverModel(e),this.explodemaxcount--}BloodEffect(e){let t=H.Instance.GetModel("Blood");t.transform.position=e,ot.Instance.effectCon.addChild(t),Laya.timer.once(800,this,this.RecoverBlood,[t],!1)}RecoverBlood(e){H.Instance.RecoverModel(e)}}var se=Laya.Event,oe=Laya.MouseManager,re=Laya.MovieClip,he=Laya.Animation;class le{constructor(){this.SWFPath="res/swf/dragon.swf",this.MCWidth=318,this.MCHeight=406,this._switch=!1,this._isCanClick=!0,this.clickD=!1,this._mousePos=F.VecZero,this.tempMouse=F.VecZero,this.clickCount=0,this.mStartX=400,this.mStartY=500,this.mActionIndex=0,this.mCurrIndex=0,this.mCurrSkinIndex=0}static get Instance(){return this.instance||(this.instance=new le)}InitMouseEvent(){Laya.stage.on(se.MOUSE_DOWN,this,this.OnClickDown),Laya.stage.on(se.MOUSE_OUT,this,this.OnClickUp)}createMovieClip(){var e=new re;e.load(this.SWFPath),e.x=(Laya.stage.width-this.MCWidth)/2,e.y=(Laya.stage.height-this.MCHeight)/2,Laya.stage.addChild(e)}OnClickDown(e){this._isCanClick&&this._switch&&(e.target instanceof Laya.UIComponent||(this.clickD=!0,Laya.stage.on(se.MOUSE_UP,this,this.OnClickUp),Laya.stage.on(se.MOUSE_MOVE,this,this.OnSlider),this._mousePos.x=oe.instance.mouseX,this._mousePos.y=oe.instance.mouseY,this.MouseD()))}StartGameClick(){this._switch=!0,this._isCanClick&&(this.clickD=!0,Laya.stage.on(se.MOUSE_UP,this,this.OnClickUp),Laya.stage.on(se.MOUSE_MOVE,this,this.OnSlider),this._mousePos.x=oe.instance.mouseX,this.MouseD())}MouseD(){et.Instance.SetModelPos(this._mousePos.x),et.Instance.CreateShoot()}OnClickUp(e){this._isCanClick&&this._switch&&this.clickD&&this.MouseU()}createAnimation(){var e=new he;e.interval=30,e.index=1,e.play();var t=e.getGraphicBounds();e.pivot(t.width/2,t.height/2),e.pos(Laya.stage.width/2,Laya.stage.height/2),Laya.stage.addChild(e)}OffMouseEvent(){Laya.stage.off(se.MOUSE_DOWN,this,this.OnClickDown),Laya.stage.off(se.MOUSE_UP,this,this.OnClickUp),Laya.stage.off(se.MOUSE_OUT,this,this.OnClickUp)}MouseU(){this.clickD=!1,Laya.stage.off(se.MOUSE_MOVE,this,this.OnSlider),Laya.stage.off(se.MOUSE_UP,this,this.OnClickUp)}OnSlider(e){this.tempMouse.x=oe.instance.mouseX;let t=this.tempMouse.x-this._mousePos.x;t>=0&&(t=t<20?t:20),t<0&&(t=t>-20?t:-20),et.Instance.PlayerSlip(-t),this._mousePos.x=this.tempMouse.x,this._mousePos.y=this.tempMouse.y}OpenInput(){this.clickCount++,this.clickCount>1||(this._isCanClick=!0)}CloseInput(){this.clickCount--,this.clickCount>0||(this._isCanClick=!1,this.clickD=!1)}set _Switch(e){this._switch=e}play(){this.mCurrIndex++,this.mCurrIndex>=this.mArmature.getAnimNum()&&(this.mCurrIndex=0),this.mArmature.play(this.mCurrIndex,!1)}onEvent(e){var t=e;Laya.stage.addChild(this.mLabelSprite),this.mLabelSprite.x=this.mStartX,this.mLabelSprite.y=this.mStartY,this.mLabelSprite.graphics.clear(),this.mLabelSprite.graphics.fillText(t.name,0,0,"20px Arial","#ff0000","center")}}var ce=Laya.Sprite,de=Laya.ColorFilter;class pe extends Laya.Script3D{constructor(){super(...arguments),this.rotate=F.VecZero,this.speed=F.VecZero,this.ApePath="res/apes/monkey2.png"}onAwake(){this.selfobj=this.owner,this.tran=this.selfobj.transform}SetMoveType(){5==this.thing.type?this._transform=this.selfobj.getChildAt(0).transform:(this._transform=this.tran,4==this.thing.type&&xe.Instance.StreetAddCube(this.selfobj)),1!=this.thing.moveType?2==this.thing.moveType?(this.rotate.x=0,this.rotate.y=-this.thing.moveSpeed,this.rotate.z=0,Laya.timer.frameLoop(2,this,this.MoveType2)):3==this.thing.moveType?(this.rotate.x=0,this.rotate.y=this.thing.moveSpeed,this.rotate.z=0,Laya.timer.frameLoop(2,this,this.MoveType2)):4==this.thing.moveType?(this.rotate.x=0,this.rotate.y=0,this.rotate.z=this.thing.moveSpeed,Laya.timer.frameLoop(1,this,this.MoveType3)):5==this.thing.moveType?(this.rotate.x=0,this.rotate.y=0,this.rotate.z=-this.thing.moveSpeed,Laya.timer.frameLoop(1,this,this.MoveType3)):6==this.thing.moveType?(this.speed.x=-this.thing.moveSpeed,this.speed.y=0,this.speed.z=0,Laya.timer.frameLoop(1,this,this.MoveType4)):7==this.thing.moveType?(this.speed.x=this.thing.moveSpeed,this.speed.y=0,this.speed.z=0,Laya.timer.frameLoop(1,this,this.MoveType4)):8==this.thing.moveType||this.thing.moveType:Laya.timer.frameLoop(3,this,this.CheckRecover)}setup(){this.normalizeApe(),this.makeRedApe(),this.grayingApe()}normalizeApe(){var e=this.createApe();this.apeTexture=Laya.loader.getRes(this.ApePath),e.x=(Laya.stage.width-3*this.apeTexture.width)/2,e.y=(Laya.stage.height-this.apeTexture.height)/2}makeRedApe(){var e=new de([1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0]),t=this.createApe();t.filters=[e];var i=Laya.stage.getChildAt(0);t.x=i.x+this.apeTexture.width,t.y=i.y}grayingApe(){var e=new de([.3086,.6094,.082,0,0,.3086,.6094,.082,0,0,.3086,.6094,.082,0,0,0,0,0,1,0]),t=this.createApe();t.filters=[e];var i=Laya.stage.getChildAt(1);t.x=i.x+this.apeTexture.width,t.y=i.y}createApe(){var e=new ce;return e.loadImage("res/apes/monkey2.png"),Laya.stage.addChild(e),e}MoveType4(){this._transform.translate(this.speed),Math.abs(this._transform.localPositionX)>=L.blockLRmoveMaxDis&&(this.speed.x=-this.speed.x),this.CheckRecover()}MoveType2(){this._transform.rotate(this.rotate),this.CheckRecover()}MoveType3(){this._transform.rotate(this.rotate),Math.abs(this._transform.localRotationEulerZ)>=50&&(this.rotate.z=-this.rotate.z),this.CheckRecover()}Recover(){this.thing.type&&xe.Instance.StreetResetCube(this.selfobj.id),Laya.timer.clearAll(this),xe.Instance.RecoverStreet(this.selfobj),H.Instance.RecoverModel(this.selfobj)}CheckRecover(){if(this.tarTran.localPositionZ-this.tran.localPositionZ>=10)return console.log("回收block",this.selfobj.name),void this.Recover()}SetStreet(e){this.tran.localPositionZ=Number(e.z),this.tran.localPositionX=Number(e.x),this.tran.rotationEuler=F.VecZero,this.thing=e,et.Instance.player&&(this.tarTran=et.Instance.player.transform,this.SetMoveType())}}var ue,ge=Laya.ClassUtils.regClass;!function(e){class t extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(t.uiView)}}t.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/zhujiemian-1-20.png",sizeGrid:"14,14,13,15",right:0,left:0,bottom:0,alpha:1},compId:3},{type:"Box",props:{y:112,x:42,width:636,height:538},compId:4,child:[{type:"Image",props:{top:0,skin:"Main/webp.webp.png",right:0,left:0,bottom:0},compId:31,child:[{type:"Image",props:{y:40,x:-9,width:655,skin:"Main/shengji-biaoti.png",height:102},compId:32}]},{type:"Button",props:{y:556,x:350,var:"rateBtn",stateNum:1,skin:"Main/landi.png"},compId:34,child:[{type:"Image",props:{y:19,x:44,skin:"Main/gongjisudu-1.png"},compId:35},{type:"Image",props:{y:124,x:4,width:236,var:"_rate",stateNum:1,height:71},compId:36,child:[{type:"Image",props:{y:9,x:3,skin:"Main/shengji-tubiao-1.png"},compId:37},{type:"Image",props:{y:13,x:57,skin:"Main/jinbi-zhu.png"},compId:38,child:[{type:"Text",props:{y:2,x:38,width:133,var:"rateValue",valign:"middle",text:"800",height:41,fontSize:40,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:39}]}]},{type:"Text",props:{y:71,x:72,width:106,var:"rateLv",valign:"middle",text:"LV8",height:41,fontSize:42,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:40},{type:"Image",props:{y:124,x:5,width:235,visible:!1,var:"_rateVideo",stateNum:1,height:71},compId:41,child:[{type:"Image",props:{y:9,x:3,skin:"Main/shengji-tubiao-1.png"},compId:42},{type:"Image",props:{y:16.5,x:117.5,skin:"Main/shipin-biao.png"},compId:43}]},{type:"Image",props:{y:154,x:137,var:"click2",skin:"Main/shou.png",anchorX:.5},compId:49}]},{type:"Button",props:{y:558,x:54,var:"atkBtn",stateNum:1,skin:"Main/hong-di.png"},compId:5,child:[{type:"Image",props:{y:19,x:66,skin:"Main/gongjili-2.png"},compId:10},{type:"Image",props:{y:124,x:3,width:236,var:"_atk",stateNum:1,height:71},compId:13,child:[{type:"Image",props:{y:9,x:3,skin:"Main/shengji-tubiao-1.png"},compId:33},{type:"Image",props:{y:15,x:61,skin:"Main/jinbi-zhu.png"},compId:14,child:[{type:"Text",props:{y:2,x:38,width:133,var:"atkValue",valign:"middle",text:"800",height:41,fontSize:40,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:16}]}]},{type:"Text",props:{y:71,x:57,width:136,var:"atkLv",valign:"middle",text:"LV8",height:41,fontSize:42,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:12},{type:"Image",props:{y:124,x:2,width:238,visible:!1,var:"_atkVideo",stateNum:1,height:71},compId:45,child:[{type:"Image",props:{y:9,x:3,skin:"Main/shengji-tubiao-1.png"},compId:46},{type:"Image",props:{y:16.5,x:119,skin:"Main/shipin-biao.png"},compId:47}]},{type:"Image",props:{y:154.5,x:137,var:"click1",skin:"Main/shou.png",anchorX:.5},compId:48}]},{type:"Image",props:{x:201,var:"backBtn",skin:"Main/jixuyouxi-bt.png",runtime:"View/Com/ButtonRunTime.ts",centerY:620},compId:8}]},{type:"Box",props:{y:243,x:74.5,width:571,var:"PushBox",height:407},compId:72,child:[{type:"Box",props:{y:112,x:100,width:140,height:175,anchorY:.5,anchorX:.5},compId:68,child:[{type:"Image",props:{y:0,x:0,width:140,name:"icon",height:140},compId:70},{type:"Text",props:{y:140,x:0,width:140,valign:"middle",text:"冲冲冲冲冲冲",name:"name",height:35,fontSize:22,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:71},{type:"Button",props:{y:0,x:0,top:0,right:0,name:"btn",left:0,bottom:0},compId:69}]},{type:"Box",props:{y:112,x:283,width:140,height:175,anchorY:.5,anchorX:.5},compId:73,child:[{type:"Image",props:{y:0,x:0,width:140,name:"icon",height:140},compId:74},{type:"Text",props:{y:140,x:0,width:140,valign:"middle",text:"冲冲冲冲冲冲",name:"name",height:35,fontSize:22,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:75},{type:"Button",props:{y:0,x:0,top:0,right:0,name:"btn",left:0,bottom:0},compId:76}]},{type:"Box",props:{y:112,x:470,width:140,height:175,anchorY:.5,anchorX:.5},compId:77,child:[{type:"Image",props:{y:0,x:0,width:140,name:"icon",height:140},compId:78},{type:"Text",props:{y:140,x:0,width:140,valign:"middle",text:"冲冲冲冲冲冲",name:"name",height:35,fontSize:22,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:79},{type:"Button",props:{y:0,x:0,top:0,right:0,name:"btn",left:0,bottom:0},compId:80}]},{type:"Box",props:{y:306,x:100,width:140,height:175,anchorY:.5,anchorX:.5},compId:81,child:[{type:"Image",props:{y:0,x:0,width:140,name:"icon",height:140},compId:84},{type:"Text",props:{y:140,x:0,width:140,valign:"middle",text:"冲冲冲冲冲冲",name:"name",height:35,fontSize:22,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:85},{type:"Button",props:{y:0,x:0,top:0,right:0,name:"btn",left:0,bottom:0},compId:86}]},{type:"Box",props:{y:306,x:283,width:140,height:175,anchorY:.5,anchorX:.5},compId:82,child:[{type:"Image",props:{y:0,x:0,width:140,name:"icon",height:140},compId:87},{type:"Text",props:{y:140,x:0,width:140,valign:"middle",text:"冲冲冲冲冲冲",name:"name",height:35,fontSize:22,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:88},{type:"Button",props:{y:0,x:0,top:0,right:0,name:"btn",left:0,bottom:0},compId:89}]},{type:"Box",props:{y:306,x:470,width:140,height:175,anchorY:.5,anchorX:.5},compId:83,child:[{type:"Image",props:{y:0,x:0,width:140,name:"icon",height:140},compId:90},{type:"Text",props:{y:140,x:0,width:140,valign:"middle",text:"冲冲冲冲冲冲",name:"name",height:35,fontSize:22,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:91},{type:"Button",props:{y:0,x:0,top:0,right:0,name:"btn",left:0,bottom:0},compId:92}]}]}],animations:[{nodes:[{target:48,keyframes:{y:[{value:154.5,tweenMethod:"linearNone",tween:!0,target:48,key:"y",index:0},{value:207,tweenMethod:"linearNone",tween:!0,target:48,key:"y",index:5},{value:154.5,tweenMethod:"linearNone",tween:!0,target:48,key:"y",index:10}]}}],name:"ani1",id:1,frameRate:24,action:2},{nodes:[{target:49,keyframes:{y:[{value:154,tweenMethod:"linearNone",tween:!0,target:49,key:"y",index:0},{value:201,tweenMethod:"linearNone",tween:!0,target:49,key:"y",index:5},{value:154.5,tweenMethod:"linearNone",tween:!0,target:49,key:"y",index:10}]}}],name:"ani2",id:2,frameRate:24,action:2},{nodes:[{target:68,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:68,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:68,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:68,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:68,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:68,key:"rotation",index:20}]}},{target:73,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:73,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:73,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:73,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:73,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:73,key:"rotation",index:20}]}},{target:77,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:77,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:77,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:77,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:77,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:77,key:"rotation",index:20}]}},{target:81,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:81,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:81,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:81,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:81,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:81,key:"rotation",index:20}]}},{target:82,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:82,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:82,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:82,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:82,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:82,key:"rotation",index:20}]}},{target:83,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:83,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:83,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:83,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:83,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:83,key:"rotation",index:20}]}}],name:"shakeani",id:3,frameRate:24,action:0}],loadList:["Main/zhujiemian-1-20.png","Main/webp.webp.png","Main/shengji-biaoti.png","Main/landi.png","Main/gongjisudu-1.png","Main/shengji-tubiao-1.png","Main/jinbi-zhu.png","Main/shipin-biao.png","Main/shou.png","Main/hong-di.png","Main/gongjili-2.png","Main/jixuyouxi-bt.png"],loadList3D:[]},e.AttributeUpViewUI=t,ge("ui.AttributeUpViewUI",t);class i extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(i.uiView)}}i.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/zhujiemian-1-20.png",sizeGrid:"10,10,12,11",right:0,left:0,bottom:0,alpha:1},compId:22},{type:"Box",props:{x:178,width:364,var:"winbtnBox",height:223,bottom:199},compId:47,child:[{type:"Image",props:{x:120,var:"nextBtn",skin:"Main/no.png",runtime:"View/Com/ButtonRunTime.ts",bottom:40},compId:46},{type:"Image",props:{y:32,x:36,var:"doublegetBtn",skin:"Main/sanbeilingqu.png",runtime:"View/Com/ButtonRunTime.ts"},compId:28}]},{type:"Image",props:{x:41,var:"shibaiTop",skin:"Main/shibai-di bg.png",centerY:-182},compId:68,child:[{type:"Image",props:{y:136,x:76,skin:"Main/shibai-jiesuan-b.png"},compId:121}]},{type:"Image",props:{x:41.5,var:"winTop",skin:"Main/shengli-beidi.png",centerY:-182},compId:44,child:[{type:"Image",props:{y:132,x:76,skin:"Main/tonggun-biao.png"},compId:122}]},{type:"Image",props:{x:243,width:60,skin:"Main/jinbi-zhu.png",height:60,centerY:120},compId:69,child:[{type:"Text",props:{y:-8,x:77,width:165,var:"valueText",valign:"middle",text:"50(+100)",height:75,fontSize:40,color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:70}]},{type:"Box",props:{x:136,width:447,height:419,centerY:-138},compId:71,child:[{type:"Image",props:{y:58,x:0,width:448,skin:"Main/zhengchang-di.png",height:100},compId:76,child:[{type:"Image",props:{y:18,x:26,skin:"Main/biaozhi-di8.png"},compId:80,child:[{type:"Image",props:{y:15,x:17,skin:"Main/baolei.png"},compId:118}]},{type:"Image",props:{y:25,x:384,width:50,skin:"Main/jinbi-zhu.png",height:50},compId:83},{type:"Text",props:{y:18,x:300,width:78,var:"towerValue",valign:"middle",text:"X10",height:63,fontSize:36,color:"#48efcc",bold:!0,align:"right",runtime:"laya.display.Text"},compId:82},{type:"Text",props:{y:18,x:97,width:78,var:"towerCount",valign:"middle",text:"X10",height:63,fontSize:36,color:"#48efcc",bold:!0,align:"center",runtime:"laya.display.Text"},compId:81}]},{type:"Image",props:{y:179,x:0,width:448,skin:"Main/zhengchang-di.png",height:100},compId:84,child:[{type:"Image",props:{y:18,x:26,skin:"Main/biaozhi-di8.png"},compId:85,child:[{type:"Image",props:{y:15,x:13.5,skin:"Main/rentou.png"},compId:119}]},{type:"Image",props:{y:25,x:384,width:50,skin:"Main/jinbi-zhu.png",height:50},compId:88},{type:"Text",props:{y:18,x:97,width:78,var:"roleCount",valign:"middle",text:"X10",height:63,fontSize:36,color:"#99ff53",bold:!0,align:"center",runtime:"laya.display.Text"},compId:86},{type:"Text",props:{y:18,x:300,width:78,var:"roleValue",valign:"middle",text:"X10",height:63,fontSize:36,color:"#99ff53",bold:!0,align:"right",runtime:"laya.display.Text"},compId:87}]},{type:"Image",props:{y:301,x:0,width:448,skin:"Main/zhengchang-di.png",height:100},compId:89,child:[{type:"Image",props:{y:18,x:26,skin:"Main/biaozhi-di8.png"},compId:90,child:[{type:"Image",props:{y:13,x:16,skin:"Main/baohe.png"},compId:120}]},{type:"Image",props:{y:25,x:384,width:50,skin:"Main/jinbi-zhu.png",height:50},compId:93},{type:"Text",props:{y:18,x:97,width:78,var:"blockCount",valign:"middle",text:"X10",height:63,fontSize:36,color:"#ffe92e",bold:!0,align:"center",runtime:"laya.display.Text"},compId:91},{type:"Text",props:{y:18,x:300,width:78,var:"blockValue",valign:"middle",text:"X10",height:63,fontSize:36,color:"#ffe92e",bold:!0,align:"right",runtime:"laya.display.Text"},compId:92}]}]},{type:"Button",props:{y:423,width:109,var:"LeftTopPushIcon",skin:"Main/hutui-1-4.png",sizeGrid:"5,16,5,11",pivotY:64,pivotX:55,left:14,height:128},compId:96,child:[{type:"Image",props:{y:0,x:0,width:109,name:"icon",height:91},compId:98},{type:"Text",props:{y:110,x:69,width:110,valign:"middle",text:"冲冲冲冲冲冲",pivotY:19,pivotX:70,name:"name",height:37,fontSize:17,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:99}]},{type:"Button",props:{y:640,width:109,var:"LeftBottomPushIcon",skin:"Main/hutui-1-4.png",sizeGrid:"5,16,5,11",pivotY:64,pivotX:55,left:14,height:128},compId:102,child:[{type:"Image",props:{y:0,x:0,width:109,name:"icon",height:91},compId:103},{type:"Text",props:{y:110,x:69,width:110,valign:"middle",text:"冲冲冲冲冲冲",pivotY:19,pivotX:70,name:"name",height:37,fontSize:17,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:104}]},{type:"Button",props:{y:423,width:109,var:"RightTopPushIcon",skin:"Main/hutui-1-4.png",sizeGrid:"5,16,5,11",pivotY:64,pivotX:55,left:595,height:128},compId:105,child:[{type:"Image",props:{y:0,x:0,width:109,name:"icon",height:91},compId:107},{type:"Text",props:{y:110,x:69,width:110,valign:"middle",text:"冲冲冲冲冲冲",pivotY:19,pivotX:70,name:"name",height:37,fontSize:17,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:108}]},{type:"Button",props:{y:640,width:109,var:"RightBottomPushIcon",skin:"Main/hutui-1-4.png",sizeGrid:"5,16,5,11",pivotY:64,pivotX:55,left:595,height:128},compId:106,child:[{type:"Image",props:{y:0,x:0,width:109,name:"icon",height:91},compId:109},{type:"Text",props:{y:110,x:69,width:110,valign:"middle",text:"冲冲冲冲冲冲",pivotY:19,pivotX:70,name:"name",height:37,fontSize:17,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:110}]}],animations:[{nodes:[{target:18,keyframes:{scaleY:[{value:1,tweenMethod:"linearNone",tween:!0,target:18,key:"scaleY",index:0},{value:.5,tweenMethod:"linearNone",tween:!0,target:18,key:"scaleY",index:10},{value:1,tweenMethod:"linearNone",tween:!0,target:18,key:"scaleY",index:20},{value:.5,tweenMethod:"linearNone",tween:!0,target:18,key:"scaleY",index:30},{value:1,tweenMethod:"linearNone",tween:!0,target:18,key:"scaleY",index:40}],scaleX:[{value:1,tweenMethod:"linearNone",tween:!0,target:18,key:"scaleX",index:0},{value:.5,tweenMethod:"linearNone",tween:!0,target:18,key:"scaleX",index:10},{value:1,tweenMethod:"linearNone",tween:!0,target:18,key:"scaleX",index:20},{value:.5,tweenMethod:"linearNone",tween:!0,target:18,key:"scaleX",index:30},{value:1,tweenMethod:"linearNone",tween:!0,target:18,key:"scaleX",index:40}]}}],name:"aim",id:1,frameRate:24,action:0},{nodes:[{target:96,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:96,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:96,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:96,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:96,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:96,key:"rotation",index:20}]}},{target:102,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:102,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:102,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:102,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:102,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:102,key:"rotation",index:20}]}},{target:105,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:105,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:105,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:105,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:105,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:105,key:"rotation",index:20}]}},{target:106,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:106,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:106,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:106,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:106,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:106,key:"rotation",index:20}]}}],name:"pushshake",id:2,frameRate:24,action:0}],loadList:["Main/zhujiemian-1-20.png","Main/no.png","Main/sanbeilingqu.png","Main/shibai-di bg.png","Main/shibai-jiesuan-b.png","Main/shengli-beidi.png","Main/tonggun-biao.png","Main/jinbi-zhu.png","Main/zhengchang-di.png","Main/biaozhi-di8.png","Main/baolei.png","Main/rentou.png","Main/baohe.png","Main/hutui-1-4.png"],loadList3D:[]},e.CompleteViewUI=i,ge("ui.CompleteViewUI",i);class a extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(a.uiView)}}a.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/hutui-1-4.png",sizeGrid:"16,16,14,14",right:0,name:"BG",left:0,bottom:0},compId:5},{type:"Image",props:{x:0,width:720,top:0,skin:"Main/hutui-1-3.png",height:131},compId:4,child:[{type:"Text",props:{y:84,x:360,width:135,valign:"middle",text:"小程序",pivotY:31,pivotX:68,height:61,fontSize:35,bold:!0,align:"center",runtime:"laya.display.Text"},compId:6},{type:"Text",props:{y:154,x:56,width:92,valign:"middle",text:"最近使用",pivotY:18,pivotX:46,height:36,fontSize:23,color:"#5d5353",align:"center",runtime:"laya.display.Text"},compId:8}]},{type:"Button",props:{y:66,x:37,width:66,var:"CloseBtn",pivotY:41,pivotX:33,height:81},compId:7},{type:"List",props:{x:360,width:656,var:"PushList",top:180,spaceY:15,bottom:0,anchorY:.5,anchorX:.5},compId:9,child:[{type:"Box",props:{y:0,width:630,right:26,renderType:"render",height:130},compId:10,child:[{type:"Image",props:{y:0,x:0,width:130,name:"icon",height:130},compId:11},{type:"Text",props:{y:0,x:138,width:485,valign:"middle",text:"冲冲冲冲",name:"name",height:130,fontSize:30,align:"left",runtime:"laya.display.Text"},compId:12},{type:"Image",props:{y:65,x:598.5,width:49,skin:"Main/hutui-1-1.png",pivotY:23,pivotX:25,name:"star",height:46},compId:13},{type:"Button",props:{top:0,right:0,name:"btn",left:0,bottom:0},compId:14},{type:"Script",props:{runtime:"View/Com/ListItem.ts"},compId:16}]}]}],loadList:["Main/hutui-1-4.png","Main/hutui-1-3.png","Main/hutui-1-1.png"],loadList3D:[]},e.ExitViewUI=a,ge("ui.ExitViewUI",a);class n extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(n.uiView)}}n.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:0,x:0,var:"BG",top:0,skin:"Main/111111.png",sizeGrid:"10,12,14,10",right:0,left:0,bottom:0},compId:5},{type:"Image",props:{top:130,skin:"Main/haoyourwBg.png",right:10,left:10,height:200},compId:3,child:[{type:"List",props:{y:52,x:11.5,width:697,var:"TopList",spaceX:20,height:130},compId:8,child:[{type:"Box",props:{y:0,x:0,width:130,renderType:"render",height:130},compId:9,child:[{type:"Image",props:{width:131,name:"icon",height:131},compId:10},{type:"Button",props:{top:0,right:0,name:"btn",left:0,bottom:0},compId:11},{type:"Script",props:{runtime:"View/Com/ListItem.ts"},compId:23}]}]}]},{type:"Image",props:{top:360,skin:"Main/baokuanrwbg.png",right:10,left:10,height:36},compId:4},{type:"Image",props:{x:209.5,top:50,skin:"Main/hotGameTitle.png"},compId:6},{type:"Button",props:{x:8,width:172,var:"CloseBtn",top:50,stateNum:1,skin:"Main/backBtn.png",height:51},compId:7},{type:"List",props:{x:10,var:"BottomList",top:400,spaceY:15,spaceX:40,right:0,repeatX:3,left:0,bottom:150},compId:12,child:[{type:"Box",props:{y:0,x:32,width:190,renderType:"render",height:230},compId:13,child:[{type:"Image",props:{top:0,skin:"Main/bg-box.png",sizeGrid:"33,36,40,30",right:0,name:"bg",left:0,bottom:0},compId:18},{type:"Image",props:{y:40,x:0,width:190,name:"icon",height:150},compId:14},{type:"Text",props:{y:190,x:1,width:189,valign:"middle",text:"text",name:"tip",height:41,fontSize:23,align:"center",runtime:"laya.display.Text"},compId:15},{type:"Image",props:{y:0,x:0,width:190,name:"bottom",height:40},compId:16},{type:"Text",props:{y:0,x:0,width:189,valign:"middle",text:"冲冲冲冲冲冲",name:"name",height:40,fontSize:30,color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:17},{type:"Button",props:{top:0,right:0,name:"btn",left:0,bottom:0},compId:19},{type:"Script",props:{runtime:"View/Com/ListItem.ts"},compId:24}]}]},{type:"Button",props:{x:228,width:241,var:"ContinueBtn",stateNum:1,skin:"Main/zhengchang-di2.png",sizeGrid:"17,31,12,28",height:65,bottom:50},compId:20,child:[{type:"Image",props:{y:11,x:33.5,skin:"Main/jixuyouxi.png"},compId:21}]}],loadList:["Main/111111.png","Main/haoyourwBg.png","Main/baokuanrwbg.png","Main/hotGameTitle.png","Main/backBtn.png","Main/bg-box.png","Main/zhengchang-di2.png","Main/jixuyouxi.png"],loadList3D:[]},e.ExportViewUI=n,ge("ui.ExportViewUI",n);class s extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(s.uiView)}}s.uiView={type:"Scene",props:{width:720,mouseThrough:!0,height:1280},compId:2,child:[{type:"Box",props:{y:30,x:958,width:104,var:"guide1Box",scaleY:.8,scaleX:.8,height:44,anchorY:1,anchorX:.5},compId:7,child:[{type:"Image",props:{y:3,x:-3,skin:"Main/guangquan(1).png"},compId:8},{type:"Image",props:{y:-123,x:2,skin:"Main/jiantou(1).png"},compId:9}]},{type:"Box",props:{y:154,x:969,width:207,var:"guide2Box",scaleY:.8,scaleX:.8,height:56,anchorY:.5,anchorX:0},compId:10,child:[{type:"Image",props:{y:28,x:207,width:0,skin:"Main/zuoyou-jiantou(1).png",rotation:180,pivotY:48,height:96},compId:12},{type:"Image",props:{y:15,x:181,skin:"Main/shou.png"},compId:11}]},{type:"Box",props:{y:298,x:1790,width:207,var:"guide3Box",scaleY:.8,scaleX:.8,height:48,anchorY:.5,anchorX:1},compId:13,child:[{type:"Image",props:{y:22,x:0,width:0,skin:"Main/zuoyou-jiantou(1).png",pivotY:48,height:96},compId:14},{type:"Image",props:{y:6,x:-17,width:61,skin:"Main/shou.png"},compId:15}]},{type:"Box",props:{y:278,x:-163,width:104,var:"guide4Box",scaleY:.8,scaleX:.8,height:44,anchorY:1,anchorX:.5},compId:19,child:[{type:"Image",props:{y:-106,x:4,skin:"Main/jiantou(1).png"},compId:21}]},{type:"Image",props:{x:183,var:"guide1Image",skin:"Main/biaoyu.png",bottom:220},compId:16},{type:"Image",props:{x:164,var:"guide2Image",skin:"Main/biaoyu4.png",bottom:218},compId:17},{type:"Image",props:{x:136,var:"guide3Image",skin:"Main/biaoyu2.png",bottom:220},compId:18}],animations:[{nodes:[{target:9,keyframes:{y:[{value:-116,tweenMethod:"linearNone",tween:!0,target:9,key:"y",index:0},{value:-197,tweenMethod:"linearNone",tween:!0,target:9,key:"y",index:5},{value:-115,tweenMethod:"linearNone",tween:!0,target:9,key:"y",index:10}]}}],name:"guide1",id:1,frameRate:24,action:0},{nodes:[{target:11,keyframes:{x:[{value:181,tweenMethod:"linearNone",tween:!0,target:11,key:"x",index:0},{value:21,tweenMethod:"linearNone",tween:!0,target:11,key:"x",index:10}]}},{target:12,keyframes:{width:[{value:0,tweenMethod:"linearNone",tween:!0,target:12,key:"width",index:0},{value:188,tweenMethod:"linearNone",tween:!0,target:12,key:"width",index:10}]}}],name:"guide2",id:2,frameRate:24,action:0},{nodes:[{target:15,keyframes:{x:[{value:-17,tweenMethod:"linearNone",tween:!0,target:15,key:"x",index:0},{value:122,tweenMethod:"linearNone",tween:!0,target:15,key:"x",index:10}]}},{target:14,keyframes:{width:[{value:0,tweenMethod:"linearNone",tween:!0,target:14,key:"width",index:0},{value:149,tweenMethod:"linearNone",tween:!0,target:14,key:"width",index:10}]}}],name:"guide3",id:3,frameRate:24,action:0},{nodes:[{target:21,keyframes:{y:[{value:-212,tweenMethod:"linearNone",tween:!0,target:21,key:"y",index:0},{value:-106,tweenMethod:"linearNone",tween:!0,target:21,key:"y",index:10}]}}],name:"guide4",id:4,frameRate:24,action:0}],loadList:["Main/guangquan(1).png","Main/jiantou(1).png","Main/zuoyou-jiantou(1).png","Main/shou.png","Main/biaoyu.png","Main/biaoyu4.png","Main/biaoyu2.png"],loadList3D:[]},e.GuideViewUI=s,ge("ui.GuideViewUI",s);class o extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(o.uiView)}}o.uiView={type:"Scene",props:{width:720,height:1280},compId:2,loadList:[],loadList3D:[]},e.InGameViewUI=o,ge("ui.InGameViewUI",o);class r extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(r.uiView)}}r.uiView={type:"Scene",props:{width:720,sizeGrid:"0,0,0,0",height:1280},compId:2,child:[{type:"Image",props:{y:0,x:0,top:0,skin:"Main/zhujiemian-1-20.png",sizeGrid:"15,13,12,13",right:0,left:0,bottom:0},compId:64},{type:"Image",props:{top:0,skin:"Main/bg-sheng.png",right:0,left:0,bottom:0,alpha:.8},compId:3},{type:"Image",props:{y:139,x:14,var:"backBtn",skin:"Main/p__fanhui.png",runtime:"View/Com/ButtonRunTime.ts"},compId:8},{type:"Image",props:{y:139,x:63.5,skin:"Main/beijing-di.png"},compId:36},{type:"Box",props:{y:402,x:42,width:636,height:645},compId:4,child:[{type:"Image",props:{y:17,x:44.5,var:"atkBox",skin:"Main/wenzi-di5.png"},compId:37,child:[{type:"Image",props:{y:43,x:183,skin:"Main/gongji-2-3.png"},compId:38},{type:"Image",props:{y:48,x:26,skin:"Main/zhuangbei-tubiao-di.png"},compId:60},{type:"Image",props:{y:58.5,x:34,skin:"Main/gongji-icon.png"},compId:39},{type:"Image",props:{y:125,x:179,skin:"Main/gongji-1-3.png"},compId:40},{type:"Button",props:{y:95.5,x:358,var:"atkupBtn",stateNum:1,skin:"Main/zheng-qianbi-di.png"},compId:41,child:[{type:"Image",props:{y:7,x:15,width:45,skin:"Main/jinbi-zhu.png",height:45},compId:43,child:[{type:"Text",props:{y:2,x:47,width:134,var:"atkValue",valign:"middle",text:"800",height:41,fontSize:40,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:44}]}]},{type:"Text",props:{y:38,x:390,width:106,var:"atkLv",valign:"middle",text:"LV8",height:41,fontSize:50,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:42}]},{type:"Image",props:{y:226,x:44.5,var:"rateBox",skin:"Main/wenzi-di5.png"},compId:45,child:[{type:"Image",props:{y:43,x:170,skin:"Main/gongji-2-2.png"},compId:46},{type:"Image",props:{y:48,x:26,skin:"Main/zhuangbei-tubiao-di.png"},compId:62},{type:"Image",props:{y:63.5,x:35,skin:"Main/iconqiang.png"},compId:47},{type:"Image",props:{y:125,x:164,skin:"Main/gongji-1-2.png"},compId:48},{type:"Button",props:{y:94.5,x:360,var:"rateupBtn",stateNum:1,skin:"Main/zheng-qianbi-di.png"},compId:49,child:[{type:"Image",props:{y:7,x:12,width:45,skin:"Main/jinbi-zhu.png",height:45},compId:51,child:[{type:"Text",props:{y:2,x:47,width:134,var:"rateValue",valign:"middle",text:"800",height:41,fontSize:40,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:52}]}]},{type:"Text",props:{y:33,x:392,width:106,var:"rateLv",valign:"middle",text:"LV8",height:41,fontSize:50,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:50}]},{type:"Image",props:{y:445,x:44.5,var:"coinBox",skin:"Main/wenzi-di5.png"},compId:53,child:[{type:"Image",props:{y:43,x:161,skin:"Main/gongji-2.png"},compId:54},{type:"Image",props:{y:48,x:26,skin:"Main/zhuangbei-tubiao-di.png"},compId:63},{type:"Image",props:{y:63.5,x:30,skin:"Main/jinbi.png"},compId:55},{type:"Image",props:{y:124,x:161,skin:"Main/gongji-1.png"},compId:56},{type:"Button",props:{y:94,x:351,var:"getcoinBtn",stateNum:1,skin:"Main/zheng-qianbi-di.png"},compId:57,child:[{type:"Image",props:{y:7,x:12,width:45,skin:"Main/shipin-biao.png",height:45},compId:58,child:[{type:"Text",props:{y:2,x:47,width:134,var:"coinValue",valign:"middle",text:"800",height:41,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:59}]}]}]}]}],loadList:["Main/zhujiemian-1-20.png","Main/bg-sheng.png","Main/p__fanhui.png","Main/beijing-di.png","Main/wenzi-di5.png","Main/gongji-2-3.png","Main/zhuangbei-tubiao-di.png","Main/gongji-icon.png","Main/gongji-1-3.png","Main/zheng-qianbi-di.png","Main/jinbi-zhu.png","Main/gongji-2-2.png","Main/iconqiang.png","Main/gongji-1-2.png","Main/gongji-2.png","Main/jinbi.png","Main/gongji-1.png","Main/shipin-biao.png"],loadList3D:[]},e.IntensifyViewUI=r,ge("ui.IntensifyViewUI",r);class h extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(h.uiView)}}h.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{var:"bg",top:0,skin:"load/bg.png",right:0,name:"bg",left:0,bottom:0},compId:6},{type:"Image",props:{x:360,var:"prepan",centerY:-68},compId:14},{type:"Image",props:{x:86,skin:"load/title.png",centerY:-360},compId:17},{type:"Image",props:{y:932,x:137,var:"pro",skin:"load/jindu-di.png",centerY:309},compId:20,child:[{type:"Image",props:{y:4,x:4,width:438,var:"pro1",skin:"load/shang.png"},compId:21},{type:"Text",props:{y:0,x:2,width:442,var:"proTex",valign:"middle",text:"100%",height:38,fontSize:28,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:22},{type:"Text",props:{y:60,x:51,width:359,valign:"middle",text:"一款好玩的游戏正在加载...",height:37,fontSize:30,font:"SimSun",color:"#ff0000",align:"left",runtime:"laya.display.Text"},compId:23}]}],animations:[{nodes:[{target:9,keyframes:{alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:9,key:"alpha",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:9,key:"alpha",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:9,key:"alpha",index:20}]}},{target:10,keyframes:{alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:10,key:"alpha",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:10,key:"alpha",index:10},{value:0,tweenMethod:"linearNone",tween:!0,target:10,key:"alpha",index:20}]}},{target:11,keyframes:{alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:11,key:"alpha",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:11,key:"alpha",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:11,key:"alpha",index:20}]}}],name:"ani1",id:1,frameRate:24,action:2}],loadList:["load/bg.png","load/title.png","load/jindu-di.png","load/shang.png"],loadList3D:[]},e.LoadViewUI=h,ge("ui.LoadViewUI",h);class l extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(l.uiView)}}l.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Box",props:{x:0,top:82,right:0,left:0,height:70},compId:265,child:[{type:"Image",props:{y:21,x:282,width:157,var:"pro",skin:"Main/jindu-duan.png"},compId:302,child:[{type:"Image",props:{y:4,x:1,width:150,var:"pro1",skin:"Main/jindu-guan-do.png",height:20},compId:305},{type:"Image",props:{y:-11,x:-49,skin:"Main/guanshu.png"},compId:303,child:[{type:"Text",props:{y:-1,x:-3,width:54,var:"stageValue",valign:"middle",text:"10",height:51,fontSize:32,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:264}]},{type:"Image",props:{y:-11,x:155,skin:"Main/shadi.png"},compId:304}]},{type:"Image",props:{width:187,top:130,skin:"Main/jinbi-di.png",right:522},compId:261,child:[{type:"Image",props:{y:4.5,x:0,skin:"Main/jinbi-zhu.png"},compId:262},{type:"Text",props:{y:3.5,x:37,width:142,var:"countValue",valign:"middle",text:"100000",italic:!0,height:47,fontSize:36,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:263}]}]},{type:"Box",props:{var:"mainBox",top:0,right:0,name:"mainBox",left:0,bottom:0},compId:284,child:[{type:"Image",props:{x:30,var:"settingBtn",top:104,skin:"Main/shezhi.png",runtime:"View/Com/ButtonRunTime.ts"},compId:260},{type:"Box",props:{x:29,width:63,visible:!1,var:"settingBox",top:179,height:134},compId:291,child:[{type:"Button",props:{x:2,width:59,var:"shake_btn",stateNum:1,height:59},compId:285,child:[{type:"Image",props:{y:0,x:0,skin:"Main/ButtonVibrationOff.png",name:"kai"},compId:287},{type:"Image",props:{y:0,x:0,visible:!1,skin:"Main/ButtonVibrationOn.png",name:"guan"},compId:288}]},{type:"Button",props:{y:74,width:62,var:"sound_btn",stateNum:1,height:60},compId:286,child:[{type:"Image",props:{y:0,x:0,skin:"Main/Icon_SoundOn.png",name:"kai"},compId:289},{type:"Image",props:{y:0,x:0,visible:!1,skin:"Main/Icon_SoundOff.png",name:"guan"},compId:290}]}]},{type:"Box",props:{var:"startBox",right:0,left:0,height:5,bottom:208},compId:259,child:[{type:"Image",props:{var:"updateBtn",skin:"Main/shengji.png",runtime:"View/Com/ButtonRunTime.ts",left:0,bottom:0},compId:257},{type:"Image",props:{var:"skinBtn",skin:"Main/shangdain.png",runtime:"View/Com/ButtonRunTime.ts",right:0,bottom:0},compId:258}]},{type:"Text",props:{y:0,x:0,width:194,var:"user_id",valign:"middle",text:"user_id:12",height:25,fontSize:25,color:"#000000",runtime:"laya.display.Text"},compId:270}]},{type:"Image",props:{x:168.5,var:"sliderBox",skin:"Main/zhiyin-di.png",gray:!1,bottom:325},compId:253,child:[{type:"Image",props:{y:-71,x:27,skin:"Main/pause1.png"},compId:334},{type:"Image",props:{y:18,x:191.5,skin:"Main/shouzhi.png",anchorX:.5},compId:293},{type:"Image",props:{y:13.5,x:18,skin:"Main/fangxiangzuo.png"},compId:331},{type:"Image",props:{y:13.5,x:283,skin:"Main/fangxiangyou.png"},compId:332}]},{type:"Sprite",props:{var:"duohuituiSp"},compId:312},{type:"Sprite",props:{y:0,x:0,var:"bannerHuiTuiSp"},compId:313},{type:"Box",props:{y:0,x:0,width:720,visible:!0,right:0,name:"BottomBox",left:0,height:177,bottom:0},compId:314,child:[{type:"Image",props:{width:720,top:0,skin:"Main/chunhei2.png",sizeGrid:"12,11,13,10",right:0,name:"BG",left:0,height:183,bottom:0},compId:317},{type:"List",props:{width:720,var:"BottomList",spaceX:30,right:0,repeatY:1,left:0,height:176,bottom:0},compId:318,child:[{type:"Box",props:{y:8,x:18,width:130,renderType:"render",height:160},compId:319,child:[{type:"Image",props:{y:0,x:0,width:129,skin:"Main/bg-box.png",sizeGrid:"27,27,37,20",name:"BG",height:159},compId:320},{type:"Image",props:{y:0,x:0,width:130,name:"icon",height:130},compId:321},{type:"Text",props:{y:130,x:0,width:126,valign:"middle",text:"冲冲冲冲冲冲",name:"name",height:29,fontSize:20,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:322},{type:"Button",props:{y:0,x:0,width:130,name:"btn",height:160},compId:323},{type:"Script",props:{runtime:"View/Com/ListItem.ts"},compId:335}]}]}]},{type:"Button",props:{y:561,width:140,var:"LeftPushIcon",skin:"Main/hutui-1-4.png",sizeGrid:"5,16,5,11",pivotY:88,pivotX:70,left:20,height:175},compId:315,child:[{type:"Image",props:{width:140,name:"icon",height:140},compId:325},{type:"Text",props:{y:159,x:70,width:140,valign:"middle",text:"冲冲冲冲冲冲",pivotY:19,pivotX:70,name:"name",height:37,fontSize:22,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:326}]},{type:"Button",props:{y:561,width:140,var:"RightPushIcon",skin:"Main/hutui-1-4.png",sizeGrid:"5,16,5,11",right:21,pivotY:88,pivotX:70,height:175},compId:316,child:[{type:"Image",props:{width:140,name:"icon",height:140},compId:327},{type:"Text",props:{y:159,x:70,width:140,valign:"middle",text:"冲冲冲冲冲冲",pivotY:19,pivotX:70,name:"name",height:37,fontSize:22,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:328}]},{type:"Button",props:{y:209,x:532,var:"ExitBtn",stateNum:1,skin:"Main/exit.png"},compId:330},{type:"Button",props:{y:726,x:0,var:"MoreGameBtn",stateNum:1,skin:"Main/gengduoyouxi.png"},compId:333}],animations:[{nodes:[{target:293,keyframes:{x:[{value:164,tweenMethod:"linearNone",tween:!0,target:293,key:"x",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:293,key:"x",index:15},{value:164,tweenMethod:"linearNone",tween:!0,target:293,key:"x",index:30},{value:326,tweenMethod:"linearNone",tween:!0,target:293,key:"x",index:45},{value:164,tweenMethod:"linearNone",tween:!0,target:293,key:"x",index:60}]}}],name:"gameStart",id:1,frameRate:24,action:2},{nodes:[{target:315,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:315,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:315,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:315,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:315,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:315,key:"rotation",index:20}]}}],name:"lefticon",id:2,frameRate:24,action:0},{nodes:[{target:316,keyframes:{rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:316,key:"rotation",index:0},{value:-15,tweenMethod:"linearNone",tween:!0,target:316,key:"rotation",index:5},{value:0,tweenMethod:"linearNone",tween:!0,target:316,key:"rotation",index:10},{value:15,tweenMethod:"linearNone",tween:!0,target:316,key:"rotation",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:316,key:"rotation",index:20}]}}],name:"righticon",id:3,frameRate:24,action:0}],loadList:["Main/jindu-duan.png","Main/jindu-guan-do.png","Main/guanshu.png","Main/shadi.png","Main/jinbi-di.png","Main/jinbi-zhu.png","Main/shezhi.png","Main/ButtonVibrationOff.png","Main/ButtonVibrationOn.png","Main/Icon_SoundOn.png","Main/Icon_SoundOff.png","Main/shengji.png","Main/shangdain.png","Main/zhiyin-di.png","Main/pause1.png","Main/shouzhi.png","Main/fangxiangzuo.png","Main/fangxiangyou.png","Main/chunhei2.png","Main/bg-box.png","Main/hutui-1-4.png","Main/exit.png","Main/gengduoyouxi.png"],loadList3D:[]},e.MainViewUI=l,ge("ui.MainViewUI",l);class c extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(c.uiView)}}c.uiView={type:"View",props:{width:720,height:1280},compId:2,loadList:[],loadList3D:[]},e.ShadeViewUI=c,ge("ui.ShadeViewUI",c);class d extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(d.uiView)}}d.uiView={type:"View",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/zhujiemian-1-20.png",sizeGrid:"13,14,14,13",right:0,left:0,bottom:0},compId:115},{type:"Image",props:{top:0,skin:"Main/bg-sheng1.png",right:0,left:0,bottom:0},compId:3},{type:"Image",props:{x:17,var:"CloseBtn",skin:"Main/guanbi-bt.png",runtime:"View/Com/ButtonRunTime.ts",centerY:-529},compId:87},{type:"Image",props:{skin:"Main/pifu-biaoti.png",centerY:-399},compId:92},{type:"Box",props:{x:50,width:626,height:102,centerY:-70},compId:100,child:[{type:"Button",props:{y:0,x:0,width:83,var:"leftBtn",stateNum:1,height:88},compId:93,child:[{type:"Image",props:{y:3,x:3,skin:"Main/wu-you.png",name:"leftFalse"},compId:95},{type:"Image",props:{y:3,x:3,skin:"Main/you-zuo.png",name:"leftTrue"},compId:96}]},{type:"Button",props:{y:51,x:572,width:94,var:"rightBtn",stateNum:1,pivotY:51,pivotX:51,height:97},compId:97,child:[{type:"Image",props:{y:51,x:51,width:80,skin:"Main/wu-zuo.png",rotation:180,pivotY:42,pivotX:40,name:"rightFalse",height:84},compId:98},{type:"Image",props:{y:51,x:51,width:80,skin:"Main/you-you.png",pivotY:42,pivotX:40,name:"rightTrue",height:84},compId:99}]}]},{type:"Image",props:{x:163.5,skin:"Main/dizuo.png",centerY:199},compId:101},{type:"Image",props:{x:173.5,width:379,var:"viewPort",height:426,centerY:14},compId:102},{type:"Box",props:{x:196,width:331,var:"btnBox",height:127,centerY:396},compId:113,child:[{type:"Image",props:{y:9,x:0,var:"using",skin:"Main/bt.png"},compId:103,child:[{type:"Text",props:{y:22,x:54.5,width:202,valign:"middle",text:"使用中",height:65,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:104}]},{type:"Image",props:{y:9,x:0,var:"use",skin:"Main/bt.png",runtime:"View/Com/ButtonRunTime.ts"},compId:105,child:[{type:"Text",props:{y:22,x:54.5,width:202,valign:"middle",text:"使用",height:65,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:106}]},{type:"Image",props:{y:9,x:0,var:"coin",skin:"Main/bt.png",runtime:"View/Com/ButtonRunTime.ts"},compId:107,child:[{type:"Image",props:{y:26.5,x:40,width:53,skin:"Main/jinbi-zhu.png",height:56},compId:109,child:[{type:"Text",props:{y:-4.5,x:37,width:202,valign:"middle",text:"500",height:65,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:108}]}]},{type:"Image",props:{y:9,x:0,var:"video",skin:"Main/bt.png",runtime:"View/Com/ButtonRunTime.ts"},compId:110,child:[{type:"Image",props:{y:24,x:46,width:65,skin:"Main/shipin-biao.png",height:61},compId:111,child:[{type:"Text",props:{y:-2,x:63,width:202,valign:"middle",text:"1/3",height:65,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:112}]}]}]}],loadList:["Main/zhujiemian-1-20.png","Main/bg-sheng1.png","Main/guanbi-bt.png","Main/pifu-biaoti.png","Main/wu-you.png","Main/you-zuo.png","Main/wu-zuo.png","Main/you-you.png","Main/dizuo.png","Main/bt.png","Main/jinbi-zhu.png","Main/shipin-biao.png"],loadList3D:[]},e.SkinShopViewUI=d,ge("ui.SkinShopViewUI",d);class p extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(p.uiView)}}p.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{var:"bg",top:0,skin:"Main/zhujiemian-1-20.png",right:0,left:0,bottom:0,alpha:0},compId:3},{type:"Image",props:{y:647,x:159,width:402,var:"sliderBox",skin:"Main/huadong-tiao.png",height:33,gray:!1,centerY:23},compId:4,child:[{type:"Image",props:{y:124,x:37,skin:"Main/pause1.png"},compId:5},{type:"Image",props:{y:0,x:201,skin:"Main/shou.png",anchorX:.5},compId:6}]}],animations:[{nodes:[{target:6,keyframes:{x:[{value:201,tweenMethod:"linearNone",tween:!0,target:6,key:"x",index:0},{value:13,tweenMethod:"linearNone",tween:!0,target:6,key:"x",index:15},{value:201,tweenMethod:"linearNone",tween:!0,target:6,key:"x",index:30},{value:402,tweenMethod:"linearNone",tween:!0,target:6,key:"x",index:45},{value:201,tweenMethod:"linearNone",tween:!0,target:6,key:"x",index:60}]}}],name:"ani1",id:1,frameRate:24,action:2}],loadList:["Main/zhujiemian-1-20.png","Main/huadong-tiao.png","Main/pause1.png","Main/shou.png"],loadList3D:[]},e.TopTipUiUI=p,ge("ui.TopTipUiUI",p);class u extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(u.uiView)}}u.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/zhujiemian-1-20.png",sizeGrid:"11,11,13,10",right:0,left:0,bottom:0},compId:3},{type:"Image",props:{y:82,x:129.5,skin:"Main/biaoti.png"},compId:4},{type:"Image",props:{x:104,visible:!1,skin:"Main/shiyong-bg.png",centerY:-100},compId:5},{type:"Image",props:{x:165,skin:"Main/dizuo.png",centerY:91},compId:6},{type:"Image",props:{x:170,width:380,var:"viewPort",height:398,centerY:-91},compId:8},{type:"Box",props:{x:197.5,width:325,var:"btnBox",height:191,bottom:175},compId:11,child:[{type:"Image",props:{y:127,x:91,var:"backBtn",skin:"Main/no-bt.png",runtime:"View/Com/ButtonRunTime.ts"},compId:9},{type:"Image",props:{y:0,x:16,var:"videoBtn",skin:"Main/sanbeilingqu--s.png",runtime:"View/Com/ButtonRunTime.ts"},compId:10}]}],loadList:["Main/zhujiemian-1-20.png","Main/biaoti.png","Main/shiyong-bg.png","Main/dizuo.png","Main/no-bt.png","Main/sanbeilingqu--s.png"],loadList3D:[]},e.TrialViewUI=u,ge("ui.TrialViewUI",u)}(ue||(ue={}));class ye extends ue.GuideViewUI{constructor(){super(),this.isguide2or3=!1,this.guide1pos=F.VecZero,this.guide1Com=!1,ye.instance=this,this.Resize(),a.on(Laya.Event.RESIZE,this,this.Resize)}static get Instance(){return ye.instance}OnShow(e){this.RegButton(),this.RefreshData(),this.RefreshUI()}RefreshUI(){}RefreshData(){}RegButton(){}TwoGuide(){this.guide3Box.visible=!0,this.guide4Box.visible=!0,this.guide2Image.visible=!0,this.guide3.play(0,!0),this.guide4.play(0,!0),Laya.timer.frameLoop(1,this,this._twoguide),this.guide1pos.x=-4.5,this.guide1pos.y=0}_twoguide(){let e=ie.WorldToScreen2(this._camera,we.Instance.guidetwoPos.clone());this.guide4Box.pos(e.x,e.y),this.guide1pos.z=this.playerTran.localPositionZ+5;let t=ie.WorldToScreen2(this._camera,this.guide1pos);this.guide3Box.pos(t.x,t.y),this.playerTran.localPositionZ>=we.Instance.guidetwoPos.z-10&&(this.guide3Box.visible=!1,this.guide4Box.visible=!1,this.guide2Image.visible=!1,this.guide3Image.visible=!0,this.guide3.stop(),this.guide4.stop(),Laya.timer.clear(this,this._twoguide),Laya.timer.once(5e3,this,()=>{we.Instance.GuideOff()}))}SetGuide(e){this.playerTran||(this.playerTran=et.Instance.playerTra),this._camera||(this._camera=q.Instance._maincamera),1==e&&(this.guide1Image.visible=!0,this.guide2Image.visible=!1,this.guide3Image.visible=!1,this.guide1Box.visible=!0,this.guide1.play(0,!0),this.guide4Box.visible=!1,this.playerTran.localPositionX<=we.Instance.guideonepos.x?(this.guide2Box.visible=!0,this.guide3Box.visible=!1,this.isguide2or3=!0,this.guide2.play(0,!0)):(this.guide2Box.visible=!1,this.guide3Box.visible=!0,this.isguide2or3=!1,this.guide3.play(0,!0)),this.guide1pos=we.Instance.guideonepos.clone(),Laya.timer.frameLoop(1,this,this.OneGuide),this.guide1Com=!1)}OnClose(){a.off(Laya.Event.RESIZE,this,this.Resize),ye.instance=null,Laya.timer.clearAll(this)}Resize(){this.height=Laya.stage.height}OneGuide(){if(this.guide1Com)this.playerTran.localPositionZ>=we.Instance.guideonepos.z&&(console.log(111),Laya.timer.clear(this,this.OneGuide),this.TwoGuide());else{let e=ie.WorldToScreen2(this._camera,we.Instance.guideonepos.clone());this.guide1Box.pos(e.x,e.y),this.guide1pos.z=this.playerTran.localPositionZ+10;let t=ie.WorldToScreen2(this._camera,this.guide1pos);this.isguide2or3?this.guide2Box.pos(t.x,t.y):this.guide3Box.pos(t.x,t.y),this.playerTran.localPositionZ>=we.Instance.guideonepos.z-5&&(this.guide2.stop(),this.guide3.stop(),this.guide2Box.visible=!1,this.guide3Box.visible=!1,this.guide1Box.visible=!1,this.guide1Com=!0,this.guide1Image.visible=!1)}}}var me=Laya.Input;class we{constructor(){this.guideonepos=new Laya.Vector3(2.5,0,59.4),this.guidetwoPos=new Laya.Vector3(-5,2,104.4),this.index=0,this._guide=!1}static get Instance(){return this.instance||(this.instance=new we)}GuideOn(){this._guide&&Laya.timer.once(500,this,this.Guide)}Guide(){kt.Instance.ShowGuideView(),ye.Instance&&ye.Instance.SetGuide(1)}GuideOff(){this._guide=!1,kt.Instance.CloseGuideView()}GameOver(){this._guide&&kt.Instance.CloseGuideView()}createInput(){var e=new me;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)}InitGuide(e){0==this.index?(this.guideonepos.z=e,this.index++):1==this.index&&(this.guidetwoPos.z=e,this.index++)}RequireGuide(){Laya.LocalStorage.getItem("guide");return 1==v.Instance.stage?(Laya.LocalStorage.setItem("guide","1"),this._guide=!0,!0):(this._guide=!1,!1)}}var fe=Laya.Sprite;class Ie{constructor(e,t){this.blocks=e,this.blockPos=t}}class ve{constructor(e,t,i){this.things=e,this.thingPos=t,this.blockHp=i}}class Le{constructor(e,t,i,a){this.type=e,this.prrfabName=t,this.moveType=i,this.moveSpeed=a}}class xe{constructor(){this.isover=!1,this.curindex=1,this.texture1="res/apes/monkey2.png",this.texture2="res/apes/monkey3.png",this.flag=!1,this.blockDic=new i,this.cubeBlockDic=new i}static get Instance(){return xe.instance||(xe.instance=new xe)}Init(e){this.BlockContainer=e}SetBlock(){this.isover=!1,this.curindex=1,this.CreateStreet()}onAssetsLoaded(){this.ape=new fe,Laya.stage.addChild(this.ape),this.ape.pivot(55,72),this.ape.pos(Laya.stage.width/2,Laya.stage.height/2),this.switchTexture(),this.ape.on("click",this,this.switchTexture)}switchTexture(){var e=(this.flag=!this.flag)?this.texture1:this.texture2;this.ape.graphics.clear();var t=Laya.loader.getRes(e);this.ape.graphics.drawTexture(t,0,0),this.ape.size(t.width,t.height)}CheckPlayerRoadPos(e){if(this.isover)return;this.tarDis-e>0||this.StreetSwitch()}StreetSwitch(){this.curindex++,this.CreateStreet()}CreateSprite(e){we.Instance._guide&&we.Instance.InitGuide(e.blockPos[0]);let t=e.blocks,i=e.blockPos,a=0;for(let e=0;e1;for(let e=0;e0)for(let i=0;ie.length-1)return this.isover=!0,void console.log("没有障碍物了");this.tarDis=this.curindex*L.barrierRoadLength;let i=e[this.curindex];if(0==i)return;let a=u.Instance.GetRoad(i);if(!a)return;let n=t.SpliteString(a.blocks),s=t.SpliteString(a.position),o=[],r=L.barrierRoadLength/L.barrierRoadAverageNum;s.forEach(e=>{o.push(this.tarDis+e*r)});let h=[];n.forEach(e=>{let i=u.Instance.GetStreet(e),a=t.SpliteString(i.block_things),n=t.SpliteString(i.thing_position),s=t.SpliteString(i.block_hp),o=[];a.forEach(e=>{let t=u.Instance.GetThing(e),i=new Le(t.type,t.prefabs,t.dynamic_type,t.dynamic_speed);o.push(i)});let r=new ve(o,n,s);h.push(r)});let l=new Ie(h,o);this.CreateSprite(l)}}var Se=Laya.Vector3,Ce=Laya.Quaternion,ke=Laya.Animation,be=Laya.Tween;class Me extends Laya.Script3D{constructor(){super(...arguments),this._up=new Se(0,1,0),this.isArrive1=!1,this.phoenixWidth=550,this.phoenixHeight=400,this.bgColorTweener=new be,this.gradientInterval=2e3,this.bgColorChannels={r:99,g:0,b:255}}onAwake(){this.selfobj=this.owner,this.tran=this.selfobj.transform,this.forW=F.VecZero,this.speed=L.enemySpeed,this.quaternion1=new Ce}Run(){if(this.isArrive1){if(null==this.tarSp)return;if(!this.tarSp.active){if(this.tarSp=Re.Instance.GetTar(),null==this.tarSp)return;this.tarPos=this.tarSp.transform.position.clone()}if(Se.subtract(this.tarPos,this.tran.position,this.forW),Se.normalize(this.forW,this.forW),this.forW=new Se(this.forW.x*this.speed,this.forW.y*this.speed,this.forW.z*this.speed),this.tran.translate(this.forW,!1),Se.distance(this.tran.position,this.tarPos)<.1)return;Ce.lookAt(this.tarPos,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}else{if(Se.subtract(this.tarPos,this.tran.position,this.forW),Se.normalize(this.forW,this.forW),this.forW=new Se(this.forW.x*this.speed,this.forW.y*this.speed,this.forW.z*this.speed),this.tran.translate(this.forW,!1),Se.distance(this.tran.position,this.tarPos)<.1){if(this.tarSp=Re.Instance.GetTar(),this.isArrive1=!0,null==this.tarSp)return;return void(this.tarPos=this.tarSp.transform.position.clone())}Ce.lookAt(this.tarPos,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}}createPhoenixes(){var e=Math.min(Laya.stage.width/(2*this.phoenixWidth),Laya.stage.height/this.phoenixHeight),t=this.createAnimation();t.blendMode="lighter",t.scale(e,e),t.y=(Laya.stage.height-this.phoenixHeight*e)/2;var i=this.createAnimation();i.scale(e,e),i.x=this.phoenixWidth*e,i.y=(Laya.stage.height-this.phoenixHeight*e)/2}createAnimation(){var e=new ke;e.loadImages([]),Laya.stage.addChild(e);var t=e.frames.concat();return t=t.reverse(),e.frames=e.frames.concat(t),e.play(),e}Recovery(){Laya.timer.clearAll(this),Re.Instance.RecoverEnemy(this.selfobj),H.Instance.RecoverModel(this.selfobj)}InitModel(e,t,i){this.tarSp=e,this.isArrive1=!1,null!=this.tarSp&&(this.tarPos=this.tarSp.transform.position.clone(),this.tarPos.x>0?this.tarPos=je.Instance.toured1.clone():this.tarPos=je.Instance.toured2.clone(),this.hp=t,Laya.timer.frameLoop(1,this,this.Run))}Injured(e){this.hp-=v.bulletAttack,this.hp<=0?this.Dead():ne.Instance.AttackEffect(e)}Dead(){ne.Instance.BloodEffect(this.tran.position),this.Recovery(),Re.Instance.CheckGameOver(),Te.Instance.roleCount++}}var _e=Laya.Sprite;class Re{constructor(){this.frameCount=10,this.enemyDic=new i}static get Instance(){return this.instance||(this.instance=new Re)}Create(e,t){let i=H.Instance.GetModel(H.modeltype.Enemy);if(!i)return;et.Instance.playerContainer.addChild(i),i.transform.position=this.startPos.clone();let a=i.getComponent(Me);a||(a=i.addComponent(Me));let n=this.GetTar();a.InitModel(n,e,t),this.enemyDic.set(i.id,a)}CheckGameOver(){0==this.enemyDic.size&&(le.Instance.OnClickUp(),et.Instance.CreateOver(),Te.Instance.Congratulate())}GetOpponent(){for(const e in this.enemyDic.container){return this.enemyDic.get(e).selfobj}return null}Reset(){let e=[];for(const t in this.enemyDic.container)e.push(t);if(e.length>0)for(let t=0;t.5)return et.Instance.playerScript.body;{let e=Oe.Instance.GetSprite();return e||et.Instance.playerScript.body}}RecoverEnemy(e){this.enemyDic.delete(e.id)}}class Be{constructor(){Be.ins=this}static get Instance(){return null==Be.ins?new Be:Be.ins}static InitVideo(){}static ShowVideo(e){}static SetVideoCallBack(e){this.fsaasfafssfa.offClose(),this.fsaasfafssfa.onClose(t=>{console.log("激励视频关闭:"+t.isEnded),t&&t.isEnded||void 0===t?e&&e(!0):e&&e(!1),this.fsaasfafssfa.offClose()})}static OpenBanner(e=0,t=null,i=!1){}static GetRealHight(e){if(this.curbanner){let 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}}static Clear(){}static hidebanner(){Laya.Browser.onWeiXin&&this.curbanner&&this.curbanner.hide()}static showbanner(){Laya.Browser.onWeiXin&&this.curbanner&&this.curbanner.show()}static get cancheat(){return b.Cheat?0==b.CheckScene?(console.log("cheat:true-> "+s.wxValue),!0):"1037"==s.wxValue||"1058"==s.wxValue||"1067"==s.wxValue||"1095"==s.wxValue?(console.log("cheat:true-> "+s.wxValue),!0):(console.log("cheat:false-> "+s.wxValue),!1):(console.log("cheat:false-> CurAccountData.cheat != 1"),!1)}static SetPosBanner(e,t){}static CheatBanner(e,t=null,i=0){}showBanner(e=null,t=null){if(!Laya.Browser.onWeiXin)return;let i=Be.bannerAdUnitId,a=Laya.Browser.window.wx.createBannerAd({adUnitId:i,style:{left:0,top:0,width:460}});a.onLoad(()=>{console.log("[LOG] Banner广告加载成功"),this.hideBanner(),this._bannerAd=a;let t=Laya.Browser.window.wx.getSystemInfoSync();this._bannerAd.style.width=t.windowWidth,this._bannerAd.style.top=t.windowHeight-this._bannerAd.style.realHeight-20,this._bannerAd.show(),e&&e(this._bannerAd)}),a.onError(e=>{console.log("[LOG] Banner广告加载失败"),console.log(e),t&&t()})}hideBanner(){Laya.Browser.onWeiXin&&this._bannerAd&&(this._bannerAd.hide(),this._bannerAd.destroy(),this._bannerAd=null)}}Be.videlAdUnitId="adunit-c417d6819ffdc5a2",Be.bannerAdUnitId="adunit-741a4dcc646d56b8",Be.afsfsaafsfsa=!1,Be.asfasfsaffsa=!1,Be.canshowbanner=!0,Be.bannerhigt=0;class Te{constructor(){this.towerCount=0,this.roleCount=0,this.blockCount=0}static get Instance(){return Te.instance||(Te.instance=new Te)}Start(){this.towerCount=0,this.roleCount=0,this.blockCount=0}Win(){N.LongVibrate(),Be.Clear(),kt.Instance.AddView(wt.CompleteView,!0),te.Instance.Reset(),xe.Instance.Reset(),Oe.Instance.Reset(),et.Instance.Reset(),Re.Instance.Reset()}Congratulate(e=!1){Be.CheatBanner(null),et.Instance.GoToTiaoWu(),e?Oe.Instance.TiaoWu1():Oe.Instance.TiaoWu(),q.Instance.SetCameraAction(tt.jump,.03),Laya.timer.once(4e3,this,this.Win)}Over(){we.Instance.GameOver(),le.Instance.OnClickUp(),et.Instance.CreateOver(),le.Instance._Switch=!1,N.LongVibrate(),Be.Clear(),kt.Instance.AddView(wt.CompleteView,!1),te.Instance.Reset(),xe.Instance.Reset(),Oe.Instance.Reset(),et.Instance.Reset(),et.Instance.HidePlayer(),Re.Instance.Reset()}loadUI(){Laya.loader.load(["res/threeDimen/ui/button.png"],Laya.Handler.create(this,function(){this.changeActionButton=Laya.stage.addChild(new Laya.Button("res/threeDimen/ui/button.png","切换Mesh")),this.changeActionButton.size(160,40),this.changeActionButton.labelBold=!0,this.changeActionButton.labelSize=30,this.changeActionButton.sizeGrid="4,4,4,4",this.changeActionButton.scale(Laya.Browser.pixelRatio,Laya.Browser.pixelRatio),this.changeActionButton.pos(Laya.stage.width/2-this.changeActionButton.width*Laya.Browser.pixelRatio/2,Laya.stage.height-100*Laya.Browser.pixelRatio),this.changeActionButton.on(Laya.Event.CLICK,this,function(){this.index++,this.index%5==1?this.sphere.meshFilter.sharedMesh=this.box:this.index%5==2?this.sphere.meshFilter.sharedMesh=this.capsule:this.index%5==3?this.sphere.meshFilter.sharedMesh=this.cylinder:this.index%5==3?this.sphere.meshFilter.sharedMesh=this.cone:this.sphere.meshFilter.sharedMesh=this.sphereMesh})}))}Near(){te.Instance.Reset(),xe.Instance.Reset()}ReStart(){Oe.Instance.Reset(),ot.Instance.InItScene(),a.event(n.Event.ShowMainUi),a.event(n.Event.SetStagePro,0)}LevelUp(){v.Instance.stage++,ot.Instance.InItScene(),kt.Instance.CloseView(wt.CompleteView),a.event(n.Event.ShowMainUi),a.event(n.Event.SetStage),a.event(n.Event.SetStagePro,0)}}Te.GameNum=0;class Ve extends Laya.Script3D{constructor(){super(...arguments),this.guideSteps=[{x:151,y:575,radius:150,tip:"res/guide/help6.png",tipx:200,tipy:250},{x:883,y:620,radius:100,tip:"res/guide/help4.png",tipx:730,tipy:380},{x:1128,y:583,radius:110,tip:"res/guide/help3.png",tipx:900,tipy:300}],this.guideStep=0}onAwake(){this.selfobj=this.owner,this.tran=this.selfobj.transform,this.FriendSpawnPoint=this.selfobj.getChildByName("FriendSpawnPoint").transform,this.HealthText=this.selfobj.getChildByName("HealthText").transform;let e=this.selfobj.getChildByName("WallsEnd");this.WallsEnd=e.transform,this._reflect=e.getChildAt(0).meshRenderer.material}HpUi(){let e=ie.WorldToScreen2(this._camera,this.HealthText.position.clone());e.x<=0||e.x>=Laya.stage.width||e.y<=0||e.y>=Laya.stage.height?this.hpText.visible=!1:(this.hpText.visible||(this.hpText.visible=!0),this.hpText.x=e.x,this.hpText.y=e.y)}CheckHp(){this.tarTran.localPositionZ-this.tran.localPositionZ>=5?this.Recovery():this.HpUi()}nextStep(){if(this.guideStep==this.guideSteps.length)Laya.stage.removeChild(this.guideContainer),Laya.stage.removeChild(this.tipContainer);else{var e=this.guideSteps[this.guideStep++];this.hitArea.unHit.clear(),this.hitArea.unHit.drawCircle(e.x,e.y,e.radius,"#000000"),this.interactionArea.graphics.clear(),this.interactionArea.graphics.drawCircle(e.x,e.y,e.radius,"#000000"),this.tipContainer.graphics.clear(),this.tipContainer.loadImage(e.tip),this.tipContainer.pos(e.tipx,e.tipy)}}MakeMate(){this._mate=Oe.Instance.MadeMate(this.FriendSpawnPoint)}Rescue(){this._mate&&(this._mate.FallDown(),this._mate=null)}ReflectSet(){this._reflect.albedoIntensity=4,Laya.timer.once(100,this,()=>{this._reflect.albedoIntensity=1})}Recovery(){Laya.timer.clearAll(this),this.hpText&&(H.Instance.RecoverUi(z.HpText,this.hpText),this.hpText=null),this._reflect.albedoIntensity=1,te.Instance.RecoverMound(this.selfobj),H.Instance.RecoverModel(this.selfobj),this._mate&&(this._mate.Recover(),this._mate=null)}Injured(e){if(this._hp-=v.bulletAttack,this._hp<=0)return this.Rescue(),ne.Instance.ExplodeEffect(this.tran.position),this.Recovery(),void Te.Instance.towerCount++;ne.Instance.AttackEffect(e);let t=Math.ceil(this._hp);this.hpText.text=t.toString(),this.ReflectSet()}SetMound(e){this._mate=null,this.tarTran=et.Instance.player.transform,this.tran.localPositionX=e.x,this.tran.localPositionY=0,this.tran.localPositionZ=e.z,e.towerR?this.WallsEnd.localRotationEulerY=30:this.WallsEnd.localRotationEulerY=0,1==e.type&&this.MakeMate(),this._hp=e.hp,this.hpText||(this.hpText=te.Instance.HpUi(),this.hpText.text=this._hp.toString(),this._camera||(this._camera=q.Instance._maincamera),kt.Instance.popNode.addChild(this.hpText)),this.HpUi(),Laya.timer.frameLoop(1,this,this.CheckHp)}}var Pe=Laya.Vector3,Ae=Laya.Sprite;class Ee extends Laya.Script3D{constructor(){super(...arguments),this.speed=F.VecZero,this._forward=new Pe(0,0,1),this.over=!1}onAwake(){this.selfobj=this.owner,this.tran=this.selfobj.transform,this.rayPoint=this.selfobj.getChildByName("rayPoint").transform,this.speed.z=L.shootspeed}Run(){this.tran.translate(this.speed),Pe.distance(this.tarTran.position,this.tran.position)>=L.bulletMaxDis?this.RecoverBullet():this.RayReset()}RecoverBullet(){Laya.timer.clearAll(this),H.Instance.RecoverModel(this.selfobj),H.bulletCount--}drawSomething(){this.sp=new Ae,Laya.stage.addChild(this.sp),this.sp.graphics.drawLine(10,58,146,58,"#ff0000",3),this.sp.graphics.drawLines(176,58,[0,0,39,-50,78,0,117,50,156,0],"#ff0000",5),this.sp.graphics.drawCurves(352,58,[0,0,19,-100,39,0,58,100,78,0,97,-100,117,0,136,100,156,0],"#ff0000",5),this.sp.graphics.drawRect(10,166,166,90,"#ffff00"),this.sp.graphics.drawPoly(264,166,[0,0,60,0,78.48,57,30,93.48,-18.48,57],"#ffff00"),this.sp.graphics.drawPoly(400,166,[0,100,50,0,100,100],"#ffff00"),this.sp.graphics.drawCircle(98,332,50,"#00ffff"),this.sp.graphics.drawPie(240,290,100,10,60,"#00ffff"),this.sp.graphics.drawPath(400,310,[["moveTo",5,0],["lineTo",105,0],["arcTo",110,0,110,5,5],["lineTo",110,55],["arcTo",110,60,105,60,5],["lineTo",5,60],["arcTo",0,60,0,55,5],["lineTo",0,5],["arcTo",0,0,5,0,5],["closePath"]],{fillStyle:"#00ffff"})}RayReset(){let e=this.rayPoint.position.clone();if(this._scene||(this._scene=ot.Instance.MainScene),this.ray||(this.forward||(this.forward=F.VecZero),this.ray=new Laya.Ray(F.VecZero,this._forward),this.outHit=new Laya.HitResult),this.ray.origin=e,this.over?(this.tran.getForward(this.forward),this.forward.x=-this.forward.x,this.forward.y=-this.forward.y,this.forward.z=-this.forward.z,this.ray.direction=this.forward):this.ray.direction=this._forward,this._scene.physicsSimulation.rayCast(this.ray,this.outHit,L.bulletRayLength)){let e=this.outHit.collider.owner;if(e.layer==G.mound){let t=e.getComponent(Ve);t&&t.Injured(this.outHit.point)}else if(e.layer==G.opponent){let t=e.getComponent(Me);t&&t.Injured(this.outHit.point)}else e.layer==G.obstacle1||e.layer==G.obstacle2||e.layer==G.obstacle3?(xe.Instance.StreetAtkedCube(e),Te.Instance.blockCount++):ne.Instance.AttackEffect(this.outHit.point);this.RecoverBullet()}else;}Start(e,t=!1){this.tarTran=e,this.over=t,Laya.timer.frameLoop(1,this,this.Run)}}var De=Laya.Vector3,Ne=Laya.Quaternion,ze=Laya.Sprite,Ge=Laya.Text;class Ue extends Laya.Script3D{constructor(){super(...arguments),this._up=new De(0,1,0),this.isreturn=!1,this.isover=!1,this.isClickCom=!0,this.isStop=!0,this.texture1="res/apes/monkey2.png",this.texture2="res/apes/monkey3.png",this.flag=!1,this.isFristShoot=!0,this.ts=new De(0,0,.01)}onAwake(){this.selfobj=this.owner,this.tran=this.selfobj.transform,this.animator=this.selfobj.getChildAt(0).getComponent(Laya.Animator),this.rayPoint=this.selfobj.getChildByName("rayPoint").transform,this.bulletPos=this.selfobj.getChildByName("bulletPos").transform,this.forW=F.VecZero,this.speed=L.matespeed,this.quaternion1=new Ne}setup(){for(var e,t=new ze,i=0;i<1e3;i++)(e=new Ge).fontSize=20,e.text=(100*Math.random()).toFixed(0),e.rotation=360*Math.random(),e.color="#CCCCCC",e.x=Math.random()*Laya.stage.width,e.y=Math.random()*Laya.stage.height,t.addChild(e);t.cacheAs="bitmap",Laya.stage.addChild(t)}TrialAdd(e){this.AnimatorPlayByType(W.Idle,1),this.dataPar=e,this.dataPar.ishave=!0,this.isClickCom=!0,this.isStop=!0,this.isreturn=!0,this.isover=!1,Oe.Instance.AddModelToDic(this.selfobj.id,this),this.ShootFunc(),et.Instance.IsShoot()&&this.CreateShoot(),Laya.timer.frameLoop(1,this,this.Move)}SetTar(){this.isreturn=!1,this.isClickCom=!0,this.isStop=!0,this.isover=!1,this.AnimatorPlayByType(W.Idle,1),a.off(n.Event.StopShot,this,this.StopCreate)}FallDown(){let e=Laya.Tween.to(this.tran,{localPositionY:0},400,Laya.Ease.quintIn,Laya.Handler.create(this,()=>{let t=et.Instance.GetMatePos();t?(this.dataPar=t,this.dataPar.ishave=!0,this.tar=this.dataPar.sp,this.tarTra=this.tar.transform,e.clear(),this.Start()):console.warn("friendPar没有位置了")},null,!1))}Start(){this.AnimatorPlayByType(W.RunAndGun,2),this.isreturn=!1,this.isClickCom=!0,this.isStop=!0,this.isover=!1,Laya.timer.frameLoop(1,this,this.Move)}ArriveTarPos(){this.isClickCom=!0,this.isStop=!0,this.isreturn=!0,this.tar.addChild(this.selfobj),this.tran.localPosition=F.VecZero,this.AnimatorPlayByType(W.RunAndGun,2),Oe.Instance.AddModelToDic(this.selfobj.id,this);let e=Laya.Tween.to(this.tran,{localRotationEulerY:0},100,Laya.Ease.quintIn,Laya.Handler.create(this,()=>{e.clear(),this.tran.localRotationEuler=F.VecZero,this.ShootFunc(),this.CreateShoot()},null,!1))}RayReset(){let e=this.rayPoint.position;if(this._scene||(this._scene=ot.Instance.MainScene),this.rayF||(this.rayF=new Laya.Ray(F.VecZero,new De(0,0,1)),this.outHitF=new Laya.HitResult),this.rayF.origin=e,this._scene.physicsSimulation.rayCast(this.rayF,this.outHitF,L.playerRayLengthF)){this.outHitF.collider.owner;this.Dead(this.outHitF.point)}else if(this.rayL||(this.rayL=new Laya.Ray(F.VecZero,new De(1,0,0)),this.outHitL=new Laya.HitResult),this.rayL.origin=e,this._scene.physicsSimulation.rayCast(this.rayL,this.outHitL,L.playerRayLengthLR)){this.outHitL.collider.owner;this.Dead(this.outHitL.point)}else if(this.rayR||(this.rayR=new Laya.Ray(F.VecZero,new De(-1,0,0)),this.outHitR=new Laya.HitResult),this.rayR.origin=e,this._scene.physicsSimulation.rayCast(this.rayR,this.outHitR,L.playerRayLengthLR)){this.outHitR.collider.owner;this.Dead(this.outHitR.point)}else;}createApes(){this.ape1=new ze,this.ape2=new ze,this.ape1.loadImage("res/apes/monkey2.png"),this.ape2.loadImage("res/apes/monkey2.png"),this.ape1.pivot(55,72),this.ape2.pivot(55,72),this.ape1.pos(Laya.stage.width/2,Laya.stage.height/2),this.ape2.pos(200,0),Laya.stage.addChild(this.ape1),this.ape1.addChild(this.ape2),Laya.timer.frameLoop(1,this,this.animate)}animate(e){this.ape1.rotation+=2,this.ape2.rotation-=4}Move(){if(this.isreturn)return void this.RayReset();let e=this.tarTra.position.clone();De.subtract(e,this.tran.position,this.forW),De.normalize(this.forW,this.forW),this.forW=new De(this.forW.x*this.speed,this.forW.y*this.speed,this.forW.z*this.speed),this.tran.translate(this.forW,!1),De.distance(this.tran.position,e)<.1?this.ArriveTarPos():(Ne.lookAt(e,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),Ne.slerp(this.tran.rotation,this.quaternion1,.1,this.quaternion1),this.tran.rotation=this.quaternion1.clone())}AnimatorPlayByType(e,t,i){this.animator.play(e),t||(t=1),this.animator.speed=t}ShootFunc(){a.on(n.Event.StopShot,this,this.StopCreate)}LoopCreate(){if(this.isStop)return Laya.timer.clear(this,this.LoopCreate),void(this.isClickCom=!0);this._CreateShoot()}CreateShoot(){this.isStop=!1,this.isClickCom&&(this.isClickCom=!1,this._CreateShoot(),Laya.timer.loop(2*v.bulletTime*1e3,this,this.LoopCreate))}_CreateShoot(){let e=H.Instance.GetModel(H.modeltype.PlayerShoot);if(e){ot.Instance.bulletCon.addChild(e),e.transform.position=this.bulletPos.position.clone(),e.transform.localRotationEuler=this.bulletPos.rotationEuler.clone();let t=e.getComponent(Ee);t||(t=e.addComponent(Ee)),t.Start(this.bulletPos,this.isover)}}StopCreate(){this.isStop=!0}Dead(e){this.dataPar&&(this.dataPar.ishave=!1),ne.Instance.BloodEffect(e),Oe.Instance.RemoveModelToDic(this.selfobj),this.Recover(),et.Instance.CheckGameOver()}SetPar(){let e=this.tran.position.clone();et.Instance.playerContainer.addChild(this.selfobj),this.tran.position=e.clone()}TiaoWu(e){this.AnimatorPlayByType(W.RunAndGun,2),this.danceP=e.position.clone(),this.r=e.rotationEuler.clone(),Laya.timer.frameLoop(1,this,this._TiaoWu)}_TiaoWu(){if(De.subtract(this.danceP,this.tran.position,this.forW),De.normalize(this.forW,this.forW),this.forW=new De(.15*this.forW.x,.15*this.forW.y,.15*this.forW.z),this.tran.translate(this.forW),De.distance(this.tran.position,this.danceP)<.15)return Laya.timer.clear(this,this._TiaoWu),this.tran.position=this.danceP.clone(),this.tran.rotationEuler=this.r.clone(),void this.AnimatorPlayByType(W.Dance,1);Ne.lookAt(this.danceP,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}onAssetsLoaded(){this.ape=new ze,Laya.stage.addChild(this.ape),this.ape.pivot(55,72),this.ape.pos(Laya.stage.width/2,Laya.stage.height/2)}Attack(){Laya.timer.clear(this,this._Defense),this.isover=!0,this.isFristShoot=!0,this.enemyTar=null,Laya.timer.frameLoop(1,this,this._attack)}_attack(){if(null==this.enemyTar)this.enemyTar=Re.Instance.GetOpponent(),null!=this.enemyTar&&(this.ATKp=this.enemyTar.transform.position.clone(),Ne.lookAt(this.ATKp,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone());else{if(this.enemyTar.active||(this.enemyTar=Re.Instance.GetOpponent(),null!=this.enemyTar&&(this.ATKp=this.enemyTar.transform.position.clone(),Ne.lookAt(this.ATKp,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone())),null==this.enemyTar)return this.StopCreate(),void(this.isFristShoot=!0);this.isFristShoot&&(this.isFristShoot=!1,this.CreateShoot()),this.ATKp=this.enemyTar.transform.position.clone(),Ne.lookAt(this.ATKp,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}}_Defense(){if(De.subtract(this.tp,this.tran.position,this.forW),De.normalize(this.forW,this.forW),this.forW=new De(.15*this.forW.x,.15*this.forW.y,.15*this.forW.z),this.tran.translate(this.forW,!1),De.distance(this.tran.position,this.tp)<.1){Laya.timer.clear(this,this._Defense);let e=Laya.Tween.to(this.tran,{localRotationEulerY:0},100,Laya.Ease.quintIn,Laya.Handler.create(this,()=>{e.clear()},null,!1))}else Ne.lookAt(this.tp,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}Defense(e){this.SetPar(),this.tp=e,Ne.lookAt(e,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone(),this.AnimatorPlayByType(W.CrouchFiring,1),Laya.timer.frameLoop(1,this,this._Defense)}Recover(){this.dataPar&&(this.dataPar.ishave=!1,this.dataPar=null),Oe.Instance.RecoverMateModel(this.selfobj),Oe.Instance.RemoveModelToDic(this.selfobj),Laya.timer.clearAll(this),Laya.Tween.clearAll(this),a.off(n.Event.StopShot,this,this.StopCreate),H.Instance.RecoverModel(this.selfobj)}}var He=Laya.Rectangle;class Oe{constructor(){this.ApePath="res/apes/monkey2.png",this.v3=F.VecZero,this.friendDic=new i,this.getDic=new i}static get Instance(){return this.instance||(this.instance=new Oe)}Trial(){for(let e=0;e<3;e++)Laya.timer.frameOnce(e,this,this._createtrialmodel,null,!1)}TrialModelPlayAni(){for(const e in this.friendDic.container){const t=this.friendDic.get(e);t.CreateShoot(),t.AnimatorPlayByType(W.RunAndGun,2)}}RecoverMateModel(e){this.friendDic.delete(e.id)}AddModelToDic(e,t){this.getDic.set(e,t)}RemoveModelToDic(e){this.getDic.delete(e.id)}MadeMate(e){let t=H.Instance.GetModel(H.modeltype.Player+v.Instance.equipId);if(t){t.transform.position=e.position.clone(),t.transform.rotationEuler=e.rotationEuler.clone(),et.Instance.playerContainer.addChild(t);let i=t.getComponent(Ue);return i||(i=t.addComponent(Ue)),i.SetTar(),this.friendDic.set(t.id,i),i}return null}showDragRegion(){this.dragRegion=new He(Laya.stage.width-350>>1,Laya.stage.height-200>>1,350,200),Laya.stage.graphics.drawRect(this.dragRegion.x,this.dragRegion.y,this.dragRegion.width,this.dragRegion.height,null,"#FFFFFF",2)}onStartDrag(e){this.ape.startDrag(this.dragRegion,!0,100)}NearDestination(){return this.getDic.size}Near(e,t){if(1==e){for(const e in this.getDic.container){const t=this.getDic.get(e);this.v3.x=0,t.Defense(this.v3.clone())}return}let i=2*L.arriveStandWidth/(e-1),a=0;this.v3.z=t;for(const e in this.getDic.container){const t=this.getDic.get(e);this.v3.x=L.arriveStandWidth-a*i,t.Defense(this.v3.clone()),a++}}Attack(){for(const e in this.getDic.container){this.getDic.get(e).Attack()}}GetSprite(){let e=this.getDic.size,i=t.randomInt(1,e),a=1;for(const e in this.getDic.container){if(a==i){return this.getDic.get(e).selfobj}a++}return null}TiaoWu(){for(const e in this.getDic.container){let t=je.Instance.GetWuDaoPosition();if(!t)return;this.getDic.get(e).TiaoWu(t)}}Reset(){let e=[];for(const t in this.friendDic.container)e.push(t);if(e.length>0)for(let t=0;tthis.PlayerDancePoint.numChildren-1)return null;let e=this.PlayerDancePoint.getChildAt(this.danceindex).transform;return this.danceindex++,e}}var qe=Laya.Vector3,Xe=Laya.Quaternion,Ye=Laya.Sprite;class Ze extends Laya.Script3D{constructor(){super(...arguments),this.isarrive=!1,this.isdead=!1,this.isFristShoot=!0,this._up=new qe(0,1,0),this.ts=new qe(0,0,.01)}onAwake(){this.selfobj=this.owner,this._transform=this.selfobj.transform,this.body=this.selfobj.getChildAt(0),this.animator=this.body.getComponent(Laya.Animator),this.rayPoint=this.selfobj.getChildByName("rayPoint").transform,this.shootPos=this.selfobj.getChildByName("bulletPos").transform,this._speed=F.VecZero,this._speed.z=L.playerspeed,this.forW=F.VecZero,this.quaternion1=new Xe}Move(){if(this.isarrive){if(this.isdead)return;return void this.RayReset()}this._transform.translate(this._speed);let e=this._transform.localPositionZ;J.Instance.CheckMainRolePos(e),je.Instance.CheckPlayerRoadPos(e),xe.Instance.CheckPlayerRoadPos(e),q.Instance.CameraFollow(e),this.isdead||this.RayReset()}Near(){this.isarrive=!0}Start(){this.isdead=!1,this.isarrive=!1,Laya.timer.frameLoop(1,this,this.Move)}drawPentagram(){var e=new Ye;Laya.stage.addChild(e);var t=[];t.push(0,-130),t.push(33,-33),t.push(137,-30),t.push(55,32),t.push(85,130),t.push(0,73),t.push(-85,130),t.push(-55,32),t.push(-137,-30),t.push(-33,-33),e.graphics.drawPoly(Laya.stage.width/2,Laya.stage.height/2,t,"#FF7F50")}PlayAni(e,t,i){this.animator.play(e),t||(t=1),this.animator.speed=t}Slider(e){this._transform.localPositionX+=e;let t=this._transform.localPositionX;Math.abs(t)>L.playerMoveMaxX&&(this._transform.localPositionX=t>0?L.playerMoveMaxX:-L.playerMoveMaxX)}CreateBullet(){return this.isdead?null:this.shootPos}Dead(e){this.isdead=!0,this.body.active=!1,ne.Instance.BloodEffect(e),et.Instance.CheckGameOver(!0)}Reset(){this.body.active=!0,this.PlayAni(W.Idle,1),Laya.timer.clearAll(this)}RayReset(){let e=this.rayPoint.position;if(this._scene||(this._scene=ot.Instance.MainScene),this.rayF||(this.rayF=new Laya.Ray(F.VecZero,new qe(0,0,1)),this.outHitF=new Laya.HitResult),this.rayF.origin=e,this._scene.physicsSimulation.rayCast(this.rayF,this.outHitF,L.playerRayLengthF)){this.outHitF.collider.owner;this.Dead(this.outHitF.point)}else if(this.rayL||(this.rayL=new Laya.Ray(F.VecZero,new qe(1,0,0)),this.outHitL=new Laya.HitResult),this.rayL.origin=e,this._scene.physicsSimulation.rayCast(this.rayL,this.outHitL,L.playerRayLengthLR)){this.outHitL.collider.owner;this.Dead(this.outHitL.point)}else if(this.rayR||(this.rayR=new Laya.Ray(F.VecZero,new qe(-1,0,0)),this.outHitR=new Laya.HitResult),this.rayR.origin=e,this._scene.physicsSimulation.rayCast(this.rayR,this.outHitR,L.playerRayLengthLR)){this.outHitR.collider.owner;this.Dead(this.outHitR.point)}else;}setup(){var e=new Ye;e.loadImage("res/bg2.png"),Laya.stage.addChild(e),this.bg2=new Ye,this.bg2.loadImage("res/bg2.png"),Laya.stage.addChild(this.bg2),this.bg2.scale(3,3),this.maskSp=new Ye,this.maskSp.loadImage("res/mask.png"),this.maskSp.pivot(50,50),this.bg2.mask=this.maskSp}_attack(){if(!this.isdead)if(null==this.enemyTar)this.enemyTar=Re.Instance.GetOpponent(),null!=this.enemyTar&&(this.tp=this.enemyTar.transform.position.clone(),Xe.lookAt(this.tp,this._transform.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this._transform.rotation=this.quaternion1.clone());else{if(this.enemyTar.active||(this.enemyTar=Re.Instance.GetOpponent(),null!=this.enemyTar&&(this.tp=this.enemyTar.transform.position.clone(),Xe.lookAt(this.tp,this._transform.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this._transform.rotation=this.quaternion1.clone())),null==this.enemyTar)return et.Instance.CreateOver(!0),void(this.isFristShoot=!0);this.isFristShoot&&(this.isFristShoot=!1,et.Instance.CreateShoot(!0)),this.tp=this.enemyTar.transform.position.clone(),Xe.lookAt(this.tp,this._transform.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this._transform.rotation=this.quaternion1.clone()}}TiaoWu(e){this.PlayAni(W.RunAndGun,2),this.dancepos=e.position.clone(),this.r=e.rotationEuler.clone(),Laya.timer.frameLoop(1,this,this.PlayWuDao)}PlayWuDao(){if(qe.subtract(this.dancepos,this._transform.position,this.forW),qe.normalize(this.forW,this.forW),this.forW=new qe(.15*this.forW.x,.15*this.forW.y,.15*this.forW.z),this._transform.translate(this.forW),qe.distance(this._transform.position,this.dancepos)<.15)return Laya.timer.clear(this,this.PlayWuDao),this._transform.position=this.dancepos.clone(),this._transform.rotationEuler=this.r.clone(),void this.PlayAni(W.Dance,1);Xe.lookAt(this.dancepos,this._transform.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this._transform.rotation=this.quaternion1.clone()}Defense(e){this.isdead||(this.tp=e,Xe.lookAt(e,this._transform.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this._transform.rotation=this.quaternion1.clone(),this.PlayAni(W.CrouchFiring,1),Laya.timer.frameLoop(1,this,this._Defense))}_Defense(){qe.subtract(this.tp,this._transform.position,this.forW),qe.normalize(this.forW,this.forW),this.forW=new qe(.15*this.forW.x,.15*this.forW.y,.15*this.forW.z),this._transform.translate(this.forW),qe.distance(this._transform.position,this.tp)<.1?Laya.timer.clear(this,this._Defense):(Xe.lookAt(this.tp,this._transform.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this._transform.rotation=this.quaternion1.clone())}Attack(){Laya.timer.clear(this,this._Defense),this.isFristShoot=!0,this.enemyTar=null,Laya.timer.frameLoop(1,this,this._attack)}}var Je=Laya.Vector3,Ke=Laya.Text,$e=Laya.HScrollBar,Qe=Laya.VScrollBar;class et{constructor(){this.isover=!1,this.isClickCom=!0,this.isend=!0}static get Instance(){return this.instance||(this.instance=new et)}Init(e,t){this.playerStartTra=e.transform,this.playerContainer=t}ChangeModel(){this.player&&H.Instance.RecoverModel(this.player);let e=H.Instance.GetModel(H.modeltype.Player+v.Instance.equipId);if(e){this.player=e,this.SetMatePos(e),this.playerTra=this.player.transform,this.playerTra.position=this.playerStartTra.position.clone(),this.playerTra.rotationEuler=this.playerStartTra.rotationEuler.clone(),this.playerContainer.addChild(this.player);let t=this.player.getComponent(Ze);this.playerScript=t||this.player.addComponent(Ze)}}SetMatePos(e){this.MateArrPosition=[];let t=e.getChildByName("FriendSpawPos");t||console.error("friend父物体不存在");for(let e=0;e{this.startShake=!1,this.selfObj.transform.position=this.camPOS}))}animate(){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)}MoveGame(e){this.canmovegame&&(this.temp.z=e-this.dis.z,this._tran.localPositionZ=this.temp.z)}}var nt=Laya.Sprite,st=Laya.BlurFilter;class ot{constructor(){this.apePath="res/apes/monkey2.png"}static get Instance(){return ot.instance||(ot.instance=new ot)}InitGame(){Laya.timer.frameOnce(10,this,()=>{et.Instance.MadePlayer(),this.InItScene()})}Init(e){if(!e)return void console.error("场景不存在");let t;if(this.MainScene=e,Laya.stage.addChild(e),!(t=this.MainScene.getChildByName("scene")))return void console.error("场景资源配置错误!");this.MainCamera=this.MainScene.getChildByName("Main Camera"),this.MainCamera.enableHDR=!1,this.bulletCon=t.getChildByName("bulletContainer"),this.effectCon=t.getChildByName("effectPos"),this.SetSceneMaterial();let i=t.getChildByName("buildings");J.Instance.Init(i);let a=t.getChildByName("playerstartPoint"),n=t.getChildByName("playerContainer");et.Instance.Init(a,n);let o=t.getChildByName("BlockContainer");xe.Instance.Init(o);let r=t.getChildByName("towerContainer");te.Instance.Init(r);let h,l=t.getChildByName("startCamPos"),c=t.getChildByName("startXCamPos");h=s.isX?c:l,q.Instance.Init(this.MainCamera,h);let d=t.getChildByName("finalPos");je.Instance.Init(d),this.InitGame()}createApe(){var e=new nt;e.loadImage(this.apePath),e.x=(Laya.stage.width-e.width)/2,e.y=(Laya.stage.height-e.height)/2,Laya.stage.addChild(e),this.applayFilter(e)}applayFilter(e){var t=new st;t.strength=5,e.filters=[t]}SetSceneMaterial(){this.MainCamera.clearFlag=Laya.BaseCamera.CLEARFLAG_SKY;let e=this.MainScene.skyRenderer;e.mesh=Laya.SkyDome.instance;let t=new Laya.SkyProceduralMaterial;e.material=t,t.sunDisk=Laya.SkyProceduralMaterial.SUN_NODE,t.skyTint=new Laya.Vector4(1,.74,.74,1)}InItScene(){Q.Instance.SetLevel(),je.Instance.SetAir(),J.Instance.SetConstruct(),q.Instance.SetCameraAction(tt.game,1),et.Instance.SetPlayerPosition()}}var rt=Laya.Sprite,ht=Laya.GlowFilter;class lt{constructor(){this.cloth=[],this.apePath="res/apes/monkey2.png"}static get Instance(){return this.instance||(this.instance=new lt)}static LoadResource(e,t){Laya.loader.retryNum=2,Laya.loader.maxLoader=3,Laya.loader.retryDelay=100,Laya.loader.create(e,new Laya.Handler(this,t)),Laya.loader.on(Laya.Event.ERROR,this,e=>{console.log(e+" 资源加载失败")})}InitAsset(){g.Player.forEach(e=>{let t=Laya.loader.getRes(e);Laya.loader.clearRes(e),this.LoadPoolRes(t.name,t)}),g.Particle.forEach(e=>{let t=Laya.loader.getRes(e);Laya.loader.clearRes(e),this.LoadPoolRes(t.name,t)});let e=Laya.loader.getRes(g.Enemy);Laya.loader.clearRes(g.Enemy),this.LoadPoolRes(e.name,e);let t=Laya.loader.getRes(g.PlayerShot);Laya.loader.clearRes(g.PlayerShot),this.LoadPoolRes(t.name,t);let i=Laya.loader.getRes(g.Mound);Laya.loader.clearRes(g.Mound),this.LoadPoolRes(i.name,i);let a=Laya.loader.getRes(g.MainScene);Laya.loader.clearRes(g.MainScene),g.Barrier.forEach(e=>{let t=Laya.loader.getRes(e);Laya.loader.clearRes(e),this.LoadPoolRes(t.name,t)}),ot.Instance.Init(a)}LoadPoolRes(e,t){H.Instance.InitSelf(e,t)}setup(){this.createApe(),this.applayFilter()}createApe(){this.ape=new rt,this.ape.loadImage(this.apePath);var e=Laya.loader.getRes(this.apePath);this.ape.x=(Laya.stage.width-e.width)/2,this.ape.y=(Laya.stage.height-e.height)/2,Laya.stage.addChild(this.ape)}applayFilter(){var e=new ht("#ffff00",10,0,0);this.ape.filters=[e]}Load(e){let t=[g.MainScene,g.Enemy,g.PlayerShot,g.Mound].concat(g.Player).concat(g.Barrier).concat(g.Particle);lt.LoadResource(t,()=>{this.InitAsset(),e&&e()})}}var ct=Laya.Tween;class dt extends ue.LoadViewUI{constructor(){super(),this.proCom=!1,this.a=new Laya.Vector3,this.loadResCom=!1,this.loginCom=!1,this.errorTime=0,this.timers=0,this.subLoadCom=!1,dt.instance=this,a.on(Laya.Event.RESIZE,this,this.Resize)}static get Instance(){return dt.instance}Resize(){this.height=Laya.stage.height}OnShow(e){this.proTex.text="0%",this.pro1.width=0,this.RefreshUI(),this.LoginGame(),this.LoadSubpackage(),Laya.timer.frameOnce(5,this,()=>{this.Resize()}),N.AldEvent("进入加载加载界面!")}RefreshData(){this.proLen=this.pro.width}RegButton(){}RefreshUI(){ct.to(this.a,{x:1,update:new Laya.Handler(this,()=>{var e=this.a.x;this.pro1.width=this.proLen*e,e*=100,this.proTex.text=Math.ceil(e)+"%"})},1500,Laya.Ease.quadInOut,new Laya.Handler(this,()=>{this.proTex.text="100%",this.pro1.width=this.proLen,this.proCom=!0,this.AllCom()}))}LoadRes(){this.subLoadCom&&this.loginCom&<.Instance.Load(()=>{N.AldEvent("资源加载成功"),this.loadResCom=!0,this.AllCom()})}LoginGame(){s.isWx?N.Login(e=>{this.onWxLoginHandler(e)}):this.LocalLogin()}onWxLoginHandler(e){if(console.log("微信回调成功!"),console.log(e),"error"==e||null==e.code){if(0==this.errorTime&&N.AldEvent("微信登录失败"),this.errorTime++,this.errorTime>=3)return;N.Login(e=>{this.onWxLoginHandler(e)})}else{0==this.errorTime&&N.AldEvent("微信登录成功!");let i=N.SystemInfo(),a="ipx";if(null!=i){var t=i.model;a=`${i.brand}_${t}_${i.system}_wx${i.version}_SDKVer${i.SDKVersion}`,console.log("platformModel:"+a)}new D(e.code,e.nickName,e.avatarUrl,e.gender,e.country,e.province,e.city,a,N.ShareId,N.Chanel),this.LocalLogin()}}LocalLogin(){T.Instance.login(null,e=>{this.OnLoginComplete(e)},e=>{this.OnLoginError(e)})}OnLoginComplete(e){if("0"!=e.code){if(console.log("登录异常错误!"),N.AldEvent("本地登录成功!"),this.timers++,this.timers>=4)return;s.isWx?N.Login(e=>{this.onWxLoginHandler(e)}):this.LocalLogin()}else this.loginCom=!0,this.LoadRes(),bt.InitSdk(),this.AllCom()}OnLoginError(e){console.log("登录错误"),N.AldEvent("本地登陆失败")}LoadSubpackage(){N.LoadSubPackage("subpackage",e=>{e&&(console.log("subpackage com++++++++++++++++"),dt.instance.subLoadCom=!0,dt.instance.LoadRes())})}AllCom(){this.proCom&&this.loadResCom&&this.loginCom&&(Be.InitVideo(),Laya.timer.once(1e3,this,()=>{N.AldEvent("进入主界面"),kt.Instance.OpenView(wt.MainView),le.Instance.InitMouseEvent(),l.OnShowHandle(),h.Instance.Init(),c.Reg(),h.Instance._playMusic()}))}OnClose(){dt.instance=null,a.off(Laya.Event.RESIZE,this,this.Resize)}}class pt extends ue.MainViewUI{constructor(){super(),this.isTryed=!1,pt.instance=this,this.Resize(),a.on(Laya.Event.RESIZE,this,this.Resize)}static get Instance(){return pt.instance}OnShow(e){this.RefreshData(),this.RegButton(),this.RefreshUI(),this.SetData(),this.SetTopAd(),we.Instance.RequireGuide()&&(this.mainBox.visible=!1)}RefreshUI(){this.user_id.text="user_id:"+D.Instance.CurModel.m_userid,this.SetPlayerGrade(D.Instance.CurModel.GetUserAttr(P.money)),this.SetStage(),this.SetStagePro(0),this.SetSettingBox(!1)}RefreshData(){this.GetImage(),this.coinFollow=new O(.1,0,0,.1),this.proWidth=this.pro.width,this.isTryed=!1}AdaptiveUI(){}moreFunc(e){e||console.log("mainui")}RegButton(){this.on(Laya.Event.MOUSE_DOWN,this,this.StartGame),this.settingBtn.CZ=(()=>{this.SetSettingBox()}),this.skinBtn.CZ=(()=>{kt.Instance.AddView(wt.SKinShopView)}),this.updateBtn.CZ=(()=>{kt.Instance.AddView(wt.IntensifyView)}),a.on(n.Event.ShowMainUi,this,this.ShowMainBox),a.on(n.Event.SetMonery,this,this.SetPlayerGrade),a.on(n.Event.SetStage,this,this.SetStage),a.on(n.Event.SetStagePro,this,this.SetStagePro),this.sound_btn.clickHandler=new Laya.Handler(this,()=>{this.ClickSound()}),this.shake_btn.clickHandler=new Laya.Handler(this,()=>{this.ClickShake()}),this.ExitBtn.clickHandler=new Laya.Handler(this,this.ClickExit),this.MoreGameBtn.clickHandler=new Laya.Handler(this,this.ClickExport),this.ExitBtn.visible=bt.iswhite}ClickExit(){kt.Instance.AddView(wt.ExitView)}ClickExport(){kt.Instance.AddView(wt.ExportView)}SetStage(){this.stageValue.text=v.Instance.stage.toString()}SetStagePro(e){e=e>=1?1:e,this.pro1.width=this.proWidth*e}SetPlayerGrade(e){this.tempTarGrade=e,this.coinFollow.target=e,Laya.timer.frameLoop(1,this,this.T2)}T2(){this.coinFollow.update();let e=Math.ceil(this.coinFollow.follow);this.countValue.text=e.toString(),e>=this.tempTarGrade&&(this.countValue.text=this.tempTarGrade.toString(),Laya.timer.clear(this,this.T2))}StartGame(e){if(this.isTryed)return void this.TryStartGame();if(e.target instanceof Laya.UIComponent&&"mainBox"!=e.target.name)return;console.log("click");let t=[{t:D.Instance.CurModel.ServerTime}];T.Instance.HttpPostRequest(B.protocols.Start,t,e=>{e.play_id&&(v.Instance.Play_Id=e.play_id),N.Start(v.Instance.stage.toString()),v.Instance.stage>=3?kt.Instance.AddView(wt.TrialView):this.MainStartGame()},e=>{})}MainStartGame(){Te.GameNum++,this.mainBox.visible=!1,this.sliderBox.visible=!1,this.off(Laya.Event.MOUSE_DOWN,this,this.StartGame),this.gameStart.stop(),Te.Instance.Start(),le.Instance.StartGameClick(),et.Instance.Start(),Oe.Instance.TrialModelPlayAni(),xe.Instance.SetBlock(),we.Instance.GuideOn()}TryStartGame(){Te.GameNum++,this.sliderBox.visible=!1,this.gameStart.stop(),this.off(Laya.Event.MOUSE_DOWN,this,this.StartGame),Te.Instance.Start(),le.Instance.StartGameClick(),et.Instance.Start(),Oe.Instance.TrialModelPlayAni(),xe.Instance.SetBlock()}TryClick(){this.isTryed=!0,this.mainBox.visible=!1}ShowMainBox(){this.mainBox.visible=!0,this.sliderBox.visible=!0,this.gameStart.play(0,!0),this.SetPlayerGrade(D.Instance.CurModel.GetUserAttr(P.money)),this.isTryed=!1,this.on(Laya.Event.MOUSE_DOWN,this,this.StartGame)}SetSettingBox(e=!0){this.settingBox.visible=!!e&&!this.settingBox.visible}GetImage(){this.sound_open=this.sound_btn.getChildByName("kai"),this.sound_guan=this.sound_btn.getChildByName("guan"),this.shake_open=this.shake_btn.getChildByName("kai"),this.shake_guan=this.shake_btn.getChildByName("guan"),this.ShowSound(h.Instance.sound),this.ShowShake(h.Instance.vibrate)}ClickSound(){h.Instance.sound=!h.Instance.sound,this.ShowSound(h.Instance.sound)}ShowSound(e){e?(this.sound_open.visible=!0,this.sound_guan.visible=!1,h.Instance.SettingSound(1),Laya.LocalStorage.setItem("sound","1"),console.log("开启声音")):(this.sound_open.visible=!1,this.sound_guan.visible=!0,h.Instance.SettingSound(0),Laya.LocalStorage.setItem("sound","0"),console.log("关闭声音"))}ClickShake(){h.Instance.vibrate=!h.Instance.vibrate,this.ShowShake(h.Instance.vibrate)}ShowShake(e){e?(this.shake_open.visible=!0,this.shake_guan.visible=!1,Laya.LocalStorage.setItem("vibrate","1"),console.log("开启震动")):(this.shake_open.visible=!1,this.shake_guan.visible=!0,Laya.LocalStorage.setItem("vibrate","0"),console.log("关闭震动"))}OnClose(){this.off(Laya.Event.MOUSE_DOWN,this,this.StartGame),a.off(Laya.Event.RESIZE,this,this.Resize),a.off(n.Event.ShowMainUi,this,this.ShowMainBox),a.off(n.Event.SetMonery,this,this.SetPlayerGrade),a.off(n.Event.SetStage,this,this.SetStage),a.off(n.Event.SetStagePro,this,this.SetStagePro),pt.instance=null,Laya.timer.clearAll(this)}Resize(){this.height=Laya.stage.height}SetData(){bt.SetHuTuiList(this.BottomList,2,""),this.GunGun()}GunGun(){var e;try{this.BottomList.scrollBar.value=0,e=this.BottomList.scrollBar.max}catch(e){return void console.error(e)}var t=1;Laya.timer.frameLoop(1,this,()=>{this.BottomList.scrollBar.value+=t,(this.BottomList.scrollBar.value>=e||this.BottomList.scrollBar.value<=0)&&(t=-t)})}SetTopAd(){Laya.Browser.onPC||(this.topAdData=bt.pushData||[],this.LeftPushIcon.visible=this.RightPushIcon.visible=this.topAdData.length>=2,this.topAdData.length<2||(this.topLeftAdIndex={index:0},this.topRightAdIndex={index:1},this._setTopAd(this.LeftPushIcon,this.topLeftAdIndex),this._setTopAd(this.RightPushIcon,this.topRightAdIndex)))}_setTopAd(e,t){let i=e.getChildByName("icon"),a=e.getChildByName("name");e.clickHandler=new Laya.Handler(this,()=>{bt.ShowHuTuiJump(this.topAdData[t.index])}),this._setIcon(i,a,t),Laya.timer.loop(3e3,this,()=>{this._setIcon(i,a,t),this.lefticon.play(null,!1),this.righticon.play(null,!1)})}_setIcon(e,t,i){i.index=(i.index+2)%this.topAdData.length,e.skin=this.topAdData[i.index].icon,t.text=this.topAdData[i.index].togame_name}}class ut extends ue.CompleteViewUI{constructor(){super(),this.isWin=!1,ut.instance=this,this.Resize(),a.on(Laya.Event.RESIZE,this,this.Resize)}static get Instance(){return ut.instance}OnShow(e){this.isWin=e,this.RefreshData(),this.RegButton(),this.RefreshUI(),this.SetTopAd(),Be.CheatBanner(this.winbtnBox)}Resize(){this.height=Laya.stage.height}RefreshData(){this.coinValue=1==this.isWin?Q.Instance._level.gold:Q.Instance._level.fail_gold,this.tes1=this.coinValue,this.coinValue+=v.tower_reward*Te.Instance.towerCount+v.enemy_reward*Te.Instance.roleCount+v.block_reward*Te.Instance.blockCount;let e=1==this.isWin?1:0,t=this.coinValue,i=[{t:D.Instance.CurModel.ServerTime},{play_id:v.Instance.Play_Id},{win:e},{money:t}];T.Instance.HttpPostRequest(B.protocols.GameResult,i,e=>{},e=>{kt.Instance.ShowTips("结算失败")}),this.isWin?(h.Instance.PlaySound(o.win),N.Success(v.Instance.stage.toString())):(h.Instance.PlaySound(o.defeat),N.Fail(v.Instance.stage.toString()))}RegButton(){this.doublegetBtn.CZ=(()=>{this.DoubleGet()}),this.nextBtn.CZ=(()=>{this.isWin?this.Next():this.Resset()})}Next(){Te.Instance.LevelUp()}Resset(){kt.Instance.CloseView(wt.CompleteView),Te.Instance.ReStart()}OnClose(){a.off(Laya.Event.RESIZE,this,this.Resize),ut.instance=null,Laya.timer.clearAll(this),1==Te.GameNum?(kt.Instance.AddView(wt.AttributeUpView),kt.Instance.AddView(wt.ExportView)):(kt.Instance.AddView(wt.IntensifyView),kt.Instance.AddView(wt.ExportView)),Be.Clear()}RefreshUI(){this.winTop.visible=this.isWin,this.shibaiTop.visible=!this.isWin,this.valueText.text="+"+this.coinValue,this.towerCount.text="X"+Te.Instance.towerCount.toString(),this.towerValue.text=(v.tower_reward*Te.Instance.towerCount).toString(),this.roleCount.text="X"+Te.Instance.roleCount.toString(),this.roleValue.text=(v.enemy_reward*Te.Instance.roleCount).toString(),this.blockCount.text="X"+Te.Instance.blockCount.toString(),this.blockValue.text=(v.block_reward*Te.Instance.blockCount).toString()}DoubleGet(){Be.ShowVideo(e=>{if(e){N.AldEvent("结束界面看视屏获得钱");var t=[{t:D.Instance.CurModel.ServerTime.toString()},{reward_item:"1000"},{reward_num:(2*this.coinValue).toString()}];T.Instance.HttpPostRequest(B.protocols.Fissionvd,t,e=>{kt.Instance.ShowTips("金币:X"+3*this.coinValue),this.Next()},e=>{})}})}SetTopAd(){Laya.Browser.onPC||(this.topAdData=bt.pushData||[],this.topAdData.length<4||(this.topLeftAdIndex={index:0},this.topRightAdIndex={index:1},this.bottomleftAdIndex={index:2},this.bottomRightAdIndex={index:3},this._setTopAd(this.LeftTopPushIcon,this.topLeftAdIndex),this._setTopAd(this.LeftBottomPushIcon,this.bottomleftAdIndex),this._setTopAd(this.RightTopPushIcon,this.topRightAdIndex),this._setTopAd(this.RightBottomPushIcon,this.bottomRightAdIndex)))}_setTopAd(e,t){let i=e.getChildByName("icon"),a=e.getChildByName("name");e.clickHandler=new Laya.Handler(this,()=>{bt.ShowHuTuiJump(this.topAdData[t.index])}),this._setIcon(i,a,t),Laya.timer.loop(3e3,this,()=>{this._setIcon(i,a,t),this.pushshake.play(null,!1)})}_setIcon(e,t,i){i.index=(i.index+4)%this.topAdData.length,e.skin=this.topAdData[i.index].icon,t.text=this.topAdData[i.index].togame_name}}class gt extends ue.InGameViewUI{static get Instance(){return gt.instance}constructor(){super(),gt.instance=this,this.Resize(),a.on(Laya.Event.RESIZE,this,this.Resize)}OnShow(e){this.RefreshData(),this.RegButton(),this.RefreshUI()}Resize(){this.height=Laya.stage.height}RefreshData(){}RegButton(){}RefreshUI(){}OnClose(){a.off(Laya.Event.RESIZE,this,this.Resize),gt.instance=null,Laya.timer.clearAll(this)}}class yt extends ue.IntensifyViewUI{constructor(){super(),this.iscoinShowfreecoinbtn=!1,this.Resize(),a.on(Laya.Event.RESIZE,this,this.Resize)}OnShow(e){this.RefreshData(),this.RegButton(),this.RefreshUI(),Be.CheatBanner(null)}RefreshUI(){this.InitUi(),this.RefreshCoinShow();let e=this.cost1{kt.Instance.CloseView(wt.IntensifyView)}),this.atkupBtn.clickHandler=new Laya.Handler(this,this.AtkUp),this.rateupBtn.clickHandler=new Laya.Handler(this,this.RateUp),this.getcoinBtn.clickHandler=new Laya.Handler(this,this.GetCoin)}AtkUp(){D.Instance.CurModel.GetUserAttr(P.money){e&&(N.AldEvent("升级界面花钱升级攻击力"),this.tempPowerLevel++,this.InitUi(),a.event(n.Event.SetMonery,D.Instance.CurModel.GetUserAttr(P.money)))})}RateUp(){D.Instance.CurModel.GetUserAttr(P.money){e&&(N.AldEvent("升级界面花钱升级速度"),this.tempRateLevel++,this.InitUi(),a.event(n.Event.SetMonery,D.Instance.CurModel.GetUserAttr(P.money)))})}GetCoin(){Be.ShowVideo(e=>{if(e){var t=[{t:D.Instance.CurModel.ServerTime.toString()},{reward_item:"1000"},{reward_num:this.freecoinValue.toString()},{channel:"video:freecoin"}];T.Instance.HttpPostRequest(B.protocols.Fissionvd,t,e=>{N.AldEvent("升级界面看视屏获得钱"),a.event(n.Event.SetMonery,D.Instance.CurModel.GetUserAttr(P.money)),this.RefreshData(),this.RefreshCoinShow()},e=>{})}})}RefreshCoinShow(){this.iscoinShowfreecoinbtn?(this.getcoinBtn.gray=!1,this.getcoinBtn.mouseEnabled=!0):(this.getcoinBtn.gray=!0,this.getcoinBtn.mouseEnabled=!1)}InitUi(){this.atkLv.text="LV"+this.tempPowerLevel;let e=u.Instance._atk.length,t=this.tempPowerLevel>e?e:this.tempPowerLevel;this.cost1=u.Instance.GetAtk(t).cost,this.atkValue.text=this.cost1.toString(),this.rateLv.text="LV"+this.tempRateLevel;let i=u.Instance._rate.length,a=this.tempRateLevel>i?i:this.tempRateLevel;this.cost2=u.Instance.GetRate(a).cost,this.rateValue.text=this.cost2.toString(),D.Instance.CurModel.GetUserAttr(P.money)e?e:this.tempPowerLevel;this.cost1=u.Instance.GetAtk(t).cost,this.atkValue.text=this.cost1.toString(),this.rateLv.text="LV"+this.tempRateLevel;let i=u.Instance._rate.length,a=this.tempRateLevel>i?i:this.tempRateLevel;this.cost2=u.Instance.GetRate(a).cost,this.rateValue.text=this.cost2.toString(),D.Instance.CurModel.GetUserAttr(P.money){this.BackClickHandler()}),this.atkBtn.clickHandler=new Laya.Handler(this,this.AtkBtnHandler),this.rateBtn.clickHandler=new Laya.Handler(this,this.RateBtnHandler)}AtkBtnHandler(){this.isatkvideo?Be.ShowVideo(e=>{e&&v.Instance.PowerUp(this.tempPowerLevel+1,"video:free",this.cost1,e=>{e&&(N.AldEvent("失败界面看视屏升级攻击力"),this.tempPowerLevel++,this.isfirstatkvideo=!1,this.SetUi(),a.event(n.Event.SetMonery,D.Instance.CurModel.GetUserAttr(P.money)))})}):v.Instance.PowerUp(this.tempPowerLevel+1,"money",this.cost1,e=>{e&&(N.AldEvent("失败界面花钱升级攻击力"),this.tempPowerLevel++,this.SetUi(),a.event(n.Event.SetMonery,D.Instance.CurModel.GetUserAttr(P.money)))})}RateBtnHandler(){this.isratevideo?Be.ShowVideo(e=>{e&&v.Instance.SpeedUp(this.tempRateLevel+1,"video:free",this.cost2,e=>{e&&(N.AldEvent("失败界面看视屏升级速度"),this.tempRateLevel++,this.isfirstratevideo=!1,this.SetUi())})}):v.Instance.SpeedUp(this.tempRateLevel+1,"money",this.cost2,e=>{e&&(N.AldEvent("失败界面花钱升级速度"),this.tempRateLevel++,this.SetUi())})}BackClickHandler(){kt.Instance.CloseView(wt.AttributeUpView),Te.Instance.ReStart()}OnClose(){a.off(Laya.Event.RESIZE,this,this.Resize),this.tempPowerLevel==v.Instance.powerLevel&&this.tempRateLevel==v.Instance.rateLevel||(v.Instance.SetInfo(),a.event(n.Event.SetMonery,D.Instance.CurModel.GetUserAttr(P.money))),Be.Clear()}Resize(){this.height=Laya.stage.height}InitPushData(){for(let e=0;e-1;i--)t<6&&e.push(bt.pushData[i]),t++;for(let t=0;t{e&&(N.AldEvent("商店中看视屏获得皮肤"),this.VideoGet())})}VideoGet(){var e=[{t:D.Instance.CurModel.ServerTime.toString()},{id:this.operateIndex},{channel:"video"}];T.Instance.HttpPostRequest(B.protocols.themefission,e,e=>{var t=D.Instance.CurModel;v.Instance.equipId=Number(t.GetUserAttr(P.equip_themes)[1]),this.RefreshBtnUi(this.operateIndex)},e=>{})}Buy(){var e=[{id:this.operateIndex}];T.Instance.HttpPostRequest(B.protocols.Buy,e,e=>{var t=D.Instance.CurModel;v.Instance.equipId=Number(t.GetUserAttr(P.equip_themes)[1]),a.event(n.Event.SetMonery,D.Instance.CurModel.GetUserAttr(P.money)),this.RefreshBtnUi(this.operateIndex)},e=>{})}Equip(){var e=[{id:this.operateIndex}];T.Instance.HttpPostRequest(B.protocols.Equip,e,e=>{var t=D.Instance.CurModel;v.Instance.equipId=Number(t.GetUserAttr(P.equip_themes)[1]),this.RefreshBtnUi(this.operateIndex)},e=>{})}RegButton(){this.CloseBtn.CZ=(()=>{this.ClickClose()}),this.leftBtn.clickHandler=Laya.Handler.create(this,()=>{1!=this.operateIndex&&(this.operateIndex--,this.SetBtnUi(this.operateIndex),this.RefreshBtnUi(this.operateIndex),It.Instance.CreatePlayer(this.operateIndex))},null,!1),this.rightBtn.clickHandler=Laya.Handler.create(this,()=>{8!=this.operateIndex&&(this.operateIndex++,this.SetBtnUi(this.operateIndex),this.RefreshBtnUi(this.operateIndex),It.Instance.CreatePlayer(this.operateIndex))},null,!1),this.use.CZ=(()=>{this.Equip()}),this.coin.CZ=(()=>{D.Instance.CurModel.GetUserAttr(P.money){this.ClickVideo()})}OnClose(){a.off(Laya.Event.RESIZE,this,this.Resize),vt.instance=null,N.AldEvent("关闭皮肤界面")}}class Lt extends ue.TrialViewUI{constructor(){super(),this.Resize(),a.on(Laya.Event.RESIZE,this,this.Resize)}OnShow(e){this.RegButton(),this.RefreshData(),this.RegButton(),this.RefreshUI(),Be.CheatBanner(this.btnBox)}RefreshUI(){It.Instance.InitDis(this.viewPort)}RefreshData(){}RegButton(){this.videoBtn.CZ=(()=>{this.VideoHandler()}),this.backBtn.CZ=(()=>{It.Instance.Reset(),this.BackUi()})}VideoHandler(){Be.ShowVideo(e=>{e&&(N.AldEvent("看视屏试用"),this.VideoCom())})}VideoCom(){It.Instance.Reset(),this.BackUi(),Oe.Instance.Trial()}BackUi(){kt.Instance.CloseView(wt.TrialView),pt.Instance&&pt.Instance.TryClick()}OnClose(){a.off(Laya.Event.RESIZE,this,this.Resize),Be.Clear()}Resize(){this.height=Laya.stage.height}}class xt extends ue.ShadeViewUI{constructor(){super(),this.Resize(),a.on(Laya.Event.RESIZE,this,this.Resize)}OnShow(e){this.RegButton()}RefreshUI(){}RefreshData(){}RegButton(){this.on(Laya.Event.CLICK,this,this.Test)}Test(){}OnClose(){a.off(Laya.Event.RESIZE,this,this.Resize),this.off(Laya.Event.CLICK,this,this.Test)}Resize(){this.height=Laya.stage.height}}class St extends ue.ExportViewUI{constructor(){super(...arguments),this.jump=!1}OnShow(e){this.CloseBtn.clickHandler=Laya.Handler.create(this,this.ClickClose,null,!1),this.ContinueBtn.clickHandler=Laya.Handler.create(this,this.ClickContinue,null,!1),this.SetData(),this.ContinueBtn.visible=bt.iswhite,bt.iswhite&&Laya.timer.once(1e3,this,()=>{}),this.height=Laya.stage.height,Laya.stage.on(Laya.Event.RESIZE,this,()=>{this.height=Laya.stage.height})}OnClose(){Laya.timer.clearAll(this)}ClickClose(e){kt.Instance.CloseView(wt.ExportView)}ClickContinue(){let e=t.randomInt(0,bt.pushData.length),i=bt.pushData[e];bt.ClickAd(bt.Ad_ClickType.PushClick),bt.ShowHuTuiJump(i)}SetData(){bt.SetHuTuiList(this.TopList,2,""),bt.SetHuTuiList(this.BottomList,1,""),this.GunGun()}GunGun(){var e,t;try{this.TopList.scrollBar.value=0,this.BottomList.scrollBar.value=0,e=this.TopList.scrollBar.max,t=this.BottomList.scrollBar.max}catch(e){return void console.error(e)}var i=1,a=1;Laya.timer.frameLoop(1,this,()=>{this.TopList.scrollBar.value+=i,(this.TopList.scrollBar.value>=e||this.TopList.scrollBar.value<=0)&&(i=-i),this.BottomList.scrollBar.value+=a,(this.BottomList.scrollBar.value>=t||this.BottomList.scrollBar.value<=0)&&(a=-a)})}}class Ct extends ue.ExitViewUI{constructor(){super(),this.jump=!1,Ct.ins=this}static get Instance(){return Ct.ins?Ct.ins:new Ct}OnShow(){this.SetData(),this.CloseBtn.clickHandler=new Laya.Handler(this,this.ClickClose),this.height=Laya.stage.height,Laya.stage.on(Laya.Event.RESIZE,this,()=>{this.height=Laya.stage.height})}OnClose(){}ClickClose(){kt.Instance.CloseView(wt.ExitView)}SetData(){bt.SetHuTuiList(this.PushList,1,"")}}!function(e){e[e.InGameView=0]="InGameView",e[e.ShadeView=1]="ShadeView",e[e.CompleteView=2]="CompleteView",e[e.LoadView=3]="LoadView",e[e.MainView=4]="MainView",e[e.SettingUi=5]="SettingUi",e[e.SKinShopView=6]="SKinShopView",e[e.TrialView=7]="TrialView",e[e.IntensifyView=8]="IntensifyView",e[e.AttributeUpView=9]="AttributeUpView",e[e.ExportView=10]="ExportView",e[e.ExitView=11]="ExitView"}(wt||(wt={}));class kt{constructor(){this.viewDic=[],this.addViewDic=new i,this.showpushview=0,this._maskCnt=0,this.init()}static get Instance(){return this.instance||(this.instance=new kt)}init(){this._maskCnt=0,this.viewDic[wt.InGameView]=gt,this.viewDic[wt.LoadView]=dt,this.viewDic[wt.MainView]=pt,this.viewDic[wt.IntensifyView]=yt,this.viewDic[wt.CompleteView]=ut,this.viewDic[wt.SKinShopView]=vt,this.viewDic[wt.TrialView]=Lt,this.viewDic[wt.ShadeView]=xt,this.viewDic[wt.ExportView]=St,this.viewDic[wt.ExitView]=Ct,this.viewDic[wt.AttributeUpView]=mt,this.uiNode=new Laya.Sprite,this.popNode=new Laya.Sprite,Laya.stage.addChild(this.uiNode),Laya.stage.addChild(this.popNode),this.uiNode.zOrder=3,this.popNode.zOrder=4}OpenView(e,t){null!=this.curView&&(this.curView.OnClose(),this.uiNode.removeChild(this.curView),this.curView.destroy(!0),this.curView=null),this.curView=new this.viewDic[e],this.uiNode.addChild(this.curView),this.curView.OnShow(t)}get getCurView(){return this.curView}AddView(e,t){if(this.addViewDic.has(e))return;let i=new this.viewDic[e];this.addViewDic.set(e,i),this.uiNode.addChild(i),i.OnShow(t),le.Instance.CloseInput()}RemoveView(){null!=this.curView&&(this.curView.OnClose(),this.uiNode.removeChild(this.curView),this.curView.destroy(!0),this.curView=null)}HaveView(e){return this.addViewDic.has(e)}CloseView(e){if(!this.addViewDic.has(e))return;let t=this.addViewDic.get(e);t.OnClose(),this.uiNode.removeChild(t),t.destroy(!0),this.addViewDic.delete(e),le.Instance.OpenInput()}OpenMask(){if(this._maskCnt++,!(this._maskCnt>1)){if(null!=this.curMask)return this.curMask.OnClose(),this.popNode.removeChild(this.curView),this.curMask.destroy(),void(this.curMask=null);this.curMask=new this.viewDic[wt.ShadeView],this.curMask&&(console.log("打开遮罩"),this.popNode.addChild(this.curMask),this.curMask.OnShow())}}CloseMask(){this._maskCnt--,this._maskCnt>0||null!=this.curMask&&(this.curMask.OnClose(),this.popNode.removeChild(this.curMask),this.curMask.destroy(!0),console.log("关闭遮罩"),this.curMask=null)}ShowTips(e,t=1){var i=H.Instance.GetUi(z.WarnTips);if(i)if(1==t){i.y=0,i.text=e,i.x=Laya.stage.width>>1,this.popNode.addChild(i);let t=(Laya.stage.height>>1)-300;var a=Laya.Tween.to(i,{y:t},1e3,Laya.Ease.bounceOut,new Laya.Handler(this,()=>{a.clear(),H.Instance.RecoverUi(z.WarnTips,i)}))}else if(2==t){i.y=Laya.stage.height-400,i.text=e,i.x=Laya.stage.width>>1,this.popNode.addChild(i);a=Laya.Tween.to(i,{alpha:0},1e3,Laya.Ease.bounceOut,new Laya.Handler(this,()=>{a.clear(),H.Instance.RecoverUi(z.WarnTips,i),i.alpha=1}))}}ShowGuideView(){this.GuideView||(this.GuideView=new ye,this.popNode.addChild(this.GuideView)),this.GuideView.OnShow()}CloseGuideView(){this.GuideView&&(this.GuideView.OnClose(),this.GuideView.removeSelf(),this.GuideView.destroy())}}class bt{static InitSdk(){Laya.Browser.window.sdk.getFyhd().startSdk(),bt.UserInfoAuth(),Laya.LocalStorage.getItem("is_white")?bt.iswhite=!0:bt.getWhiteConfig(),Laya.LocalStorage.getItem("is_newuser")?bt.isnewuser=!1:(bt.isnewuser=!0,Laya.LocalStorage.setItem("is_newuser","1")),bt.PushData()}static UserInfoAuth(){Laya.Browser.onWeiXin&&Laya.Browser.window.sdk.getFyhd().getFyhdUserInfo(null,!1,e=>{console.log("无授权回调:"+JSON.stringify(e)),e.result.user&&(bt.openid=e.result.user.openid,bt.AuthInfo())})}static AuthInfo(){var e={openid:bt.openid};Laya.Browser.window.sdk.getFyhd().loginData(e,e=>{console.log("授权上报回调:"+JSON.stringify(e)),bt.ValueUser()})}static ValueUser(){var e={openid:bt.openid};Laya.Browser.window.sdk.getFyhd().valueuser(e,e=>{console.log("有效用户上报:"+JSON.stringify(e))})}static getWhiteConfig(){Laya.Browser.window.sdk.getFyhd().whiteConfig(function(e){bt.iswhite=e.data.is_white,bt.iswhite&&Laya.LocalStorage.setItem("is_white","1"),console.log("白名单---",e)})}static SetHuTuiList(e,t=1,i=""){let a=this.pushData;a&&0!=a.length&&(e.selectEnable=!1,1==t?e.vScrollBarSkin="":e.hScrollBarSkin="",e.renderHandler=Laya.Handler.create(this,this.updateItem,[i],!1),e.array=a,e.refresh())}static updateItem(e,t,i){t.getComponent(Mt).Refresh(e)}static ClickAd(e){if(console.log("上报类型---",e),Laya.Browser.onWeiXin){var t={ad_type:e,openid:bt.openid};console.log("点击参数:"+t),Laya.Browser.window.sdk.getFyhd().advertisement(t,e=>{console.log("点击结果:"+JSON.stringify(e))})}}static PushData(){if(Laya.Browser.onWeiXin){Laya.Browser.window.sdk.getFyhd().shareRecommend({},e=>{console.log("热门游戏数据--",e),e.data&&(bt.pushData=e.data,bt.pushData.sort(bt.ListSort),bt.isHaveDate=!0),console.log("获取互推信息:"+JSON.stringify(bt.pushData))})}}static ShowHuTuiJump(e){Laya.Browser.onWeiXin&&(2==e.jump_type?Laya.Browser.window.wx.previewImage({current:e.qrcode,urls:[e.qrcode]}):1==e.jump_type?Laya.Browser.window.wx.navigateToMiniProgram({appId:e.to_appid,path:e.jump_path,success(t){console.log("上报成功:"+JSON.stringify(t)),bt.PushClick(e.to_appid)},fail(e){kt.Instance.AddView(wt.ExportView)}}):0==e.jump_type&&Laya.Browser.window.wx.navigateToMiniProgram({appId:e.platform_appid,path:e.jump_path,success(t){console.log("上报成功:"+JSON.stringify(t)),bt.PushClick(e.to_appid)},fail(e){}}))}static PushClick(e){if(Laya.Browser.onWeiXin){var t={openid:bt.openid,to_appid:e};Laya.Browser.window.sdk.getFyhd().sharePlay(t,e=>{console.log("点击上报结果:"+JSON.stringify(e))})}}static ListSort(e,t){return Number(e.panel)Number(t.panel)?1:void 0}}bt.Ad_ClickType={Video:"video_click",Watch:"watch",Share:"share",Banner:"banner",Push:"push",PushClick:"icon_click"},bt.pushData=[],bt.isHaveDate=!1,bt.ShowAd="ShowAd";class Mt extends Laya.Script{constructor(){super()}onAwake(){this.self=this.owner,this.icon=this.self.getChildByName("icon"),this.btn=this.self.getChildByName("btn"),this.name=this.self.getChildByName("name"),this._tip=this.self.getChildByName("tip"),this.bottom=this.self.getChildByName("bottom"),this.remen=this.self.getChildByName("remen"),this.star=this.self.getChildByName("star"),this.diandian=this.icon.getChildAt(0),this.btn.clickHandler=new Laya.Handler(this,this.clickAd),console.log("self-------------------",this.self)}Refresh(e){if(this.data=this.self.dataSource,this.type=e,this.name&&(this.name.text=this.data.togame_name),this._tip){this._tip.visible=!0;let e=t.randomInt(1,2e5).toString()+"人在玩";this._tip.text=e}if(this.diandian&&(this.diandian.visible=!1),this.bottom){let e=t.randomInt(1,6);this.bottom.skin="subpackage/bottom/icontitle"+e+".png"}this.remen&&(this.remen.visible=Math.random()<.2),this.star&&(this.star.visible=Math.random()<.2),this.icon.skin=this.data.icon}clickAd(){bt.ClickAd(bt.Ad_ClickType.PushClick),bt.ShowHuTuiJump(this.data)}onDestroy(){this.btn.clickHandler=null}}class _t{constructor(){}static init(){var t=Laya.ClassUtils.regClass;t("View/Com/ButtonRunTime.ts",e),t("View/Com/ListItem.ts",Mt)}}_t.width=720,_t.height=1280,_t.scaleMode="fixedwidth",_t.screenMode="vertical",_t.alignV="middle",_t.alignH="center",_t.startScene="MainView.scene",_t.sceneRoot="",_t.debug=!1,_t.stat=!1,_t.physicsDebug=!1,_t.exportSceneToJson=!0,_t.init();new class{constructor(){window.Config3D&&(window.Config3D._config._defaultPhysicsMemory=128),window.Config3D&&(window.Config3D._config.isAntialias=!0),window.Laya3D?Laya3D.init(_t.width,_t.height):Laya.init(_t.width,_t.height,Laya.WebGL),Laya.Physics&&Laya.Physics.enable(),Laya.DebugPanel&&Laya.DebugPanel.enable(),Laya.stage.scaleMode=_t.scaleMode,Laya.stage.screenMode=_t.screenMode,Laya.stage.alignV=_t.alignV,Laya.stage.alignH=_t.alignH,Laya.URL.exportSceneToJson=_t.exportSceneToJson,(_t.debug||"true"==Laya.Utils.getQueryString("debug"))&&Laya.enableDebugPanel(),_t.physicsDebug&&Laya.PhysicsDebugDraw&&Laya.PhysicsDebugDraw.enable(),_t.stat&&Laya.Stat.show(),Laya.alertGlobalError=!0,s.isWx=Laya.Browser.onWeiXin,s.isWx&&N.init(),Laya.ResourceVersion.enable("version.json",Laya.Handler.create(this,this.onVersionLoaded),Laya.ResourceVersion.FILENAME_VERSION),N.IsNeedUpdate()}onVersionLoaded(){Laya.AtlasInfoManager.enable("fileconfig.json",Laya.Handler.create(this,this.onConfigLoaded)),Laya.MouseManager.multiTouchEnabled=!1}onConfigLoaded(){kt.Instance.OpenView(wt.LoadView),s.isX=Laya.Browser.clientHeight/Laya.Browser.clientWidth>2}}}();