bundle.js 290 KB

1
  1. !function(){"use strict";var e=Laya.Vector3;class t{static GetObjKey(e){if(null==e)return null;for(const t in e)if(e.hasOwnProperty(t))return t}static randomInt(e,t){return t<e?parseInt(e):parseInt(Math.random()*(t-e+1)+e)}static randomFl(e,t){if(e>=t)return 0;var i=t-e;return Math.random()*i+e}static getAng(e,i,s){return 180/Math.PI*t.getRad(e,i,s)}static getRad(e,t,i){return t<0?Math.acos(e/i):2*Math.PI-Math.acos(e/i)}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 s=e.split(i),a=[];for(let e=0;e<s.length;e++)a.push(s[e]);return a}static random_1to1(){var e=Math.random()>.5?-1:1;return Math.random()*e}static GetWeight(e){let i=t.SpliteString(e);for(var s=0,a=0;a<i.length;a++)s+=Number(i[a]);let n=t.randomInt(1,s),o=0;for(let e=0;e<i.length;e++)if(n<=(o+=Number(i[e])))return e}static get64Encode(e){for(var t,i,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=e.length,r="";n<o;){if(t=255&e.charCodeAt(n++),n==o){r+=a.charAt(t>>2),r+=a.charAt((3&t)<<4),r+="==";break}if(i=e.charCodeAt(n++),n==o){r+=a.charAt(t>>2),r+=a.charAt((3&t)<<4|(240&i)>>4),r+=a.charAt((15&i)<<2),r+="=";break}s=e.charCodeAt(n++),r+=a.charAt(t>>2),r+=a.charAt((3&t)<<4|(240&i)>>4),r+=a.charAt((15&i)<<2|(192&s)>>6),r+=a.charAt(63&s)}return r}static makeRandomArr(e,t){if(!(t>e.length)){for(var i=e.slice(0),s=[],a=0;a<t;a++){var n=Math.floor(Math.random()*(i.length-1)),o=i[n];i.splice(n,1),s.push(o)}return s}}static CopyArr(e){var t=[];for(let i=0;i<e.length;i++){const s=e[i];t.push(s)}return t}static clamp(e,t,i){return e>i?i:e<t?t:e}static GetVecByArr(t){if(!t)return null;var i=new e;return i.x=t[0],i.y=t[1],i.z=t[2],i}static IsNext(){if(Laya.LocalStorage.getItem("isNext")){let e=new Date(Number(Laya.LocalStorage.getItem("isNext"))),t=new Date(Laya.timer.currTimer);return t.setHours(0,0,0,0),e.valueOf()<t.valueOf()&&(Laya.LocalStorage.setItem("isNext",Laya.timer.currTimer.toString()),!0)}return Laya.LocalStorage.setItem("isNext",Laya.timer.currTimer.toString()),!0}static ToTimeStr1(e){let t="",i=0,s=0;return(s=e)>60&&(i=Math.floor(s/60),s%=60),i+":"+(t=s<10?"0"+s:s+"")}static ToTimeStr(e,t=!1){let i=0,s=0,a=0;if((a=e)>60&&(s=Math.floor(a/60),a%=60),t&&s>60){i=Math.floor(s/60),s%=60;let e=a>=10?a+"":"0"+a.toString(),t=s>=10?s+"":"0"+s.toString();return(i>=10?i+"":"0"+i.toString())+":"+t+":"+e}{s>60&&(s=Math.floor(a/60),a%=60);let e=a>=10?a+"":"0"+a.toString();return(s>=10?s+"":"0"+s.toString())+":"+e}}}var i,s=Laya.SoundManager;!function(e){e[e.click=0]="click",e[e.win=1]="win",e[e.defeat=2]="defeat"}(i||(i={}));class a{constructor(){this.vibrate=!0,this.sound=!0,this.SoundS={click:"subpackage1/sound/click.mp3",win:"subpackage1/sound/vector.mp3",defeat:"subpackage1/sound/defeat.mp3",car_crush_1:"subpackage1/sound/car_crush_1.mp3",car_crush_2:"subpackage1/sound/car_crush_2.mp3",car_crush_3:"subpackage1/sound/car_crush_3.mp3",explotion1:"subpackage1/sound/explotion1.mp3",explotion2:"subpackage1/sound/explotion2.mp3",gun_fire_1:"subpackage1/sound/gun_fire_1.mp3",gun_fire_2:"subpackage1/sound/gun_fire_2.mp3",gun_fire_3:"subpackage1/sound/gun_fire_3.mp3",reload_gun_1:"subpackage1/sound/reload_gun_1.mp3",reload_gun_2:"subpackage1/sound/reload_gun_2.mp3",hitcar:"subpackage1/sound/hitcar.mp3",hitrole:"subpackage1/sound/hitrole.mp3"},this.bg="subpackage1/sound/bgm.mp3"}static get Instance(){return this.instasnce||(this.instasnce=new a)}Init(){var e=Laya.LocalStorage.getItem("vibrate");this.vibrate=!Number(e)||"1"==e;var t=Laya.LocalStorage.getItem("sound");this.sound=!Number(t)||"1"==t}SettingSound(e){this.soundChannel&&(this.soundChannel.volume=e)}_playMusic(e){null==e&&(e=this.sound),e?null==this.soundChannel?this.soundChannel=s.playMusic(this.bg,0,new Laya.Handler(this,()=>{this.soundChannel.play()})):this.soundChannel.resume():this.soundChannel&&this.soundChannel.pause()}SetSoundV(e){}PlaySound(e){}StopSound(e){if(this.sound){var t=i[e];s.stopSound(this.SoundS[t])}}PlayerCrash(){if(!this.sound)return;let e,i=t.randomInt(1,3);1==i?e=this.SoundS.car_crush_1:2==i?e=this.SoundS.car_crush_2:3==i&&(e=this.SoundS.car_crush_3),s.playSound(e)}PlayerExplotion(){if(!this.sound)return;let e;e=Math.random()>.5?this.SoundS.explotion1:this.SoundS.explotion2,s.playSound(e)}PlayerGunFire(e){if(!this.sound)return;let t;e<=3?t=this.SoundS.gun_fire_1:e>3&&e<=7?t=this.SoundS.gun_fire_2:e>7&&(t=this.SoundS.gun_fire_3),s.playSound(t)}PlayerGunReload(e){if(!this.sound)return;let t;t=e<=3?this.SoundS.reload_gun_1:this.SoundS.reload_gun_2,s.playSound(t)}PlayHitcar(){if(!this.sound)return;let e;e=this.SoundS.hitcar,s.playSound(e)}PlayHitRole(){if(!this.sound)return;let e;e=this.SoundS.hitrole,s.playSound(e)}}class n 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,a.Instance.PlaySound(i.click),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 o{constructor(){}static init(){(0,Laya.ClassUtils.regClass)("Window/Com/ButtonRunTime.ts",n)}}o.width=720,o.height=1280,o.scaleMode="fixedwidth",o.screenMode="vertical",o.alignV="middle",o.alignH="center",o.startScene="DefeatGradeUi.scene",o.sceneRoot="",o.debug=!1,o.stat=!1,o.physicsDebug=!1,o.exportSceneToJson=!0,o.init();class r{}r.VER="1.0.7",r.CFG="CFG",r.wxValue="",r.isX=!1,r.mSharePeopleScene=null;class l{constructor(){this._container={},this._length=0}get container(){return this._container}get size(){return this._length}set(e,t){this._container.hasOwnProperty(e)||this._length++,this._container[e]=t}delete(e){this._container.hasOwnProperty(e)&&(delete this._container[e],this._length--)}has(e){return!!this._container.hasOwnProperty(e)}get(e){return this._container.hasOwnProperty(e)?this._container[e]:void 0}clear(){this._container={},this._length=0}}class h{static get Disispatcher(){return h.disispatcher||(h.disispatcher=new Laya.EventDispatcher)}static on(e,t,i){this.Disispatcher.on(e,t,i)}static off(e,t,i){this.Disispatcher.off(e,t,i)}static event(e,t=null){this.Disispatcher.event(e,t)}}class c{}c.Event={CamFollowArg:"CamFollowArg",SetAimPos:"SetAimPos",RefreshBulletCount:"RefreshBulletCount",RefreshRemainEnemyCount:"RefreshRemainEnemyCount",GameShowTips:"GameShowTips",StartShot:"StartShot",StopShot:"StopShot",ShowMainUi:"ShowMainUi",SetMonery:"SetMonery",SetStage:"SetStage",SetStagePro:"SetStagePro"};class d{static get Instance(){return this.instance||(this.instance=new d)}GetSign(e){if(this.sign)return this.sign[e-1]}GetReward(e){if(this.rewards)for(let t=0;t<this.rewards.length;t++){const i=this.rewards[t];if(i.id==e)return i}}GetMission(e){return this.mission?this.mission[e-1]:null}GetEnemyTeam(e){return this.enemyteam?this.enemyteam[e-1]:null}GetRole(e){return this.role?this.role[e-1]:null}GetLevel(e){return this._level?this._level[e-1]:null}GetRoad(e){return this._road?this._road[e-1]:null}GetBlock(e){return this._block?this._block[e-1]:null}GetThing(e){return this._thing?this._thing[e-1]:null}GetAtk(e){return this._atk?this._atk[e-1]:null}GetRate(e){return this._rate?this._rate[e-1]:null}GetCar(e){return this.car?this.car[e-1]:null}GetGlobe(e){if(this._globe)for(let t=0;t<this._globe.length;t++){const i=this._globe[t];if(i.key==e)return i.value}}GetTheme(e){return this._theme?this._theme[e-1]:null}GetLottery(e){return this._lottery?this._lottery[e-1]:null}GetAchievement(e,t){if(this._achievement)for(let i=0;i<this._achievement.length;i++)if(this._achievement[i].type==e&&this._achievement[i].level==t)return this._achievement[i]}GetTypeLevel(e){var t=0;if(this._achievement){for(let i=0;i<this._achievement.length;i++)this._achievement[i].type==e&&t++;return t}}GetachieveType(){if(null==this._achieveType&&this._achievement)for(let e=0;e<this._achievement.length;e++)this._achieveType=this._achievement[e].type;return this._achieveType}}class u{}u.main_path="subpackage/LayaScene_main/Conventional/main.ls",u.player_path=["subpackage/LayaScene_role/Conventional/player1.lh","subpackage/LayaScene_role/Conventional/player2.lh","subpackage/LayaScene_role/Conventional/player3.lh","subpackage/LayaScene_role/Conventional/player4.lh","subpackage/LayaScene_role/Conventional/player5.lh","subpackage/LayaScene_role/Conventional/player6.lh","subpackage/LayaScene_role/Conventional/player7.lh"],u.enemytexture=["subpackage/EnemyTexture/enemy_1.png","subpackage/EnemyTexture/enemy_2.png","subpackage/EnemyTexture/enemy_3.png"],u.enemy_path="subpackage/LayaScene_role/Conventional/enemy.lh",u.playerBullet_path="subpackage/LayaScene_prop/Conventional/PlayerBullet.lh",u.tower_path="subpackage/LayaScene_prop/Conventional/Tower.lh",u.barrier_paths=["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"],u.effect_path=["subpackage/LayaScene_effect/Conventional/boom.lh","subpackage/LayaScene_effect/Conventional/hit.lh","subpackage/LayaScene_effect/Conventional/xue.lh"],u.muchs=["100万","61万","8万","16万","55万","123万","1004万","88万","69万","90万","7万","14万","6万","12万"],u.tableName={level:"level",road:"road",block:"block",thing:"thing",atk:"atk",rate:"rate",global:"global",theme:"theme"};class p{}p.moveTime=1;class m{constructor(){this.stage=1,this.killCount=0,this.istry=!1,this.equipId=1}static get Instance(){return m.instance||(m.instance=new m)}SetTheme(){}SetTryOutById(e){}static SetGlobe(){m.tower_reward=Number(d.Instance.GetGlobe("tower_reward")),m.block_reward=Number(d.Instance.GetGlobe("block_reward")),m.enemy_reward=Number(d.Instance.GetGlobe("enemy_reward"))}SetPlayer(){var e=b.Instance.CurModel;m.instance.stage=Number(e.GetUserAttr(v.stage))+1,m.instance.equipId=Number(e.GetUserAttr(v.equip_themes)[1]),this.SetArr()}SetArr(){let e=b.Instance.CurModel.GetUserAttr(v.attrs).power;this.powerLevel=e?Number(e):1;let t=d.Instance._atk.length,i=this.powerLevel>t?t:this.powerLevel;m.bulletAttack=d.Instance.GetAtk(i).atk;let s=b.Instance.CurModel.GetUserAttr(v.attrs).rate;this.rateLevel=s?Number(s):1;let a=d.Instance._rate.length,n=this.rateLevel>a?a:this.rateLevel;m.bulletTime=d.Instance.GetRate(n).rate}GradePower(e,t,i,s){let a=[{t:b.Instance.CurModel.ServerTime},{attr:"power"},{level:e},{channel:t},{amount:i}];L.Instance.HttpPostRequest(S.protocols.UpgradeAttr,a,e=>{s&&s(!0)},e=>{s&&s(!1)})}GradeRate(e,t,i,s){let a=[{t:b.Instance.CurModel.ServerTime},{attr:"rate"},{level:e},{channel:t},{amount:i}];L.Instance.HttpPostRequest(S.protocols.UpgradeAttr,a,e=>{s&&s(!0)},e=>{s&&s(!1)})}}m.bulletAttack=1,m.bulletTime=.3;class g{}g.playerspeed=.1,g.friendspeed=.2,g.bulletspeed=.8,g.sliderFactor=.02,g.playerMoveMaxX=4.5,g.playerRayLengthF=1.3,g.playerRayLengthLR=.3,g.bulletRayLength=1,g.bulletMaxDis=40,g.barrierRoadLength=50,g.barrierRoadAverageNum=50,g.hitmaxcount=2,g.boommaxcount=2,g.blockLRmoveMaxDis=5,g.arriveStandWidth=5,g.enemySpeed=.1;class y{static PlayerInfo(){}static GameInfo(){m.Instance.SetPlayer()}static SetCfg(e){d.Instance._level=e[u.tableName.level],d.Instance._road=e[u.tableName.road],d.Instance._block=e[u.tableName.block],d.Instance._thing=e[u.tableName.thing],d.Instance._atk=e[u.tableName.atk],d.Instance._rate=e[u.tableName.rate],d.Instance._theme=e[u.tableName.theme],d.Instance._globe=e[u.tableName.global],m.SetGlobe()}static Appseting(e){p.shareimage=e.shareimage,p.sharetitle=e.sharetitle,p.bannerCanMove=Number(e.bannerCanMove),p.moveTime=Number(e.moveTime),p.OpenSceneValue=Number(e.OpenSceneValue),p.freeUpdateVideotime=Number(e.freeUpdateVideotime),p.freecoinValue=Number(e.freecoinValue),p.freeGetcoinTime=Number(e.freeGetcoinTime),g.playerspeed=Number(e.playerspeed),g.friendspeed=Number(e.friendspeed),g.bulletspeed=Number(e.bulletspeed),g.sliderFactor=Number(e.sliderFactor),g.playerMoveMaxX=Number(e.playerMoveMaxX),g.playerRayLengthF=Number(e.playerRayLengthF),g.playerRayLengthLR=Number(e.playerRayLengthLR),g.bulletRayLength=Number(e.bulletRayLength),g.bulletMaxDis=Number(e.bulletMaxDis),g.barrierRoadLength=Number(e.barrierRoadLength),g.barrierRoadAverageNum=Number(e.barrierRoadAverageNum),g.hitmaxcount=Number(e.hitmaxcount),g.boommaxcount=Number(e.boommaxcount),g.blockLRmoveMaxDis=Number(e.blockLRmoveMaxDis),g.arriveStandWidth=Number(e.arriveStandWidth),g.enemySpeed=Number(e.enemySpeed)}}var I=Laya.Event,w=Laya.HttpRequest;const f="https://gungangapi.xwxgame.com/";class S{}S.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 L{PostTokenRequest(e,t,i,s=!0){let a="",n=f+e;a=a=`token=${b.Instance.CurModel.m_token}`;let o=new w;o.once(I.COMPLETE,this,this.onHttpRequestComplete,[t,i,o,s]),o.once(I.ERROR,this,this.onHttpRequestError,[i,o]),o.send(n,a,"post","text"),s&&Nt.ShowLoading("")}onHttpRequestComplete(e,i,s,a){let n;(a&&Nt.HideLoading(),n=JSON.parse(s.data),console.log("请求成功:"+JSON.stringify(n)),0==n.code)?(b.Instance.RefreshModel(n),null!=e&&e(n)):null!=i&&i(t.SpliteString(n.message,",")[0])}onHttpRequestError(e,t,i){if(null!=e){var s=JSON.parse(t.data);e(s)}console.log("Error! Http request error, code: "+s),i&&Nt.HideLoading()}static get Instance(){return L.instance||(L.instance=new L)}login(e,t,i){console.log("发送登录请求");var s=b.Instance,a=r.VER;let n=`code=${s.m_code}&nickname=${s.m_nickname}&avatar=${s.m_avatar}&gender=${s.m_gender}&country=${s.m_country}&province=${s.m_province}&city=${s.m_city}&device=${s.m_device}&share_id=${s.m_share_id}&scene=${s.channel}&v=${a}`;console.log("登录 参数: "+n);let o=new w;o.once(I.PROGRESS,this,this.onHttpRequestProgress,[e,o]),o.once(I.COMPLETE,this,this.onLoginRequestComplete,[t,o]),o.once(I.ERROR,this,this.onHttpRequestError,[i,o]),o.send(f+S.protocols.Login,n,"post","text")}onHttpRequestProgress(){}onLoginRequestComplete(e,t){let i=JSON.parse(t.data);if(console.log(i),console.log("登录完成"),"0"!=i.code){var s=JSON.stringify(t.data);return console.log("登录异常错误!错误信息:",s),void e(i)}b.Instance.SetUserModel(new C(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)),y.Appseting(i.app_setting);var a=i.table_version;b.Instance.CurModel.JundgCfg(a,t=>{t&&(y.PlayerInfo(),y.GameInfo(),e(i))}),Nt.ShareMessage()}PostCfgRequest(e,t){let i="",s=f+S.protocols.GetCfg;i=`token=${b.Instance.CurModel.m_token}`;let a=new w;a.once(I.COMPLETE,this,()=>{var i=JSON.parse(a.data);0==i.code?null!=e&&i.configs&&e(i.configs):null!=t&&t(i)}),a.once(I.ERROR,this,()=>{var e=JSON.parse(a.data);null!=t&&t(e)}),a.send(s,i,"post","text")}HttpPostRequest(e,i,s,a,n=!0,o=!0){let r="",l=f+e;if(1==n&&(r=`token=${b.Instance.CurModel.m_token}&`),e==S.protocols.UserSync||e==S.protocols.Fissionvd||e==S.protocols.Lotterylottery||e==S.protocols.Fissiondeduct||e==S.protocols.KunBuy||e==S.protocols.KunDiscard||e==S.protocols.KunEquip||e==S.protocols.KunMove||e==S.protocols.Start||e==S.protocols.GameResult||e==S.protocols.themefission||e==S.protocols.Opentreasure||e==S.protocols.UpgradeAttr){let e="abcdefghijkimnopqrstuvwxyz0123456789",s="{",a="";for(let t=0;t<4;t++)a+=e[Math.floor(100*Math.random())%e.length];for(let e=0;e<i.length;e++){for(let t in i[e])s+='"'+t+'":',"string"==typeof i[e][t]?s+='"'+i[e][t]+'"':s+=i[e][t];e<i.length-1?s+=",":s+="}"}r+="_r="+a+t.get64Encode(s)}else if(null!=i)for(let e=0;e<i.length;e++)for(let t in i[e]){r+=`${t}=${i[e][t]}`,e<i.length-1&&(r+="&")}let h=new w;h.once(I.COMPLETE,this,this.onHttpRequestComplete,[s,a,h,o]),h.once(I.ERROR,this,this.onHttpRequestError,[a,h,o]),h.send(l,r,"post","text"),o&&Nt.ShowLoading("")}static errorRequest(e,t){let i=new Laya.HttpRequest;t&&(i.once(Laya.Event.PROGRESS,this,()=>{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 x,v;!function(e){e[e.train=0]="train",e[e.sign=1]="sign",e[e.rewards=2]="rewards"}(x||(x={})),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"}(v||(v={}));class C{constructor(e,t,i,s,a,n,o,r,l,h,c,d,u,p,m,g){this.loginSeverTime=0,this.m_avatar="",this.localTime=Laya.timer.currTimer,this.loginSeverTime=l,this.m_token=e,this.m_user=s,this.m_base=a,this.m_invite=n,this.m_lottery=o,this.m_treasure=r,this.m_achievement=h,this.m_sign=c,this.m_arena=d,this.m_shop=p,this.user_video=g,this.user_daily_task=m,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(u)}GetUserAttr(e){var t=v[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(v.get_themes),i=0;i<t.length;i++){if(e==t[i])return!0}return!1}GetThemeProgress(e){var t=this.GetUserAttr(v.progress_themes);return t[e]?t[e]:0}JundgCfg(e,t){var i=Laya.LocalStorage.getJSON(r.CFG);i?i.VER==e?(console.log("已经拥有,不用更新"),y.SetCfg(i),t(!0)):(console.log("cfg存在但是过期了"),Laya.LocalStorage.removeItem(r.CFG),L.Instance.PostCfgRequest(i=>{i.VER=e,Laya.LocalStorage.setJSON(r.CFG,i),y.SetCfg(i),t(!0)},e=>{console.log("配置获取失败"+e),t(!1)})):(console.log("本地没有cfg"),L.Instance.PostCfgRequest(i=>{console.log("cfg"+i),i.VER=e,Laya.LocalStorage.setJSON(r.CFG,i),y.SetCfg(i),t(!0)},e=>{console.log("配置获取失败"+e)}))}}class b{get CurModel(){return this.curModel}constructor(e,t,i,s,a,n,o,r,l,h){b.instance=this,this.m_code=e,this.m_nickname=t||"",this.m_avatar=i||"",this.m_gender=s||0,this.m_city=o||"",this.m_device=r||"",this.m_share_id=l||"",this.channel=h||"",this.m_country=a||"",this.m_province=n||""}static get Instance(){return b.instance?b.instance:(b.instance=new b("11","","",0,"","","","","",""),b.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),y.PlayerInfo()}}class _{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+" 资源加载失败")})}static InitNativefiles(e){r.isWx?(Laya.MiniAdpter.nativefiles.push("res/config/nativefiles.txt"),_.LoadResource(["res/config/nativefiles.txt"],()=>{let t=Laya.Loader.getRes("res/config/nativefiles.txt"),i=JSON.parse(t);for(let e=0;e<i.length;e++){let t=i[e];Laya.MiniAdpter.nativefiles.push(t)}e&&e()})):e&&e()}static SetBaseUrl(e){r.isWx}}_.baseUrl="https://cdn2.xwxgame.com/business/";var k,B,T=Laya.Sprite3D;!function(e){e[e.WarnTips=1]="WarnTips",e[e.HpText=2]="HpText"}(k||(k={}));class M{constructor(){this.poolDic=new l,this.prefabDic=new l,this.singleobjDic=new l}static get Instance(){return M.instance||(M.instance=new M)}InitData(e,t){null!=t&&(this.prefabDic.has(e)||this.prefabDic.set(e,t))}HasSprInPool(e){return this.prefabDic.has(e)}SetActiveObject(e){if("PlayerBullet"==e&&M.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=T.instantiate(this.prefabDic.get(e))).name=e,console.log("正在克隆中>>>>>"+e+"__id:"+i.id),i):null}var i;return this.prefabDic.has(e)?((i=T.instantiate(this.prefabDic.get(e))).name=e,console.log("正在克隆中>>>>>"+e+"__id:"+i.id),i):null}SetActiveForUi(e){if(this.singleobjDic.has(e)){if(this.singleobjDic.get(e).length>0){var t=this.singleobjDic.get(e).shift();return t.visible=!0,t}return this.GetByType(e)}return this.GetByType(e)}GetByType(e){var t;return e==k.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==k.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}SetDisableForUi(e,t){t.visible=!1,t.removeSelf(),this.singleobjDic.has(e)||this.singleobjDic.set(e,new Array),this.singleobjDic.get(e).push(t)}SetDisableObject(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)}}SetDisableMutiObject(e,t){Laya.timer.once(t,this,()=>{e&&(e.active=!1);var t=e.name;this.poolDic.has(t)||this.poolDic.set(t,new Array),this.poolDic.get(t).push(e)})}}M.pooltype={Tower:"Tower",PlayerBullet:"PlayerBullet",player:"player",enemy:"enemy"},M.bulletCount=0;class U{static GetData(e){var t=Math.floor(e),i=0,s=0,a=0;t>60&&(i=Math.floor(t/60),t%=60,i>60&&(s=Math.floor(i/60),i%=60,s>24&&(a=Math.floor(s/24),s%=24)));var n="";return n=a+"天"+(n=s+"时"+(n=i+"分"+n))}static GetNumAccuracy(e){var t=Math.ceil(10*e)/10;if(Math.abs(t-e)<1e-4)return t;var i=Math.floor(10*e)/10;return Math.abs(i-e)<1e-4?i:e}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 get Gravity(){return new Laya.Vector3(0,-10,0)}static MixVector3(e,t,i,s=null){return null==s&&(s=this.m_mixVector),s.x=U.MixNumber(e.x,t.x,i),s.y=U.MixNumber(e.y,t.y,i),s.z=U.MixNumber(e.z,t.z,i),s}static MixVector4(e,t,i,s){return s.x=U.MixNumber(e.x,t.x,i),s.y=U.MixNumber(e.y,t.y,i),s.z=U.MixNumber(e.z,t.z,i),s.w=U.MixNumber(e.w,t.w,i),s}static MixNumber(e,t,i){return e=(t-e)*(i=U.Clamp(i,0,1))+e}static Clamp(e,t,i){return e<t&&(e=t),e>i&&(e=i),e}}U.m_mixVector=new Laya.Vector3;class R{constructor(e,t=0,i=0,s=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=s}ChangeT(e){this.m_t=e}get t(){return this.m_t}update(){this.follow=U.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 A{}A.animator={Idle:"Idle",CrouchFiring:"CrouchFiring",Dance:"Dance",RunAndGun:"RunAndGun",RunningHysteric:"RunningHysteric"},function(e){e[e.tower=8]="tower",e[e.barrier=9]="barrier",e[e.enemy=10]="enemy",e[e.cube1=11]="cube1",e[e.cube2=12]="cube2",e[e.cube3=13]="cube3"}(B||(B={}));class D{static get Instance(){return this.instance||(this.instance=new D)}Init(e,t){this.startPosTra=t.transform,e&&(this._camer=e,this.cameraBehavior=this._camer.addComponent(St),this.cameraBehavior.Init())}SetCamState(e,t){this.cameraBehavior&&this.cameraBehavior.SetCameraByState(e,t)}CameraMoveIngame(e){this.cameraBehavior&&this.cameraBehavior.MoveGame(e)}}class z{constructor(){this.tarDis=100,this.buildArr=[]}static get Instance(){return this.instance||(this.instance=new z)}Init(e){this.buildArr.push(e.getChildAt(1)),this.buildArr.push(e.getChildAt(0))}SetBuild(){for(let e=this.buildArr.length-1;e>=0;e--){this.buildArr[e].transform.localPositionZ=100*(1-e)}this.tarDis=70}CheckPlayerRoadPos(e){this.tarDis-e>0||this.SwitchRoad()}SwitchRoad(){let e=this.buildArr.pop();e.transform.localPositionZ=this.tarDis+30+100,this.buildArr.unshift(e),this.tarDis=this.tarDis+100}}class G{constructor(){this.road_list=[],this.fail_gold=0}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 E{static get Instance(){return E.instance||(E.instance=new E)}SetLevel(e){let i=d.Instance._level.length,s=m.Instance.stage;m.Instance.stage>i&&(s=t.randomInt(1,i)),this.curLevelData=d.Instance.GetLevel(s),this._level||(this._level=new G),this._level.SetLevel(this.curLevelData)}}class H{static get Instance(){return this.instance||(this.instance=new H)}constructor(){this.towerDic=new l}Init(e){this.towerContainer=e}CreateTower(e){let t=M.Instance.SetActiveObject(M.pooltype.Tower);if(!t)return;this.towerContainer.addChild(t);let i=t.getComponent(nt);i||(i=t.addComponent(nt)),i.SetTower(e),this.towerDic.set(t.id,i)}RemoveTower(e){this.towerDic.delete(e.id)}CreateHpText(){return M.Instance.SetActiveForUi(k.HpText)}Reset(){let e=[];for(const t in this.towerDic.container)e.push(t);if(e.length>0)for(let t=0;t<e.length;t++){const i=e[t];let s=this.towerDic.get(i);s&&s.Des()}console.log("this.towerDic.size",this.towerDic.size)}}class O{static WorldToScreen2(e,t){var i=this.InverseTransformPoint(e.transform,t).z,s=new Laya.Vector3;return e.viewport.project(t,e.projectionViewMatrix,s),new Laya.Vector3(s.x/Laya.stage.clientScaleX,s.y/Laya.stage.clientScaleY,i)}static ScreenToWorld(e,t){var i=.5*e.fieldOfView*Math.PI/180;let s=t.z*Math.tan(i),a=s*e.aspectRatio,n=this.GetLowerLeft(e.transform,t.z,a,s),o=this.GetScreenScale(a,s);var r=new Laya.Vector3,l=this.InverseTransformPoint(e.transform,n);return r=new Laya.Vector3(-t.x/o.x,t.y/o.y,0),Laya.Vector3.add(l,r,r),r=this.TransformPoint(e.transform,r)}static GetScreenScale(e,t){var i=new Laya.Vector3;return i.x=Laya.stage.width/e/2,i.y=Laya.stage.height/t/2,i}static GetLowerLeft(e,t,i,s){var a=new Laya.Vector3,n=new Laya.Vector3;e.getRight(n),Laya.Vector3.normalize(n,n);var o=new Laya.Vector3(n.x*i,n.y*i,n.z*i);Laya.Vector3.add(e.position,o,a);var r=new Laya.Vector3;e.getUp(r),Laya.Vector3.normalize(r,r);var l=new Laya.Vector3(r.x*s,r.y*s,r.z*s);Laya.Vector3.subtract(a,l,a);var h=new Laya.Vector3;e.getForward(h),Laya.Vector3.normalize(h,h);var c=new Laya.Vector3(h.x*t,h.y*t,h.z*t);return Laya.Vector3.subtract(a,c,a),a}static InverseTransformPoint(e,t){var i=new Laya.Vector3;e.getRight(i);var s=new Laya.Vector3;e.getUp(s);var a=new Laya.Vector3;e.getForward(a);var n=new Laya.Vector3(-a.x,-a.y,-a.z),o=this.ProjectDistance(t,e.position,i),r=this.ProjectDistance(t,e.position,s),l=this.ProjectDistance(t,e.position,n);return new Laya.Vector3(o,r,l)}static TransformPoint(e,t){var i=new Laya.Vector3;return Laya.Vector3.transformQuat(t,e.rotation,i),Laya.Vector3.add(i,e.position,i),i}static ProjectDistance(e,t,i){var s=new Laya.Vector3;Laya.Vector3.subtract(e,t,s);var a=this.Angle2(s,i)*Math.PI/180,n=Laya.Vector3.distance(e,t);return n*=Math.cos(a)}static Angle2(e,t){var i=(e.x*t.x+e.y*t.y+e.z*t.z)/(Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z)*Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z));return i<-1&&(i=-1),i>1&&(i=1),180*Math.acos(i)/Math.PI}}class P{constructor(){this.hitmaxcount=0,this.boommaxcount=0}static get Instance(){return P.instance||(P.instance=new P)}CreateHitEffect(e){if(this.hitmaxcount>=g.hitmaxcount)return;let t=M.Instance.SetActiveObject("hit");t.transform.position=e,Lt.Instance.effectCon.addChild(t),this.hitmaxcount++,Laya.timer.once(800,this,this.DisSpH,[t],!1)}DisSpH(e){M.Instance.SetDisableObject(e),this.hitmaxcount--}CreateBoomEffect(e){if(this.boommaxcount>=g.boommaxcount)return;let t=M.Instance.SetActiveObject("boom");t.transform.position=e,Lt.Instance.effectCon.addChild(t),this.boommaxcount++,Laya.timer.once(800,this,this.DisSpB,[t],!1)}DisSpB(e){M.Instance.SetDisableObject(e),this.boommaxcount--}CreateXueEffect(e){let t=M.Instance.SetActiveObject("xue");t.transform.position=e,Lt.Instance.effectCon.addChild(t),Laya.timer.once(800,this,this.DisSpX,[t],!1)}DisSpX(e){M.Instance.SetDisableObject(e)}}P.effectName={hit:"hit",xue:"xue",boom:"boom"};var N=Laya.Event,F=Laya.MouseManager;class V{constructor(){this._switch=!1,this._isCanClick=!0,this.clickD=!1,this._mousePos=U.VecZero,this.tempMouse=U.VecZero,this.clickCount=0}static get Instance(){return this.instance||(this.instance=new V)}InitMouseEvent(){Laya.stage.on(N.MOUSE_DOWN,this,this.OnClickDown),Laya.stage.on(N.MOUSE_OUT,this,this.OnClickUp)}OnClickDown(e){this._isCanClick&&this._switch&&(e.target instanceof Laya.UIComponent||(this.clickD=!0,Laya.stage.on(N.MOUSE_UP,this,this.OnClickUp),Laya.stage.on(N.MOUSE_MOVE,this,this.OnSlider),this._mousePos.x=F.instance.mouseX,this._mousePos.y=F.instance.mouseY,this.MouseD()))}StartGameClick(){this._switch=!0,this._isCanClick&&(this.clickD=!0,Laya.stage.on(N.MOUSE_UP,this,this.OnClickUp),Laya.stage.on(N.MOUSE_MOVE,this,this.OnSlider),this._mousePos.x=F.instance.mouseX,this.MouseD())}MouseD(){It.Instance.SetPlayerPos(this._mousePos.x),It.Instance.CreateBullet()}OnClickUp(e){this._isCanClick&&this._switch&&this.clickD&&this.MouseU()}OffMouseEvent(){Laya.stage.off(N.MOUSE_DOWN,this,this.OnClickDown),Laya.stage.off(N.MOUSE_UP,this,this.OnClickUp),Laya.stage.off(N.MOUSE_OUT,this,this.OnClickUp)}MouseU(){this.clickD=!1,Laya.stage.off(N.MOUSE_MOVE,this,this.OnSlider),Laya.stage.off(N.MOUSE_UP,this,this.OnClickUp)}OnSlider(e){this.tempMouse.x=F.instance.mouseX;let t=this.tempMouse.x-this._mousePos.x;t>=0&&(t=t<20?t:20),t<0&&(t=t>-20?t:-20),It.Instance.SliderPlayer(-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}}class W extends Laya.Script3D{constructor(){super(...arguments),this.rotate=U.VecZero,this.speed=U.VecZero}onAwake(){this.selfobj=this.owner,this.tran=this.selfobj.transform}SetBlock(e){this.tran.localPositionZ=Number(e.z),this.tran.localPositionX=Number(e.x),this.tran.rotationEuler=U.VecZero,this.thing=e,It.Instance.player&&(this.tarTran=It.Instance.player.transform,this.SetDate())}SetDate(){5==this.thing.type?this.ttttt=this.selfobj.getChildAt(0).transform:(this.ttttt=this.tran,4==this.thing.type&&$.Instance.AddCubeBlock(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.Move2)):3==this.thing.moveType?(this.rotate.x=0,this.rotate.y=this.thing.moveSpeed,this.rotate.z=0,Laya.timer.frameLoop(2,this,this.Move2)):4==this.thing.moveType?(this.rotate.x=0,this.rotate.y=0,this.rotate.z=this.thing.moveSpeed,Laya.timer.frameLoop(1,this,this.Move3)):5==this.thing.moveType?(this.rotate.x=0,this.rotate.y=0,this.rotate.z=-this.thing.moveSpeed,Laya.timer.frameLoop(1,this,this.Move3)):6==this.thing.moveType?(this.speed.x=-this.thing.moveSpeed,this.speed.y=0,this.speed.z=0,Laya.timer.frameLoop(1,this,this.Move4)):7==this.thing.moveType?(this.speed.x=this.thing.moveSpeed,this.speed.y=0,this.speed.z=0,Laya.timer.frameLoop(1,this,this.Move4)):8==this.thing.moveType||this.thing.moveType:Laya.timer.frameLoop(3,this,this.Cheack)}Move2(){this.ttttt.rotate(this.rotate),this.Cheack()}Move3(){this.ttttt.rotate(this.rotate),Math.abs(this.ttttt.localRotationEulerZ)>=50&&(this.rotate.z=-this.rotate.z),this.Cheack()}Move4(){this.ttttt.translate(this.speed),Math.abs(this.ttttt.localPositionX)>=g.blockLRmoveMaxDis&&(this.speed.x=-this.speed.x),this.Cheack()}Cheack(){if(this.tarTran.localPositionZ-this.tran.localPositionZ>=10)return console.log("回收block",this.selfobj.name),void this.Des()}Des(){this.thing.type&&$.Instance.ResetCubBlock(this.selfobj.id),Laya.timer.clearAll(this),$.Instance.RemoveBlock(this.selfobj),M.Instance.SetDisableObject(this.selfobj)}onDestroy(){}}var Y,X=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:"gameRes1/zhujiemian-1-20.png",right:0,left:0,bottom:0,alpha:.8,sizeGrid:"18,18,15,19"},compId:3},{type:"Box",props:{x:52,width:636,height:538,centerY:-41},compId:4,child:[{type:"Image",props:{top:0,skin:"gameRes1/d0bg-shengji.png",right:0,left:0,bottom:0,sizeGrid:"13,14,14,15"},compId:31,child:[{type:"Image",props:{y:-43,x:134,skin:"gameRes1/aasudu-bg-2 (2).png"},compId:32}]},{type:"Button",props:{y:116,x:342,var:"rateBtn",stateNum:1,skin:"gameRes1/aasudu-bg-2 (1).png"},compId:34,child:[{type:"Image",props:{y:19,x:44,skin:"gameRes1/aasudu-bg-2 (5).png"},compId:35},{type:"Image",props:{y:124,x:11,var:"_rate",stateNum:1,skin:"gameRes1/aasudu-bg-2 (8).png"},compId:36,child:[{type:"Image",props:{y:9,x:3,skin:"gameRes1/aasudu-bg-2 (9).png"},compId:37},{type:"Image",props:{y:13,x:57,skin:"gameRes1/aasudu-bg-2 (6).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:11,visible:!1,var:"_rateVideo",stateNum:1,skin:"gameRes1/aasudu-bg-2 (8).png"},compId:41,child:[{type:"Image",props:{y:9,x:3,skin:"gameRes1/aasudu-bg-2 (9).png"},compId:42},{type:"Image",props:{y:12,x:117,skin:"gameRes1/aasudu-bg-2 (10).png"},compId:43}]},{type:"Image",props:{y:154,x:137,var:"click2",skin:"gameRes1/shou.png",anchorX:.5},compId:49}]},{type:"Button",props:{y:116,x:46,var:"atkBtn",stateNum:1,skin:"gameRes1/aasudu-bg-2 (3).png"},compId:5,child:[{type:"Image",props:{y:19,x:66,skin:"gameRes1/aasudu-bg-2 (4).png"},compId:10},{type:"Image",props:{y:124,x:11,var:"_atk",stateNum:1,skin:"gameRes1/aasudu-bg-2 (8).png"},compId:13,child:[{type:"Image",props:{y:9,x:3,skin:"gameRes1/aasudu-bg-2 (9).png"},compId:33},{type:"Image",props:{y:13,x:57,skin:"gameRes1/aasudu-bg-2 (6).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:11,visible:!1,var:"_atkVideo",stateNum:1,skin:"gameRes1/aasudu-bg-2 (8).png"},compId:45,child:[{type:"Image",props:{y:9,x:3,skin:"gameRes1/aasudu-bg-2 (9).png"},compId:46},{type:"Image",props:{y:12,x:117,skin:"gameRes1/aasudu-bg-2 (10).png"},compId:47}]},{type:"Image",props:{y:154.5,x:137,var:"click1",skin:"gameRes1/shou.png",anchorX:.5},compId:48}]},{type:"Image",props:{y:426,x:209,var:"backBtn",skin:"gameRes1/aasudu-bg-2 (7).png",runtime:"Window/Com/ButtonRunTime.ts",centerY:180},compId:8}]}],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}],loadList:["gameRes1/zhujiemian-1-20.png","gameRes1/d0bg-shengji.png","gameRes1/aasudu-bg-2 (2).png","gameRes1/aasudu-bg-2 (1).png","gameRes1/aasudu-bg-2 (5).png","gameRes1/aasudu-bg-2 (8).png","gameRes1/aasudu-bg-2 (9).png","gameRes1/aasudu-bg-2 (6).png","gameRes1/aasudu-bg-2 (10).png","gameRes1/shou.png","gameRes1/aasudu-bg-2 (3).png","gameRes1/aasudu-bg-2 (4).png","gameRes1/aasudu-bg-2 (7).png"],loadList3D:[]},e.DefeatGradeUiUI=t,X("ui.DefeatGradeUiUI",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,loadList:[],loadList3D:[]},e.GameUiUI=i,X("ui.GameUiUI",i);class s extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(s.uiView)}}s.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"gameRes1/111111.png",right:0,left:0,bottom:0,alpha:.8,sizeGrid:"22,12,11,12"},compId:3},{type:"Box",props:{x:52,width:636,height:626,centerY:-18},compId:4,child:[{type:"Image",props:{y:0,x:0,width:636,var:"atkBox",skin:"gameRes1/11.png",height:185,sizeGrid:"21,22,21,22"},compId:5,child:[{type:"Image",props:{y:43,x:183,skin:"gameRes1/gongji-2.png"},compId:10},{type:"Image",props:{y:43,x:34,skin:"gameRes1/gongji-icon.png"},compId:9},{type:"Image",props:{y:125,x:179,skin:"gameRes1/gongji-1.png"},compId:11},{type:"Button",props:{y:89,x:412,var:"atkBtn",stateNum:1,skin:"gameRes1/lv-di.png"},compId:13,child:[{type:"Image",props:{y:13,x:12,width:45,skin:"gameRes1/jinbi.png",height:45},compId:14,child:[{type:"Text",props:{y:2,x:47,width:134,var:"atkValue",valign:"middle",text:"800",height:41,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:16}]}]},{type:"Text",props:{y:31,x:449,width:106,var:"atkLv",valign:"middle",text:"LV8",height:41,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:12}]},{type:"Image",props:{y:226,x:0,width:636,var:"rateBox",skin:"gameRes1/11.png",height:185,sizeGrid:"21,22,21,22"},compId:6,child:[{type:"Image",props:{y:43,x:161,skin:"gameRes1/sudu-2.png"},compId:17},{type:"Image",props:{y:43,x:34,skin:"gameRes1/iconqiang.png"},compId:18},{type:"Image",props:{y:125,x:164,skin:"gameRes1/sudu-1(1).png"},compId:19},{type:"Button",props:{y:89,x:412,var:"rateBtn",stateNum:1,skin:"gameRes1/lv-di.png"},compId:20,child:[{type:"Image",props:{y:13,x:12,width:45,skin:"gameRes1/jinbi.png",height:45},compId:22,child:[{type:"Text",props:{y:2,x:47,width:134,var:"rateValue",valign:"middle",text:"800",height:41,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:23}]}]},{type:"Text",props:{y:31,x:449,width:106,var:"rateLv",valign:"middle",text:"LV8",height:41,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:21}]},{type:"Image",props:{y:444,x:0,width:636,visible:!0,var:"coinBox",skin:"gameRes1/11.png",height:185,sizeGrid:"21,22,21,22"},compId:7,child:[{type:"Image",props:{y:43,x:161,skin:"gameRes1/huode.png"},compId:24},{type:"Image",props:{y:43,x:34,skin:"gameRes1/jinbi (2).png"},compId:25},{type:"Image",props:{y:125,x:156,skin:"gameRes1/tishengjinbi3.png"},compId:26},{type:"Button",props:{y:57,x:412,var:"coinBtn",stateNum:1,skin:"gameRes1/lv-di.png"},compId:27,child:[{type:"Image",props:{y:13,x:12,width:45,skin:"gameRes1/shipin-icon.png",height:45},compId:29,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:30}]}]}]}]},{type:"Image",props:{x:17,var:"backBtn",skin:"gameRes1/p__fanhui.png",runtime:"Window/Com/ButtonRunTime.ts",centerY:-436},compId:8},{type:"Image",props:{x:290,skin:"gameRes1/shengji.png",centerY:-478},compId:31}],loadList:["gameRes1/111111.png","gameRes1/11.png","gameRes1/gongji-2.png","gameRes1/gongji-icon.png","gameRes1/gongji-1.png","gameRes1/lv-di.png","gameRes1/jinbi.png","gameRes1/sudu-2.png","gameRes1/iconqiang.png","gameRes1/sudu-1(1).png","gameRes1/huode.png","gameRes1/jinbi (2).png","gameRes1/tishengjinbi3.png","gameRes1/shipin-icon.png","gameRes1/p__fanhui.png","gameRes1/shengji.png"],loadList3D:[]},e.GradeUiUI=s,X("ui.GradeUiUI",s);class a extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(a.uiView)}}a.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:"gameRes1/zzzzzzguangquan(1).png"},compId:8},{type:"Image",props:{y:-123,x:2,skin:"gameRes1/zzzzz1.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:"gameRes1/zzzzzuoyou-jiantou(1).png",rotation:180,pivotY:48,height:96},compId:12},{type:"Image",props:{y:15,x:181,skin:"gameRes1/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:"gameRes1/zzzzzuoyou-jiantou(1).png",pivotY:48,height:96},compId:14},{type:"Image",props:{y:6,x:-17,width:61,skin:"gameRes1/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:"gameRes1/zzzzz1.png"},compId:21}]},{type:"Image",props:{x:203,var:"guide1Image",skin:"gameRes1/zzzzbiaoyu(2).png",bottom:213},compId:16},{type:"Image",props:{x:164,var:"guide2Image",skin:"gameRes1/zzzzbiaoyu(1).png",bottom:218},compId:17},{type:"Image",props:{x:136,var:"guide3Image",skin:"gameRes1/zzzzbiaoyu.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:["gameRes1/zzzzzzguangquan(1).png","gameRes1/zzzzz1.png","gameRes1/zzzzzuoyou-jiantou(1).png","gameRes1/shou.png","gameRes1/zzzzbiaoyu(2).png","gameRes1/zzzzbiaoyu(1).png","gameRes1/zzzzbiaoyu.png"],loadList3D:[]},e.GuideUiUI=a,X("ui.GuideUiUI",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:{var:"bg",top:0,skin:"load/bg.jpg",right:0,name:"bg",left:0,bottom:0},compId:6},{type:"Image",props:{x:360,var:"prepan",centerY:-68},compId:14},{type:"Image",props:{y:124,x:52,skin:"load/logo.png",centerY:-360},compId:17},{type:"Image",props:{y:932,x:137,var:"pro",skin:"load/jindu-1.png",centerY:309},compId:20,child:[{type:"Image",props:{y:4,x:4,width:438,var:"pro1",skin:"load/jindu-2.png"},compId:21},{type:"Image",props:{y:52,x:174,skin:"load/jiazai-1-2.png"},compId:8,child:[{type:"Image",props:{x:105,width:6,skin:"load/jiazai-1-3.png",height:6,bottom:9},compId:9},{type:"Image",props:{x:120,skin:"load/jiazai-1-3.png",bottom:10},compId:10},{type:"Image",props:{x:136,skin:"load/jiazai-1-3.png",bottom:10},compId:11}]},{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}]}],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.jpg","load/logo.png","load/jindu-1.png","load/jindu-2.png","load/jiazai-1-2.png","load/jiazai-1-3.png"],loadList3D:[]},e.LoadUiUI=n,X("ui.LoadUiUI",n);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,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:"gameRes1/jindu-duan.png"},compId:302,child:[{type:"Image",props:{y:4,x:0,var:"pro1",skin:"gameRes1/jindu-guan-do.png"},compId:305},{type:"Image",props:{y:-11,x:-49,skin:"gameRes1/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:"gameRes1/shadi.png"},compId:304}]},{type:"Image",props:{x:533,width:187,top:85,skin:"gameRes1/jinbi-bg.png",right:0},compId:261,child:[{type:"Image",props:{y:11,x:5,skin:"gameRes1/jinbi.png"},compId:262},{type:"Text",props:{y:6,x:41,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:"Button",props:{var:"coutiBtn",stateNum:1,skin:"gameRes1/Begin-gengduoyouxi.png",left:0,centerY:0},compId:294},{type:"Image",props:{x:24,var:"settingBtn",top:154,skin:"gameRes1/setBtn.png",runtime:"Window/Com/ButtonRunTime.ts"},compId:260},{type:"Box",props:{x:29,width:63,visible:!1,var:"settingBox",top:238,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:"gameRes1/ButtonVibrationOn.png",name:"kai"},compId:287},{type:"Image",props:{y:0,x:0,visible:!1,skin:"gameRes1/ButtonVibrationOff.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:"gameRes1/Icon_SoundOn.png",name:"kai"},compId:289},{type:"Image",props:{y:0,x:0,visible:!1,skin:"gameRes1/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:"gameRes1/updateBtn.png",runtime:"Window/Com/ButtonRunTime.ts",left:0,bottom:0},compId:257},{type:"Image",props:{var:"skinBtn",skin:"gameRes1/skinBtn.png",runtime:"Window/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:"Button",props:{var:"moreGameBtn",stateNum:1,skin:"youziTexture/btn-entrance-nogift.png",left:587,centerY:133},compId:311}]},{type:"Image",props:{x:195,var:"sliderBox",skin:"gameRes1/huadong-tiao.png",gray:!1,bottom:304},compId:253,child:[{type:"Image",props:{y:-45,x:95,skin:"gameRes1/huadong.png"},compId:292},{type:"Image",props:{y:0,x:164,skin:"gameRes1/shou.png",anchorX:.5},compId:293}]},{type:"Sprite",props:{var:"duohuituiSp"},compId:312},{type:"Sprite",props:{y:0,x:0,var:"bannerHuiTuiSp"},compId:313}],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}]}},{target:292,keyframes:{x:[{value:0,tweenMethod:"linearNone",tween:!0,target:292,key:"x",index:0}],skin:[{value:"gameRes1/pause1.png",tweenMethod:"linearNone",tween:!1,target:292,key:"skin",index:0}]}}],name:"gameStart",id:1,frameRate:24,action:2}],loadList:["gameRes1/jindu-duan.png","gameRes1/jindu-guan-do.png","gameRes1/guanshu.png","gameRes1/shadi.png","gameRes1/jinbi-bg.png","gameRes1/jinbi.png","gameRes1/Begin-gengduoyouxi.png","gameRes1/setBtn.png","gameRes1/ButtonVibrationOn.png","gameRes1/ButtonVibrationOff.png","gameRes1/Icon_SoundOn.png","gameRes1/Icon_SoundOff.png","gameRes1/updateBtn.png","gameRes1/skinBtn.png","youziTexture/btn-entrance-nogift.png","gameRes1/huadong-tiao.png","gameRes1/huadong.png","gameRes1/shou.png","gameRes1/pause1.png"],loadList3D:[]},e.MainUiUI=o,X("ui.MainUiUI",o);class r extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(r.uiView)}}r.uiView={type:"View",props:{width:720,height:1280},compId:2,loadList:[],loadList3D:[]},e.MaskUiUI=r,X("ui.MaskUiUI",r);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:"Image",props:{top:0,skin:"gameRes1/zhujiemian-1-20.png",right:0,left:0,bottom:0,alpha:.9,sizeGrid:"18,18,15,19"},compId:22},{type:"Box",props:{x:178,width:364,var:"winbtnBox",height:226,bottom:292},compId:47,child:[{type:"Image",props:{x:130,var:"nextBtn",skin:"gameRes1/no.png",runtime:"Window/Com/ButtonRunTime.ts",bottom:0},compId:46},{type:"Image",props:{y:0,x:9,var:"doublegetBtn",skin:"gameRes1/sanbei-bt.png",runtime:"Window/Com/ButtonRunTime.ts"},compId:28},{type:"Image",props:{y:74,x:33,skin:"gameRes1/jinbi-da.png"},compId:66,child:[{type:"Text",props:{y:3,x:81,width:218,var:"doubleText",valign:"middle",text:"50",strokeColor:"#714800",stroke:2,height:71,fontSize:56,color:"#bc3e01",bold:!0,align:"center",runtime:"laya.display.Text"},compId:67}]}]},{type:"Image",props:{x:80,var:"shibaiTop",skin:"gameRes1/shibai.png",centerY:-481},compId:68},{type:"Image",props:{x:92,var:"winTop",skin:"gameRes1/win-biao.png",centerY:-481},compId:44},{type:"Image",props:{x:238,width:60,skin:"gameRes1/jinbi-da.png",height:60,centerY:82},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:{y:258,x:138,width:444,height:429,centerY:-168},compId:71,child:[{type:"Image",props:{y:0,x:0,width:444,skin:"gameRes1/zhengchang-di.png",height:100,sizeGrid:"17,31,12,28"},compId:72,child:[{type:"Image",props:{y:31,x:52,skin:"gameRes1/jianxingzhuang.png"},compId:73},{type:"Image",props:{y:31,x:343,skin:"gameRes1/jianxingzhuang.png"},compId:74},{type:"Image",props:{y:31,x:177,skin:"gameRes1/jiangli.png"},compId:75}]},{type:"Image",props:{y:107,x:0,width:444,skin:"gameRes1/zhengchang-di.png",height:100,sizeGrid:"17,31,12,28"},compId:76,child:[{type:"Image",props:{y:18,x:26,skin:"gameRes1/baolei.png"},compId:80},{type:"Image",props:{y:25,x:384,width:50,skin:"gameRes1/jinbi-da.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:"#ffffff",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:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:81}]},{type:"Image",props:{y:214,x:0,width:444,skin:"gameRes1/zhengchang-di.png",height:100,sizeGrid:"17,31,12,28"},compId:84,child:[{type:"Image",props:{y:18,x:26,skin:"gameRes1/rentu.png"},compId:85},{type:"Image",props:{y:25,x:384,width:50,skin:"gameRes1/jinbi-da.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:"#ffffff",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:"#ffffff",bold:!0,align:"right",runtime:"laya.display.Text"},compId:87}]},{type:"Image",props:{y:321,x:0,width:444,skin:"gameRes1/zhengchang-di.png",height:100,sizeGrid:"17,31,12,28"},compId:89,child:[{type:"Image",props:{y:18,x:26,skin:"gameRes1/baohe.png"},compId:90},{type:"Image",props:{y:25,x:384,width:50,skin:"gameRes1/jinbi-da.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:"#ffffff",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:"#ffffff",bold:!0,align:"right",runtime:"laya.display.Text"},compId:92}]}]},{type:"Sprite",props:{y:0,x:0,var:"duohuituiSp"},compId:94},{type:"Sprite",props:{y:0,x:0,var:"bannerHuiTuiSp"},compId:95}],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}],loadList:["gameRes1/zhujiemian-1-20.png","gameRes1/no.png","gameRes1/sanbei-bt.png","gameRes1/jinbi-da.png","gameRes1/shibai.png","gameRes1/win-biao.png","gameRes1/zhengchang-di.png","gameRes1/jianxingzhuang.png","gameRes1/jiangli.png","gameRes1/baolei.png","gameRes1/rentu.png","gameRes1/baohe.png"],loadList3D:[]},e.ResultUiUI=l,X("ui.ResultUiUI",l);class h extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(h.uiView)}}h.uiView={type:"View",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"gameRes1/sssdi-3.png",right:0,left:0,bottom:0},compId:3},{type:"Image",props:{x:17,var:"backBtn",skin:"gameRes1/pppguanbi-bt.png",runtime:"Window/Com/ButtonRunTime.ts",centerY:-529},compId:87},{type:"Image",props:{skin:"gameRes1/ppppifu-biaoti.png",centerY:-399},compId:92},{type:"Box",props:{x:50,width:626,height:102,centerY:-70},compId:100,child:[{type:"Button",props:{width:102,var:"leftBtn",stateNum:1,height:102},compId:93,child:[{type:"Image",props:{y:3,x:3,skin:"gameRes1/pppwu-zuo.png",name:"leftFalse"},compId:95},{type:"Image",props:{y:3,x:3,skin:"gameRes1/pppyou-zuo.png",name:"leftTrue"},compId:96}]},{type:"Button",props:{x:521,width:102,var:"rightBtn",stateNum:1,height:102},compId:97,child:[{type:"Image",props:{y:3,x:3,skin:"gameRes1/pppwu-you.png",name:"rightFalse"},compId:98},{type:"Image",props:{y:3,x:3,skin:"gameRes1/pppyou-you.png",name:"rightTrue"},compId:99}]}]},{type:"Image",props:{y:813,x:167,skin:"gameRes1/sssren-di-2.png",centerY:227},compId:101},{type:"Image",props:{y:469,x:209,width:302,var:"viewPort",height:398,centerY:28},compId:102},{type:"Box",props:{x:196,width:331,var:"btnBox",height:127,centerY:396},compId:113,child:[{type:"Image",props:{var:"using",skin:"gameRes1/pppbt-bg.png"},compId:103,child:[{type:"Text",props:{y:31,x:63,width:202,valign:"middle",text:"使用中",height:65,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:104}]},{type:"Image",props:{var:"use",skin:"gameRes1/pppbt-bg.png",runtime:"Window/Com/ButtonRunTime.ts"},compId:105,child:[{type:"Text",props:{y:31,x:63,width:202,valign:"middle",text:"使用",height:65,fontSize:48,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:106}]},{type:"Image",props:{var:"coin",skin:"gameRes1/pppbt-bg.png",runtime:"Window/Com/ButtonRunTime.ts"},compId:107,child:[{type:"Image",props:{y:22,x:25,skin:"gameRes1/jinbi-da.png"},compId:109,child:[{type:"Text",props:{y:8,x:63,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:{var:"video",skin:"gameRes1/pppbt-bg.png",runtime:"Window/Com/ButtonRunTime.ts"},compId:110,child:[{type:"Image",props:{y:33,x:54,width:65,skin:"gameRes1/aasudu-bg-2 (10).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:["gameRes1/sssdi-3.png","gameRes1/pppguanbi-bt.png","gameRes1/ppppifu-biaoti.png","gameRes1/pppwu-zuo.png","gameRes1/pppyou-zuo.png","gameRes1/pppwu-you.png","gameRes1/pppyou-you.png","gameRes1/sssren-di-2.png","gameRes1/pppbt-bg.png","gameRes1/jinbi-da.png","gameRes1/aasudu-bg-2 (10).png"],loadList3D:[]},e.SkinUiUI=h,X("ui.SkinUiUI",h);class c extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(c.uiView)}}c.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{var:"bg",top:0,skin:"gameRes1/zhujiemian-1-20.png",right:0,left:0,bottom:0,alpha:0,sizeGrid:"18,18,15,19"},compId:3},{type:"Image",props:{y:647,x:159,width:402,var:"sliderBox",skin:"gameRes1/huadong-tiao.png",height:33,gray:!1,centerY:23},compId:4,child:[{type:"Image",props:{y:124,x:37,skin:"gameRes1/pause1.png"},compId:5},{type:"Image",props:{y:0,x:201,skin:"gameRes1/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:["gameRes1/zhujiemian-1-20.png","gameRes1/huadong-tiao.png","gameRes1/pause1.png","gameRes1/shou.png"],loadList3D:[]},e.TopTipUiUI=c,X("ui.TopTipUiUI",c);class d extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(d.uiView)}}d.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"gameRes1/zhujiemian-1-20.png",right:0,left:0,bottom:0,sizeGrid:"18,18,15,19"},compId:3},{type:"Image",props:{x:125,skin:"gameRes1/sssbiaoti.png",centerY:-503},compId:4},{type:"Image",props:{x:104,visible:!1,skin:"gameRes1/sssdi-3.png",centerY:-100},compId:5},{type:"Image",props:{x:167,skin:"gameRes1/sssren-di-2.png",centerY:85},compId:6},{type:"Image",props:{x:209,width:302,var:"viewPort",height:398,centerY:-108},compId:8},{type:"Image",props:{x:245,skin:"gameRes1/x3.png",centerY:-374},compId:12},{type:"Box",props:{x:196,width:325,var:"btnBox",height:191,bottom:289},compId:11,child:[{type:"Image",props:{y:145,x:92,var:"backBtn",skin:"gameRes1/sssno-bt.png",runtime:"Window/Com/ButtonRunTime.ts"},compId:9},{type:"Image",props:{var:"videoBtn",skin:"gameRes1/sssbt.png",runtime:"Window/Com/ButtonRunTime.ts"},compId:10}]}],loadList:["gameRes1/zhujiemian-1-20.png","gameRes1/sssbiaoti.png","gameRes1/sssdi-3.png","gameRes1/sssren-di-2.png","gameRes1/x3.png","gameRes1/sssno-bt.png","gameRes1/sssbt.png"],loadList3D:[]},e.TryOutUiUI=d,X("ui.TryOutUiUI",d)}(Y||(Y={})),function(e){!function(e){class t extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(t.uiView)}}t.uiView={type:"View",props:{width:720,visible:!1,name:"YouziBottomView",height:170},compId:2,child:[{type:"Sprite",props:{y:0,x:0,width:720,visible:!1,var:"BannerBottomUI",sizeGrid:"12,10,0,10",height:170},compId:3,child:[{type:"Image",props:{y:0,x:0,width:720,var:"bannerBottomBg",skin:"youziTexture/two_round_corner.png",sizeGrid:"10,12,5,12",height:170},compId:4},{type:"Image",props:{y:37.5,x:14,skin:"youziTexture/txt_hotgame_v.png",name:"bannerTitle"},compId:5},{type:"List",props:{y:20,x:47,width:670,var:"bottomList",spaceY:5,spaceX:24,repeatY:1,repeatX:4,height:150},compId:6,child:[{type:"Box",props:{y:0,x:0,width:110,renderType:"render",name:"render",height:150},compId:7,child:[{type:"Animation",props:{y:0,x:0,width:110,visible:!1,name:"iconAnima",height:110},compId:13},{type:"Image",props:{y:0,x:0,width:110,name:"icon",height:110},compId:8},{type:"Label",props:{y:130,x:55,text:"弹弹欢乐球",name:"namelab",fontSize:20,color:"#ffffff",anchorY:.5,anchorX:.5,align:"center"},compId:9}]}]}]}],loadList:["youziTexture/two_round_corner.png","youziTexture/txt_hotgame_v.png"],loadList3D:[]},e.Youzi_BottomBannerUI=t,X("ui.youzi.Youzi_BottomBannerUI",t);class i extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(i.uiView)}}i.uiView={type:"Scene",props:{width:720,name:"YouziFriendInviteGame",height:1280},compId:2,child:[{type:"Button",props:{width:3e3,var:"noTouch",stateNum:1,skin:"youziTexture/blank.png",height:3e3,centerY:0,centerX:0},compId:3},{type:"Image",props:{width:500,var:"Bg",skin:"youziTexture/icon_bg.png",sizeGrid:"7,7,7,7",height:250,centerY:0,centerX:0},compId:5,child:[{type:"WXOpenDataViewer",props:{y:3,x:0,width:500,var:"playerContent",iconSign:"wx",height:160,runtime:"laya.ui.WXOpenDataViewer"},compId:6},{type:"Sprite",props:{y:170,x:0,width:500,height:2},compId:16,child:[{type:"Line",props:{y:0,x:0,toY:0,toX:500,lineWidth:2,lineColor:"#000000"},compId:12}]},{type:"Button",props:{y:170,x:0,width:500,var:"acceptBtn",stateNum:3,labelStrokeColor:"#225992",labelSize:40,labelColors:"#225992",label:"接 受",height:80},compId:10},{type:"Button",props:{y:277,x:195.5,width:109,var:"closeBtn",labelStrokeColor:"#ffffff",labelSize:36,labelColors:"#ffffff",label:"关 闭",height:41},compId:11}]}],loadList:["youziTexture/blank.png","youziTexture/icon_bg.png"],loadList3D:[]},e.Youzi_FriendInvite_GameUI=i,X("ui.youzi.Youzi_FriendInvite_GameUI",i);class s extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(s.uiView)}}s.uiView={type:"Scene",props:{width:720,name:"YouziFullMixBanner",height:1280},compId:2,child:[{type:"Sprite",props:{y:0,x:0,width:720,var:"FullMixBannerUI",height:1280},compId:39,child:[{type:"Image",props:{y:-560,x:-240,width:1200,var:"MaskBg",skin:"youziTexture/youzi_black.png",sizeGrid:"3,3,3,3",mouseEnabled:!1,height:2400},compId:18},{type:"Sprite",props:{y:0,x:0,width:720,var:"LineAndLabel",mouseEnabled:!1,height:1280},compId:22,child:[{type:"Line",props:{y:122,x:63,toY:0,toX:200,lineWidth:2,lineColor:"#ffffff"},compId:21},{type:"Line",props:{y:121,x:455,toY:0,toX:200,lineWidth:2,lineColor:"#ffffff"},compId:30},{type:"Line",props:{y:363,x:30,toY:0,toX:221.4,lineWidth:2,lineColor:"#ffffff"},compId:32},{type:"Line",props:{y:363,x:463,toY:0,toX:221.4,lineWidth:2,lineColor:"#ffffff"},compId:33},{type:"Box",props:{y:80,x:260,width:200,var:"Box_Label",height:320},compId:42,child:[{type:"Label",props:{y:28,x:36,valign:"middle",text:"好友在玩",overflow:"hidden",fontSize:32,color:"#ffffff",align:"center"},compId:31},{type:"Label",props:{y:269,x:36,valign:"middle",text:"热门推荐",fontSize:32,color:"#ffffff",align:"center"},compId:34}]}]},{type:"Button",props:{y:62,x:61,width:87,var:"CloseBtn",mouseEnabled:!0,height:37},compId:37,child:[{type:"Image",props:{y:0,x:0,width:32,skin:"youziTexture/fanhui.png",height:30},compId:36},{type:"Label",props:{y:10,x:41.5,visible:!0,valign:"middle",text:"返回",fontSize:20,color:"#ffffff",align:"center"},compId:35}]},{type:"Sprite",props:{y:162,x:40,width:640,var:"BannerUI",height:140},compId:3,child:[{type:"Image",props:{y:0,x:0,width:640,skin:"youziTexture/bg_small_wall.png",sizeGrid:"11,13,13,11",height:140},compId:5},{type:"List",props:{y:10,x:0,width:640,var:"BannerUIList",spaceX:15,repeatY:1,repeatX:4,height:120},compId:6,child:[{type:"Box",props:{y:0,x:12,width:120,renderType:"render",name:"render",height:120},compId:7,child:[{type:"Animation",props:{y:0,x:0,width:120,name:"iconAnima",height:120},compId:38},{type:"Image",props:{width:120,name:"icon",height:120},compId:8}]}]}]},{type:"Sprite",props:{y:408,x:18,width:685,var:"MixListUI",height:720},compId:4,child:[{type:"List",props:{width:685,var:"MixList",spaceY:18,spaceX:18,repeatY:3,repeatX:3,height:720},compId:9,child:[{type:"Box",props:{y:0,x:10,width:210,renderType:"render",name:"render",height:210},compId:11,child:[{type:"Image",props:{y:0,x:0,width:210,skin:"youziTexture/icon_bg.png",sizeGrid:"5,5,5,5",name:"boxBg",height:210},compId:12},{type:"Animation",props:{y:5,x:5,width:200,name:"iconAnima",height:200},compId:13},{type:"Image",props:{y:5,x:5,width:200,name:"icon",height:200},compId:14},{type:"Image",props:{y:159,x:5,width:200,skin:"youziTexture/blank.png",sizeGrid:"0,0,0,0",name:"namelabBG",height:46},compId:15},{type:"Image",props:{y:10,x:140,width:65,skin:"youziTexture/youzi_hotgame.png",name:"redhit",height:30},compId:16},{type:"Label",props:{y:159,x:5,width:200,valign:"middle",overflow:"hidden",name:"namelab",height:46,fontSize:24,color:"#ffffff",align:"center"},compId:17}]}]}]}]}],loadList:["youziTexture/youzi_black.png","youziTexture/fanhui.png","youziTexture/bg_small_wall.png","youziTexture/icon_bg.png","youziTexture/blank.png","youziTexture/youzi_hotgame.png"],loadList3D:[]},e.Youzi_FullMixBannerUI=s,X("ui.youzi.Youzi_FullMixBannerUI",s);class a extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(a.uiView)}}a.uiView={type:"View",props:{width:720,name:"YouziFullScreen",height:1280},compId:2,child:[{type:"Image",props:{y:-560,x:-240,width:1200,var:"BG",skin:"youziTexture/youzi_black.png",sizeGrid:"5,5,5,5",mouseEnabled:!1,height:2400},compId:3},{type:"Sprite",props:{y:0,x:0,width:720,visible:!1,var:"FullScreenUI",height:1280},compId:5,child:[{type:"Image",props:{y:57.5,x:258,skin:"youziTexture/youzi_full_title.png",name:"title"},compId:13},{type:"Button",props:{y:57.5,x:42,var:"closeFullScreen",stateNum:1,skin:"youziTexture/fanhui.png",gray:!0},compId:10},{type:"List",props:{y:140,x:17.5,width:685,var:"FullScreenList",spaceY:18,spaceX:18,repeatY:4,repeatX:3,height:1e3},compId:4,child:[{type:"Box",props:{x:10,width:210,renderType:"render",name:"render",height:210},compId:6,child:[{type:"Image",props:{y:0,x:0,width:210,skin:"youziTexture/icon_bg.png",sizeGrid:"5,5,5,5",name:"boxBg",height:210},compId:14},{type:"Animation",props:{y:5,x:5,width:200,name:"iconAnima",height:200},compId:12},{type:"Image",props:{y:5,x:5,width:200,name:"icon",height:200},compId:7},{type:"Image",props:{y:159,x:5,width:200,skin:"youziTexture/blank.png",sizeGrid:"0,0,0,0",name:"namelabBG",height:46},compId:9},{type:"Image",props:{y:10,x:140,width:65,skin:"youziTexture/youzi_hotgame.png",name:"redhit",height:30},compId:11},{type:"Label",props:{y:159,x:5,width:200,valign:"middle",overflow:"hidden",name:"namelab",height:46,fontSize:24,color:"#ffffff",align:"center"},compId:8}]}]}]}],loadList:["youziTexture/youzi_black.png","youziTexture/youzi_full_title.png","youziTexture/fanhui.png","youziTexture/icon_bg.png","youziTexture/blank.png","youziTexture/youzi_hotgame.png"],loadList3D:[]},e.Youzi_FullScreenUI=a,X("ui.youzi.Youzi_FullScreenUI",a);class n extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(n.uiView)}}n.uiView={type:"View",props:{width:1280,height:720},compId:2,child:[{type:"Image",props:{y:-240,x:-560,width:2400,var:"BG",skin:"youziTexture/youzi_black.png",sizeGrid:"5,5,5,5",mouseEnabled:!1,height:1200},compId:4},{type:"Sprite",props:{y:0,x:0,width:1280,visible:!1,var:"FullScreenUI",height:720},compId:3,child:[{type:"Image",props:{y:464,x:63,width:204,skin:"youziTexture/youzi_full_title.png",rotation:-90,name:"title",height:59},compId:14},{type:"Button",props:{y:657,x:63,width:49,var:"closeFullScreen",stateNum:1,skin:"youziTexture/fanhui.png",rotation:-90,height:43,gray:!0},compId:5},{type:"List",props:{y:20,x:165,width:1e3,var:"FullScreenList",spaceY:16,spaceX:18,repeatY:3,repeatX:4,height:680},compId:6,child:[{type:"Box",props:{y:220,x:0,width:210,rotation:-90,renderType:"render",name:"render",height:210},compId:7,child:[{type:"Image",props:{y:0,x:0,width:210,skin:"youziTexture/icon_bg.png",sizeGrid:"5,5,5,5",height:210},compId:13},{type:"Animation",props:{y:5,x:5,width:200,name:"iconAnima",height:200},compId:8},{type:"Image",props:{y:5,x:5,width:200,name:"icon",height:200},compId:9},{type:"Image",props:{y:159,x:5,width:200,skin:"youziTexture/blank.png",height:46},compId:10},{type:"Image",props:{y:5,x:140,width:65,skin:"youziTexture/youzi_hotgame.png",name:"redhit",height:30},compId:11},{type:"Label",props:{y:159,x:5,width:200,valign:"middle",overflow:"hidden",name:"namelab",height:46,fontSize:24,color:"#ffffff",align:"center"},compId:12}]}]}]}],loadList:["youziTexture/youzi_black.png","youziTexture/youzi_full_title.png","youziTexture/fanhui.png","youziTexture/icon_bg.png","youziTexture/blank.png","youziTexture/youzi_hotgame.png"],loadList3D:[]},e.Youzi_FullScreenHUI=n,X("ui.youzi.Youzi_FullScreenHUI",n);class o extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(o.uiView)}}o.uiView={type:"View",props:{width:640,visible:!1,name:"YouziGameBanner",height:170},compId:2,child:[{type:"List",props:{y:0,x:0,width:640,visible:!0,var:"GameBannerList",spaceY:5,spaceX:5,repeatY:1,repeatX:1,height:170},compId:10,child:[{type:"Box",props:{y:1,x:0,width:640,renderType:"render",name:"render",height:170},compId:11,child:[{type:"Image",props:{y:0,x:0,width:640,name:"icon",height:170},compId:12}]}]}],loadList:[],loadList3D:[]},e.Youzi_GameBannerViewUI=o,X("ui.youzi.Youzi_GameBannerViewUI",o);class r extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(r.uiView)}}r.uiView={type:"View",props:{width:464,name:"YouziGuessLikeView",height:124},compId:2,child:[{type:"Sprite",props:{y:0,x:0,width:464,visible:!1,var:"guessUI",height:124},compId:3,child:[{type:"Image",props:{y:0,x:0,width:464,skin:"youziTexture/full_round_corner.png",sizeGrid:"10,10,10,10",name:"guessLikeBg",height:124},compId:4},{type:"Image",props:{y:15,x:28,skin:"youziTexture/txt_guesslike_v.png",name:"guessTitle"},compId:5},{type:"List",props:{y:19,x:87,width:369,var:"guesslist",spaceX:18,repeatY:1,repeatX:3,height:90},compId:6,child:[{type:"Box",props:{y:0,x:0,width:90,renderType:"render",name:"render",height:90},compId:7,child:[{type:"Animation",props:{y:0,x:0,width:90,visible:!1,name:"iconAnima",height:90},compId:9},{type:"Image",props:{y:0,x:0,width:90,name:"icon",height:90},compId:8}]}]}]}],loadList:["youziTexture/full_round_corner.png","youziTexture/txt_guesslike_v.png"],loadList3D:[]},e.Youzi_GuessLikeUI=r,X("ui.youzi.Youzi_GuessLikeUI",r);class l extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(l.uiView)}}l.uiView={type:"View",props:{x:0,width:124,renderType:"render",name:"YouziGuessLikeViewH",height:464},compId:2,child:[{type:"Sprite",props:{y:0,x:0,width:124,visible:!1,var:"guessUI",height:464,drawCallOptimize:!0},compId:3,child:[{type:"Image",props:{y:0,x:0,width:124,var:"guessLikeBg",skin:"youziTexture/full_round_corner.png",sizeGrid:"8,8,8,8",scaleX:1,rotation:0,height:464},compId:4},{type:"Image",props:{y:30,x:12,width:100,var:"title",skin:"youziTexture/txt_guesslike_h.png",rotation:0,height:26},compId:5},{type:"List",props:{y:289,x:17,width:90,var:"guesslist",spaceY:18,rotation:0,repeatY:3,repeatX:1,pivotY:210,height:385,disabled:!1},compId:6,child:[{type:"Box",props:{y:0,x:0,width:90,name:"render",height:90},compId:7,child:[{type:"Animation",props:{y:0,x:0,width:90,name:"iconAnima",height:90},compId:9},{type:"Image",props:{y:0,x:0,width:90,name:"icon",height:90},compId:8}]}]}]}],loadList:["youziTexture/full_round_corner.png","youziTexture/txt_guesslike_h.png"],loadList3D:[]},e.Youzi_GuessLikeHUI=l,X("ui.youzi.Youzi_GuessLikeHUI",l);class h extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(h.uiView)}}h.uiView={type:"View",props:{width:102,visible:!1,name:"YouziMainPushView",mouseEnabled:!0,height:124},compId:2,child:[{type:"Sprite",props:{y:0,x:51,width:102,visible:!1,var:"btnMainRecBg",pivotX:51,height:124},compId:3,child:[{type:"Image",props:{y:0,x:0,width:102,var:"iconBg",skin:"youziTexture/icon_bg.png",sizeGrid:"5,5,5,5",height:124},compId:8},{type:"Sprite",props:{width:102,height:124},compId:10,child:[{type:"Image",props:{y:3,x:5,width:92,visible:!0,var:"iconMainRec",stateNum:1,height:92,cacheAs:"none"},compId:4},{type:"Animation",props:{y:3,x:5,width:92,visible:!1,var:"mainAnima",height:92},compId:7},{type:"Text",props:{y:103,x:50,width:102,var:"slogan",valign:"middle",pivotY:1,pivotX:51,overflow:"hidden",height:1,fontSize:18,bold:!0,align:"center",runtime:"laya.display.Text"},compId:5}]}]}],loadList:["youziTexture/icon_bg.png"],loadList3D:[]},e.Youzi_MainPushUI=h,X("ui.youzi.Youzi_MainPushUI",h);class c extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(c.uiView)}}c.uiView={type:"View",props:{y:0,x:0,width:720,visible:!1,name:"YouziMoreGameView",height:1280},compId:2,child:[{type:"Image",props:{y:-560,x:-240,width:1200,var:"maskBG",skin:"youziTexture/blank.png",height:2400},compId:34},{type:"Sprite",props:{y:200,x:95,width:530,visible:!1,var:"MoreGameUI",mouseThrough:!1,mouseEnabled:!0,height:880},compId:12,child:[{type:"Image",props:{y:0,x:0,width:530,skin:"youziTexture/full_round_corner.png",sizeGrid:"8,8,8,8",name:"panel",height:880},compId:14},{type:"Image",props:{y:0,x:103,skin:"youziTexture/main_title.png",name:"title"},compId:15},{type:"Button",props:{y:-11,x:498,width:42,var:"moreGameCloseBtn",stateNum:1,skin:"youziTexture/close_button.png",labelSize:26,labelPadding:"-50",height:46},compId:16},{type:"List",props:{y:59,x:25,width:480,var:"moreGameList",spaceY:12,spaceX:28,repeatY:4,repeatX:3,height:820},compId:17,child:[{type:"Box",props:{y:0,x:0,width:140,renderType:"render",name:"render",height:180},compId:18,child:[{type:"Animation",props:{y:0,x:0,width:140,visible:!1,name:"iconAnima",height:140},compId:33},{type:"Image",props:{y:0,x:0,width:140,name:"icon",height:140},compId:31},{type:"Label",props:{y:166,x:70,width:140,overflow:"hidden",name:"namelab",height:30,fontSize:26,color:"#ffffff",anchorY:.5,anchorX:.5,align:"center"},compId:20}]}]}]}],loadList:["youziTexture/blank.png","youziTexture/full_round_corner.png","youziTexture/main_title.png","youziTexture/close_button.png"],loadList3D:[]},e.Youzi_MoreGameUI=c,X("ui.youzi.Youzi_MoreGameUI",c);class d extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(d.uiView)}}d.uiView={type:"View",props:{width:1280,visible:!1,name:"YouziMoreGameH",height:720},compId:2,child:[{type:"Image",props:{y:-240,x:-560,width:2400,var:"maskBG",skin:"youziTexture/blank.png",height:1200},compId:13},{type:"Sprite",props:{y:60,x:376,width:528,visible:!1,var:"MoreGameUI",pivotY:0,pivotX:0,mouseThrough:!1,mouseEnabled:!0,height:600,drawCallOptimize:!0},compId:3,child:[{type:"Image",props:{y:0,x:0,width:528,skin:"youziTexture/full_round_corner.png",sizeGrid:"8,8,8,8",pivotX:0,name:"panel",height:600,cacheAs:"none"},compId:5},{type:"Image",props:{y:0,x:113,skin:"youziTexture/main_title.png",name:"title"},compId:6},{type:"Button",props:{y:-8,x:497,var:"moreGameCloseBtn",stateNum:1,skin:"youziTexture/close_button.png",labelSize:26,labelPadding:"-50",cacheAs:"none"},compId:7},{type:"List",props:{y:70,x:31,width:466,var:"moreGameList",spaceY:10,spaceX:45,repeatY:3,repeatX:3,height:530},compId:8,child:[{type:"Box",props:{y:0,x:0,width:120,renderType:"render",name:"render",height:153},compId:9,child:[{type:"Animation",props:{y:0,x:0,width:120,visible:!1,name:"iconAnima",height:120},compId:12},{type:"Image",props:{y:0,x:0,width:120,name:"icon",height:120},compId:10},{type:"Label",props:{y:142,x:60,width:120,valign:"middle",overflow:"hidden",name:"namelab",height:22,fontSize:22,color:"#ffffff",anchorY:.5,anchorX:.5,align:"center"},compId:11}]}]}]}],loadList:["youziTexture/blank.png","youziTexture/full_round_corner.png","youziTexture/main_title.png","youziTexture/close_button.png"],loadList3D:[]},e.Youzi_MoreGameHUI=d,X("ui.youzi.Youzi_MoreGameHUI",d);class u extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(u.uiView)}}u.uiView={type:"View",props:{width:720,name:"YouziOffLineView",height:1280},compId:2,child:[{type:"Button",props:{width:1e3,var:"OffLineMask",stateNum:1,skin:"youziTexture/blank.png",mouseEnabled:!0,height:1900,centerY:0,centerX:0},compId:4},{type:"Sprite",props:{y:506,x:96,width:528,visible:!1,var:"OffLineUI",mouseEnabled:!0,height:268},compId:3,child:[{type:"Image",props:{y:0,x:0,width:528,skin:"youziTexture/full_round_corner.png",sizeGrid:"9,9,9,9",name:"OffLineBg",height:268},compId:5},{type:"Image",props:{y:25,x:209,width:110,skin:"youziTexture/txt_guesslike_h.png",name:"offlineTitle",height:30},compId:12},{type:"Button",props:{y:-22,x:496,width:42,var:"OffLineCloseButton",stateNum:1,skin:"youziTexture/close_button.png",height:46},compId:11},{type:"List",props:{y:72,x:29,width:470,var:"OffLineList",spaceX:25,repeatY:1,repeatX:2,height:180},compId:6,child:[{type:"Box",props:{y:0,x:0,width:140,renderType:"render",name:"render",height:180},compId:7,child:[{type:"Animation",props:{y:0,x:0,width:140,visible:!1,name:"iconAnima",height:140},compId:13},{type:"Image",props:{x:0,width:140,name:"icon",height:140},compId:8},{type:"Image",props:{y:-14,x:126,visible:!1,skin:"youziTexture/redhit.png",name:"redhit",cacheAs:"bitmap"},compId:9},{type:"Label",props:{y:150,width:140,valign:"middle",text:"弹弹欢乐球",overflow:"hidden",name:"namelab",height:30,fontSize:24,color:"#ffffff",align:"center"},compId:10}]}]}]}],loadList:["youziTexture/blank.png","youziTexture/full_round_corner.png","youziTexture/txt_guesslike_h.png","youziTexture/close_button.png","youziTexture/redhit.png"],loadList3D:[]},e.Youzi_OffLineUI=u,X("ui.youzi.Youzi_OffLineUI",u);class p extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(p.uiView)}}p.uiView={type:"View",props:{width:1280,name:"YouziOffLineHView",height:720},compId:2,child:[{type:"Button",props:{width:1900,var:"OffLineMask",stateNum:1,skin:"youziTexture/blank.png",mouseThrough:!1,height:1e3,centerY:0,centerX:0},compId:4},{type:"Sprite",props:{y:180,x:320,width:640,visible:!1,var:"OffLineUI",mouseThrough:!0,mouseEnabled:!0,height:360,drawCallOptimize:!0},compId:3,child:[{type:"Image",props:{y:0,x:0,width:640,skin:"youziTexture/full_round_corner.png",sizeGrid:"8,8,8,8",name:"OffLineBg",height:360},compId:5},{type:"Image",props:{y:37,x:255,width:130,skin:"youziTexture/txt_guesslike_h.png",name:"title",height:32},compId:6},{type:"Button",props:{y:-9,x:609,var:"OffLineCloseButton",stateNum:1,skin:"youziTexture/close_button.png"},compId:7},{type:"List",props:{y:101,x:0,width:640,var:"OffLineList",repeatY:1,repeatX:2,height:210},compId:8,child:[{type:"Box",props:{y:15,x:25,width:180,renderType:"render",name:"render",height:180},compId:9,child:[{type:"Animation",props:{y:0,x:15,width:150,visible:!1,name:"iconAnima",height:150},compId:13},{type:"Image",props:{y:0,x:15,width:150,name:"icon",height:150},compId:10},{type:"Image",props:{y:-14,x:151,visible:!1,skin:"youziTexture/redhit.png",name:"redhit",cacheAs:"bitmap"},compId:11},{type:"Label",props:{y:160,width:180,text:"弹弹欢乐球",name:"namelab",height:30,fontSize:30,color:"#ffffff",align:"center"},compId:12}]}]}]}],loadList:["youziTexture/blank.png","youziTexture/full_round_corner.png","youziTexture/txt_guesslike_h.png","youziTexture/close_button.png","youziTexture/redhit.png"],loadList3D:[]},e.Youzi_OffLineHUI=p,X("ui.youzi.Youzi_OffLineHUI",p);class m extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(m.uiView)}}m.uiView={type:"View",props:{width:720,name:"YouziRecentlyUsed",height:1280},compId:2,child:[{type:"Sprite",props:{y:0,x:0,width:720,var:"RecentlyUsedUI",height:1280},compId:23,child:[{type:"Image",props:{y:-478.5,x:-180,width:1200,var:"GameListBG",skin:"youziTexture/icon_bg.png",sizeGrid:"5,5,5,5",mouseEnabled:!1,height:2400},compId:4},{type:"Image",props:{y:0,x:0,width:720,var:"TitleBg",skin:"youziTexture/youzi_graybg.png",sizeGrid:"5,5,5,5",height:100},compId:3},{type:"Image",props:{y:34,x:23,width:40,var:"CloseBtn",skin:"youziTexture/youzi_leftarrow.png",height:40},compId:25},{type:"Label",props:{y:24,x:300,width:120,var:"TitleLabel",valign:"middle",text:"小游戏",stroke:1,height:60,fontSize:32,color:"#000000",align:"center"},compId:5},{type:"Label",props:{y:101,x:16,width:704,var:"TitleUsed",valign:"middle",text:"最近使用",strokeColor:"#aa9f9f",stroke:.7,height:59,fontSize:24,color:"#aa9f9f",align:"left"},compId:6,child:[{type:"Line",props:{y:57,x:0,toY:0,toX:704,lineWidth:1.5,lineColor:"#c6c6c6"},compId:21}]},{type:"List",props:{y:162,x:40,width:680,var:"RecentlyUsedList",spaceY:20,repeatY:9,repeatX:1,height:1119},compId:7,child:[{type:"Box",props:{y:0,width:680,renderType:"render",name:"render",height:100},compId:10,child:[{type:"Animation",props:{y:0,x:0,width:100,name:"iconAnima",height:100},compId:14},{type:"Image",props:{width:100,name:"icon",height:100},compId:12},{type:"Image",props:{y:0,x:0,width:100,skin:"youziTexture/youzi_circlemask.png",name:"maskBG",height:100},compId:29},{type:"Image",props:{y:29,x:557,width:40,skin:"youziTexture/youzi_hitstar.png",name:"redhit",height:39},compId:22},{type:"Label",props:{y:31,x:135.5,width:409,valign:"bottom",text:"弹弹欢乐球",overflow:"scroll",name:"namelab",height:35,fontSize:28,align:"left"},compId:13},{type:"Line",props:{y:100,x:135,toY:0,toX:545,lineWidth:1.5,lineColor:"#bbbbbb"},compId:11}]}]}]}],loadList:["youziTexture/icon_bg.png","youziTexture/youzi_graybg.png","youziTexture/youzi_leftarrow.png","youziTexture/youzi_circlemask.png","youziTexture/youzi_hitstar.png"],loadList3D:[]},e.Youzi_RecentlyUsedUI=m,X("ui.youzi.Youzi_RecentlyUsedUI",m);class g extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(g.uiView)}}g.uiView={type:"View",props:{width:720,name:"YouziScreenPage",height:1280},compId:2,child:[{type:"Sprite",props:{x:0,width:720,var:"LuoDi",height:1280},compId:9,child:[{type:"Image",props:{y:0,x:0,width:720,var:"BG",skin:"youziTexture/icon_bg.png",sizeGrid:"6,6,6,6",height:1280},compId:4},{type:"Image",props:{y:823,x:211,var:"luoDiBtn",skin:"youziTexture/box_start.png"},compId:5},{type:"Image",props:{y:490,x:210,width:300,var:"Small",height:300},compId:6},{type:"Image",props:{y:0,x:0,width:720,var:"Big",height:1280},compId:7},{type:"Button",props:{y:0,x:0,width:720,var:"PageBtn",height:1280},compId:8}]}],loadList:["youziTexture/icon_bg.png","youziTexture/box_start.png"],loadList3D:[]},e.Youzi_ScreenPageUI=g,X("ui.youzi.Youzi_ScreenPageUI",g);class y extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(y.uiView)}}y.uiView={type:"View",props:{width:250,name:"YouziSlideBanner",height:806},compId:2,child:[{type:"Sprite",props:{y:0,x:0,width:250,visible:!1,var:"SlideBannerUI",mouseEnabled:!0,height:806},compId:3,child:[{type:"Sprite",props:{y:0,x:0,width:250,var:"SlideBannerBg",height:806},compId:4,child:[{type:"Image",props:{y:0,x:0,width:200,var:"slideBgLeft",skin:"youziTexture/full_round_corner.png",sizeGrid:"9,9,9,9",height:806},compId:5},{type:"Button",props:{x:200,width:42,var:"btnSLideClose",stateNum:1,skin:"youziTexture/slide_bg_mid.png",sizeGrid:"0,40,0,4",height:164,centerY:0},compId:7}]},{type:"List",props:{y:8,x:32,width:150,var:"SlideBannerList",spaceY:5,spaceX:0,repeatY:4,repeatX:1,height:790},compId:8,child:[{type:"Box",props:{y:0,x:0,width:130,renderType:"render",name:"render",height:180},compId:9,child:[{type:"Animation",props:{y:12,x:0,width:130,visible:!1,name:"iconAnima",height:130},compId:10},{type:"Image",props:{y:12,x:0,width:130,name:"icon",height:130},compId:11},{type:"Image",props:{y:-2,x:116,skin:"youziTexture/redhit.png",name:"markImg"},compId:12},{type:"Label",props:{y:164,x:65,width:130,valign:"middle",name:"namelab",height:26,fontSize:26,color:"#ffffff",anchorY:.5,anchorX:.5,align:"center"},compId:13}]}]}]}],loadList:["youziTexture/full_round_corner.png","youziTexture/slide_bg_mid.png","youziTexture/redhit.png"],loadList3D:[]},e.Youzi_SlideBannerUI=y,X("ui.youzi.Youzi_SlideBannerUI",y);class I extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(I.uiView)}}I.uiView={type:"View",props:{width:536,visible:!1,name:"YouziSlideView",mouseEnabled:!0,height:802},compId:2,child:[{type:"Sprite",props:{y:0,x:0,width:536,visible:!1,var:"SlideWindowUI",mouseEnabled:!0,height:802},compId:14,child:[{type:"Sprite",props:{y:0,x:0,width:534,var:"slideBg",height:802},compId:26,child:[{type:"Image",props:{y:0,x:0,width:497,skin:"youziTexture/full_round_corner.png",sizeGrid:"9,9,9,9",name:"slideBgLeft",height:802},compId:16},{type:"Image",props:{y:319,x:497,width:42,skin:"youziTexture/slide_bg_mid.png",sizeGrid:"0,40,0,4",name:"slideBtn",mouseEnabled:!1,height:164},compId:18},{type:"Button",props:{y:359.5,x:495,width:44,var:"btnSLideClose",stateNum:1,height:83},compId:24}]},{type:"List",props:{y:11,x:34,width:463,var:"slideList",spaceY:5,spaceX:26,repeatY:4,repeatX:3,height:790},compId:19,child:[{type:"Box",props:{y:0,x:0,width:130,renderType:"render",name:"render",height:180},compId:20,child:[{type:"Animation",props:{y:12,x:0,width:130,visible:!1,name:"iconAnima",height:130},compId:27},{type:"Image",props:{y:12,x:0,width:130,name:"icon",height:130},compId:21},{type:"Image",props:{y:-2,x:116,skin:"youziTexture/redhit.png",name:"markImg"},compId:22},{type:"Label",props:{y:164,x:65,width:130,valign:"middle",name:"namelab",height:26,fontSize:26,color:"#ffffff",anchorY:.5,anchorX:.5,align:"center"},compId:23}]}]}]}],loadList:["youziTexture/full_round_corner.png","youziTexture/slide_bg_mid.png","youziTexture/redhit.png"],loadList3D:[]},e.Youzi_SlideWindowUI=I,X("ui.youzi.Youzi_SlideWindowUI",I);class w extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(w.uiView)}}w.uiView={type:"View",props:{width:600,visible:!1,name:"YouziSlideWindowViewH",height:614},compId:2,child:[{type:"Sprite",props:{y:0,x:0,width:600,visible:!1,var:"SlideWindowUI",height:614,drawCallOptimize:!0},compId:3,child:[{type:"Sprite",props:{y:0,x:0,width:600,var:"slideBg",height:614},compId:13,child:[{type:"Image",props:{y:225,x:566,width:33,skin:"youziTexture/slide_bg_mid.png",sizeGrid:"0,40,0,4",name:"slideBgMiddle",height:164},compId:5},{type:"Image",props:{y:0,x:-71,width:640,skin:"youziTexture/full_round_corner.png",sizeGrid:"10,10,10,10",name:"zhezhao",height:614},compId:6},{type:"Button",props:{y:265,x:569,width:31,var:"btnSLideClose",stateNum:1,height:80},compId:12}]},{type:"List",props:{y:0,x:67,width:485,var:"slideList",spaceY:1,spaceX:40,repeatY:3,repeatX:3,height:614},compId:7,child:[{type:"Box",props:{y:0,x:0,width:130,renderType:"render",name:"render",height:190},compId:8,child:[{type:"Animation",props:{y:20,x:0,width:130,visible:!1,name:"iconAnima",height:130},compId:14},{type:"Image",props:{y:20,x:0,width:130,name:"icon",height:130},compId:9},{type:"Image",props:{y:6,x:116,skin:"youziTexture/redhit.png",name:"markImg",cacheAs:"none"},compId:10},{type:"Label",props:{y:177,x:65,width:130,valign:"bottom",overflow:"hidden",name:"namelab",height:24,fontSize:22,color:"#ffffff",anchorY:.5,anchorX:.5,align:"center"},compId:11}]}]}]}],loadList:["youziTexture/slide_bg_mid.png","youziTexture/full_round_corner.png","youziTexture/redhit.png"],loadList3D:[]},e.Youzi_SlideWindowHUI=w,X("ui.youzi.Youzi_SlideWindowHUI",w);class f extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(f.uiView)}}f.uiView={type:"View",props:{width:600,visible:!1,name:"YouziSmallWallView",height:414},compId:2,child:[{type:"Sprite",props:{y:0,x:0,width:600,visible:!1,var:"SmallWallUI",pivotY:0,pivotX:0,mouseThrough:!1,mouseEnabled:!0,height:414},compId:4,child:[{type:"Image",props:{y:0,x:0,width:600,skin:"youziTexture/bg_small_wall.png",sizeGrid:"38,42,38,42",pivotX:0,name:"panel",height:414},compId:5},{type:"Image",props:{y:7,x:110,skin:"youziTexture/txt_small_wall.png",name:"title"},compId:6},{type:"List",props:{y:56,x:17,width:568,var:"smallWallList",vScrollBarSkin:"youziTexture/vscroll.png",spaceY:10,spaceX:25,repeatY:1,repeatX:4,height:350},compId:8,child:[{type:"Box",props:{y:0,x:0,width:120,renderType:"render",name:"render",height:172},compId:9,child:[{type:"Animation",props:{y:12,x:0,width:120,visible:!1,name:"iconAnima",height:120},compId:13},{type:"Image",props:{y:12,x:0,width:120,name:"icon",height:120},compId:10},{type:"Image",props:{y:0,x:104,visible:!1,skin:"youziTexture/redhit.png",name:"redhit"},compId:12},{type:"Label",props:{y:152,x:60,width:120,valign:"middle",text:"弹弹欢乐球",overflow:"hidden",name:"namelab",height:30,fontSize:22,color:"#ffffff",anchorY:.5,anchorX:.5,align:"center"},compId:11}]}]}]}],loadList:["youziTexture/bg_small_wall.png","youziTexture/txt_small_wall.png","youziTexture/vscroll.png","youziTexture/redhit.png"],loadList3D:[]},e.Youzi_SmallWallUI=f,X("ui.youzi.Youzi_SmallWallUI",f);class S extends Laya.View{constructor(){super()}createChildren(){super.createChildren(),this.createView(S.uiView)}}S.uiView={type:"View",props:{width:750,name:"YouziSmallWallViewH",height:414},compId:2,child:[{type:"Sprite",props:{y:0,x:0,width:750,visible:!1,var:"SmallWallUIH",pivotY:0,pivotX:0,mouseThrough:!1,mouseEnabled:!0,height:414},compId:3,child:[{type:"Image",props:{y:0,x:0,width:750,skin:"youziTexture/bg_small_wall.png",sizeGrid:"38,42,38,42",pivotX:0,name:"panel",height:414},compId:4},{type:"Image",props:{y:9,x:177.5,skin:"youziTexture/txt_small_wall.png",name:"title"},compId:5},{type:"List",props:{y:56,x:17,width:720,var:"smallWallListH",spaceY:10,spaceX:25,repeatY:1,repeatX:5,height:350},compId:6,child:[{type:"Box",props:{y:0,x:0,width:120,renderType:"render",name:"render",height:172},compId:7,child:[{type:"Animation",props:{y:12,x:0,width:120,name:"iconAnima",height:120},compId:11},{type:"Image",props:{y:12,x:0,width:120,name:"icon",height:120},compId:8},{type:"Image",props:{y:0,x:104,visible:!1,skin:"youziTexture/redhit.png",name:"redhit"},compId:9},{type:"Label",props:{y:152,x:60,width:120,valign:"middle",overflow:"hidden",name:"namelab",height:30,fontSize:22,color:"#ffffff",anchorY:.5,anchorX:.5,align:"center"},compId:10}]}]}]}],loadList:["youziTexture/bg_small_wall.png","youziTexture/txt_small_wall.png","youziTexture/redhit.png"],loadList3D:[]},e.Youzi_SmallWallHUI=S,X("ui.youzi.Youzi_SmallWallHUI",S)}(e.youzi||(e.youzi={}))}(Y||(Y={}));class j extends Y.GuideUiUI{constructor(){super(),this.isguide2or3=!1,this.guide1pos=U.VecZero,this.guide1Com=!1,j.instance=this,this.resizeHander(),h.on(Laya.Event.RESIZE,this,this.resizeHander)}static get Instance(){return j.instance}OnShow(e){this.InitHandler(),this.InitDate(),this.InitHandler(),this.InitUi()}InitUi(){}InitDate(){}InitHandler(){}SetGuide(e){this.playerTran||(this.playerTran=It.Instance.playerTra),this._camera||(this._camera=D.Instance._camer),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<=q.Instance.guide1pos.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=q.Instance.guide1pos.clone(),Laya.timer.frameLoop(1,this,this._guide1),this.guide1Com=!1)}_guide1(){if(this.guide1Com)this.playerTran.localPositionZ>=q.Instance.guide1pos.z&&(console.log(111),Laya.timer.clear(this,this._guide1),this.Guide2());else{let e=O.WorldToScreen2(this._camera,q.Instance.guide1pos.clone());this.guide1Box.pos(e.x,e.y),this.guide1pos.z=this.playerTran.localPositionZ+10;let t=O.WorldToScreen2(this._camera,this.guide1pos);this.isguide2or3?this.guide2Box.pos(t.x,t.y):this.guide3Box.pos(t.x,t.y),this.playerTran.localPositionZ>=q.Instance.guide1pos.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)}}Guide2(){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._guide2),this.guide1pos.x=-4.5,this.guide1pos.y=0}_guide2(){let e=O.WorldToScreen2(this._camera,q.Instance.guide2Pos.clone());this.guide4Box.pos(e.x,e.y),this.guide1pos.z=this.playerTran.localPositionZ+5;let t=O.WorldToScreen2(this._camera,this.guide1pos);this.guide3Box.pos(t.x,t.y),this.playerTran.localPositionZ>=q.Instance.guide2Pos.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._guide2),Laya.timer.once(5e3,this,()=>{q.Instance.OverGuide()}))}OnClose(){h.off(Laya.Event.RESIZE,this,this.resizeHander),j.instance=null,Laya.timer.clearAll(this)}resizeHander(){this.height=Laya.stage.height}}class q{constructor(){this.isguide=!1,this.guide1pos=new Laya.Vector3(2.5,0,59.4),this.guide2Pos=new Laya.Vector3(-5,2,104.4),this.index=0}static get Instance(){return this.instance||(this.instance=new q)}IsGuide(){Laya.LocalStorage.getItem("guide");return 1==m.Instance.stage?(Laya.LocalStorage.setItem("guide","1"),this.isguide=!0,!0):(this.isguide=!1,!1)}SetGuidePos(e){0==this.index?(this.guide1pos.z=e,this.index++):1==this.index&&(this.guide2Pos.z=e,this.index++)}StartGuide(){this.isguide&&Laya.timer.once(500,this,this.Guide1)}OverGuide(){this.isguide=!1,Ht.Instance.CloseGuideUi()}Guide1(){Ht.Instance.ShowGuideUi(),j.Instance&&j.Instance.SetGuide(1)}GameDied(){this.isguide&&Ht.Instance.CloseGuideUi()}}class Z{constructor(e,t){this.blocks=e,this.blockPos=t}}class K{constructor(e,t,i){this.things=e,this.thingPos=t,this.blockHp=i}}class J{constructor(e,t,i,s){this.type=e,this.prrfabName=t,this.moveType=i,this.moveSpeed=s}}class ${constructor(){this.isover=!1,this.curindex=1,this.blockDic=new l,this.cubeBlockDic=new l}static get Instance(){return $.instance||($.instance=new $)}Init(e){this.BlockContainer=e}SetBlock(){this.isover=!1,this.curindex=1,this.CreateBlock()}CreateBlock(){let e=E.Instance._level.road_list;if(this.curindex>e.length-1)return this.isover=!0,void console.log("没有障碍物了");this.tarDis=this.curindex*g.barrierRoadLength;let i=e[this.curindex];if(0==i)return;let s=d.Instance.GetRoad(i);if(!s)return;let a=t.SpliteString(s.blocks),n=t.SpliteString(s.position),o=[],r=g.barrierRoadLength/g.barrierRoadAverageNum;n.forEach(e=>{o.push(this.tarDis+e*r)});let l=[];a.forEach(e=>{let i=d.Instance.GetBlock(e),s=t.SpliteString(i.block_things),a=t.SpliteString(i.thing_position),n=t.SpliteString(i.block_hp),o=[];s.forEach(e=>{let t=d.Instance.GetThing(e),i=new J(t.type,t.prefabs,t.dynamic_type,t.dynamic_speed);o.push(i)});let r=new K(o,a,n);l.push(r)});let h=new Z(l,o);this.CreateSp(h)}CheckPlayerRoadPos(e){if(this.isover)return;this.tarDis-e>0||this.SwitchBlock()}SwitchBlock(){this.curindex++,console.log("到达一个障碍物"),this.CreateBlock()}CreateSp(e){q.Instance.isguide&&q.Instance.SetGuidePos(e.blockPos[0]);let t=e.blocks,i=e.blockPos,s=0;for(let e=0;e<t.length;e++){const a=t[e],n=i[e];let o=a.things,r=a.thingPos,l=a.blockHp,h=l.length>1;for(let e=0;e<o.length;e++){const t=o[e];t.z=n,t.x=r[e],t.towerR=h,t.hp=l[e],s++,Laya.timer.frameOnce(s,this,this._crete,[t],!1)}}}_crete(e){if(1==e.type||2==e.type)H.Instance.CreateTower(e);else{let t=M.Instance.SetActiveObject(e.prrfabName);if(!t)return;this.BlockContainer.addChild(t);let i=t.getComponent(W);i||(i=t.addComponent(W)),i.SetBlock(e),this.blockDic.set(t.id,i)}}RemoveBlock(e){this.blockDic.delete(e.id)}AddCubeBlock(e){this.cubeBlockDic.has(e.id)||this.cubeBlockDic.set(e.id,e)}ResetCubBlock(e){let t=this.cubeBlockDic.get(e);if(this.cubeBlockDic.delete(e),t){console.log("回收CubeBlock,",t.name);for(let e=0;e<t.numChildren;e++){t.getChildAt(e).active=!0}}}CubeBlockAtked(e){e.active=!1,P.Instance.CreateBoomEffect(e.transform.position)}Reset(){this.isover=!1;let e=[];for(const t in this.blockDic.container)e.push(t);let t=1;if(e.length>0)for(let i=0;i<e.length;i++){const s=e[i];let a=this.blockDic.get(s);a&&a.Des(),this.cubeBlockDic.has(s)&&(Laya.timer.frameOnce(t,this,this.ResetCubBlock,[s],!1),t++)}console.log("this.blockDic.size",this.blockDic.size)}}var Q=Laya.Vector3,ee=Laya.Quaternion;class te extends Laya.Script3D{constructor(){super(...arguments),this._up=new Q(0,1,0),this.isArrive1=!1}onAwake(){this.selfobj=this.owner,this.tran=this.selfobj.transform,this.mat=this.selfobj.getChildAt(0).getChildByName("enemy").skinnedMeshRenderer.material,this.forW=U.VecZero,this.speed=g.enemySpeed,this.quaternion1=new ee}SetTar(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=ut.Instance.toured1.clone():this.tarPos=ut.Instance.toured2.clone(),this.hp=t,this.mat.albedoTexture=xt.Instance.cloth[i-1],this.mat.emissionTexture=xt.Instance.cloth[i-1],Laya.timer.frameLoop(1,this,this.Move))}Move(){if(this.isArrive1){if(null==this.tarSp)return;if(!this.tarSp.active){if(this.tarSp=ie.Instance.GetTar(),null==this.tarSp)return;this.tarPos=this.tarSp.transform.position.clone()}if(Q.subtract(this.tarPos,this.tran.position,this.forW),Q.normalize(this.forW,this.forW),this.forW=new Q(this.forW.x*this.speed,this.forW.y*this.speed,this.forW.z*this.speed),this.tran.translate(this.forW,!1),Q.distance(this.tran.position,this.tarPos)<.1)return;ee.lookAt(this.tarPos,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}else{if(Q.subtract(this.tarPos,this.tran.position,this.forW),Q.normalize(this.forW,this.forW),this.forW=new Q(this.forW.x*this.speed,this.forW.y*this.speed,this.forW.z*this.speed),this.tran.translate(this.forW,!1),Q.distance(this.tran.position,this.tarPos)<.1){if(this.tarSp=ie.Instance.GetTar(),this.isArrive1=!0,null==this.tarSp)return;return void(this.tarPos=this.tarSp.transform.position.clone())}ee.lookAt(this.tarPos,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}}Atked(e){this.hp-=m.bulletAttack,this.hp<=0?this.Died():P.Instance.CreateHitEffect(e)}Died(){P.Instance.CreateXueEffect(this.tran.position),this.Des(),ie.Instance.CheackGame(),at.Instance.roleCount++}Des(){Laya.timer.clearAll(this),ie.Instance.RemoveEnemy(this.selfobj),M.Instance.SetDisableObject(this.selfobj)}onDestroy(){}}class ie{constructor(){this.frameCount=10,this.enemyDic=new l}static get Instance(){return this.instance||(this.instance=new ie)}CreateEnemy(e){this.startPos=e;let t=E.Instance._level.enemy,i=E.Instance._level.enemy_hp,s=E.Instance._level.enemy_cloth;for(let e=0;e<t;e++){let t=e;Laya.timer.frameOnce(t*this.frameCount,this,this._crete,[i,s],!1)}}_crete(e,t){let i=M.Instance.SetActiveObject(M.pooltype.enemy);if(!i)return;It.Instance.playerContainer.addChild(i),i.transform.position=this.startPos.clone();let s=i.getComponent(te);s||(s=i.addComponent(te));let a=this.GetTar();s.SetTar(a,e,t),this.enemyDic.set(i.id,s)}GetTar(){if(It.Instance.ArriveIsdead()){let e=dt.Instance.GetGetSp();return e||null}if(Math.random()>.5)return It.Instance.playerBehavior.body;{let e=dt.Instance.GetGetSp();return e||It.Instance.playerBehavior.body}}RemoveEnemy(e){this.enemyDic.delete(e.id)}CheackGame(){0==this.enemyDic.size&&(V.Instance.OnClickUp(),It.Instance.StopCreate(),at.Instance.ToDance())}PlayerGetEnemy(){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<e.length;t++){const i=e[t];let s=this.enemyDic.get(i);s&&s.Des()}console.log("this.enemyDic.size",this.enemyDic.size)}}class se{static InitVideo(){if(!r.isWx)return;let e=Math.random()>.5?0:1;se.curVideo=Laya.Browser.window.wx.createRewardedVideoAd({adUnitId:se.videlAdUnitId[e]}),se.curVideo.onLoad(()=>{console.log("激励视频 广告加载成功"),this.videoLoadCom=!0}),se.curVideo.onError(e=>{console.log("激励视屏加载失败:"+e),this.videoLoadCom=!1}),se.curVideo.onClose(e=>{console.log("激励视频关闭:"+e.isEnded),e&&e.isEnded||void 0===e?this.videoCallback&&this.videoCallback(!0):this.videoCallback&&this.videoCallback(!1)})}static ShowVideo(e){r.isWx?se.videoLoadCom?(console.log("showVideoAd:"+se.videoLoadCom),se.videoCallback=e,se.curVideo.show().catch(e=>{se.curVideo.load().then(()=>{se.curVideo.show()})})):Nt.Game_Share(e):(Ht.Instance.ShowTips("暂未开放"),e(!0))}static OpenBanner(e=null,t=!1){if(!r.isWx)return;var i;se.canshowbanner=!0,this.curBannerId++,this.curBannerId>1&&(this.curBannerId=0),i=se.bannerAdUnitId[this.curBannerId],console.log("adUnitId:"+i);let s=Laya.Browser.window.wx.createBannerAd({adUnitId:i,style:{left:0,top:0,width:460}});s.onError(t=>{console.log(t),e(null)}),s.onLoad(()=>{console.log("新的"),this.curbanner&&this.curbanner.destroy(),this.curbanner=s;let i=Laya.Browser.window.wx.getSystemInfoSync();this.curbanner.style.width=i.windowWidth,this.curbanner.style.top=i.windowHeight-this.curbanner.style.realHeight-5;var a=Laya.stage.height/i.windowHeight*this.curbanner.style.realHeight;null!=e&&e(a),this.canshowbanner&&!t?this.curbanner.show():this.curbanner.hide()})}static Clear(){Laya.timer.clearAll(se),Laya.Tween.clearAll(se),se.canshowbanner=!1,se.curbanner&&se.curbanner.hide()}static showbanner(){r.isWx&&se.curbanner&&se.curbanner.show()}static CheatBanner(e,t=null){p.bannerCanMove&&e&&this.WXignore()?(e.bottom=NaN,e.y=Laya.stage.height-e.height-40,se.OpenBanner(i=>{if(i){console.log("cheatstart","bottom:100"),e.mouseEnabled=!1;var s=Laya.stage.height-i-e.height-20;console.log("y:"+s),Laya.timer.once(1e3*p.moveTime,this,()=>{e.mouseEnabled=!0,this.showbanner(),Laya.Tween.to(e,{y:s},500,null,Laya.Handler.create(this,()=>{null!=t&&t()}))})}},!0)):(console.log("ignorecheat"),se.OpenBanner())}static WXignore(){return!p.OpenSceneValue||("1044"==r.wxValue||"1104"==r.wxValue||"00000"==r.wxValue||"1058"==r.wxValue||"1067"==r.wxValue||"1095"==r.wxValue||"1089"==r.wxValue||"1001"==r.wxValue||"1037"==r.wxValue||"1007"==r.wxValue)}}se.videlAdUnitId=["adunit-be9371877a88ed51","adunit-3881e83f08f8b7c9"],se.bannerAdUnitId=["adunit-e4f1a4e63109e4ba","adunit-541ca055934fd3f1"],se.curBannerId=0,se.videoLoadCom=!1,se.canshowbanner=!0;const ae={MATRIX:1,WX:2,GAME:3,SWITCH:4},ne={Type_Zero:0,Type_One:1},oe={BottomBanner_CloseBtn:"_bottomBannerCloseBtnHide",BottomBanner_Name:"_bottomBannerNameHide",MoreGame_Name:"_moreGameNameHide",SlideWindow_Name:"_slideWindowNameHide",FullScreen_Name:"_fullScrennNameHide",SmallWall_Name:"_smallWallNameHide",MainPush_Name:"_mainPushNameHide"},re={TYPE_FULL_MATRIX:1,TYPE_RECENTLY_USED:2,TYPE_FULL_MIXBANNER:3},le={UI_ZORDER_ONE:1e3,UI_ZORDER_TWO:999,UI_ZORDER_THREE:998},he=2,ce=3,de={MAIN:1,FLOAT:2,MATRIX:3,GUESS:4,MORE:5,GAME:6,OFFLINE:7,BUY_Screen:8,BUY_BOX:9,SMALL_MATRIX_WALL:10,FULL_MATRIX_SCRENN:11,INVITE_FRIEND_PLAYGAME:12,CUSTOM_COMPONENT:9999},ue=1,pe=2,me=3,ge=4,ye=5,Ie=6,we=7,fe=8,Se=9,Le=10,xe=11,ve=1002,Ce=8001,be=11001,_e={Youzi_BottomBanner:1,Youzi_GameBanner:2,Youzi_GuessLike:3,Youzi_MainPush:4,Youzi_MoreGame:5,Youzi_OffLine:6,Youzi_SlideWindow:7,Youzi_SmallWall:8,Youzi_Full:9,Youzi_FriendInviteGame:10};var ke={SdkVersion:"Laya2.0-v6.7.1.3",resVersion:"1.00.00",debug:!1,appid:"",channelId:1002,bannnerDatas:[],itemListDatas:[],hotListDatas:[],moreDatas:[],matrixBannerDatas:[],fullMatrixScreenDatas:[],mainRecDatas:[],buyListDatas:[],gameBannerDatas:[],offlineBannerDatas:[],friendInviteGameDatas:[],allBeRecommendGames:{},toutiaoMoreGames:[],clickGameYouziUIId:0,_userinfo:{uid:"",gender:0,type:1},_platform:1,_isDataLoaded:!1,_isLoadFinish:!1,_requestErrorCbs:[],_loadedCallBacks:[],_bannerType:ae.MATRIX,_fullScreenType:0,_banerShowSwitchInterval:10,_bannerCreateInterval:20,_pageOpen:1,_bannerSwitchs:[],_provinceAllow:1,_mainRecAmount:1,_bottomBannerScrollType:ne.Type_Zero,_bottomBannerCloseBtnHide:!0,_bottomBannerNameHide:!1,_moreGameNameHide:!1,_slideWindowNameHide:!1,_fullScrennNameHide:!1,_smallWallNameHide:!1,_mainPushNameHide:!1,_mainPushScale:1.2,_gameIndexArrLength:1,_gameIndexArr:[],isInit:!1,logObj:{},logCount:0,openFullScreenNavigate:!1,createGamePageCall:null,gamePageCloseCall:null,navigateToMiniCall:null,aspectRatio:0,fromId:8,sourceChannelId:0,init(e,t,i){this.isInit||(Laya.Browser.onIOS?this._platform=ce:Laya.Browser.onAndroid&&(this._platform=he),console.log("中心化初始化 SdkVersion",this.SdkVersion,e,t,i),this.isInit=!0,this.appid=e||"",this.resVersion=t||"1.00.00",this.channelId=i,this._loadUid(),setInterval(()=>{this.logCount>0&&this.logCount<15&&this.exposureLogMerge()},1e4),this._loadData(this._initBannerShow.bind(this)),this.initLaunch(),this.openGameInitLog())},initLaunch(){this.channelId==ve||this.channelId==be?this._wxLaunch():this.channelId===Ce&&this.oppoLaunch()},_wxLaunch(){if(!Laya.Browser.window.wx)return;if(!Laya.Browser.window.wx.getLaunchOptionsSync)return;this._wxUserCloudStorage();var e=this;let t=Laya.Browser.window.wx.getLaunchOptionsSync();this.checkUserIsImported(t),this.checkFromId(t),t.referrerInfo&&t.referrerInfo.appId&&t.referrerInfo.extraData&&t.referrerInfo.extraData.boxAppid&&t.referrerInfo.extraData.orgAppid&&this.sendJumpToOpen(t.referrerInfo.extraData.orgAppid,t.referrerInfo.extraData.boxAppid,t.referrerInfo.extraData.locationIndex?t.referrerInfo.extraData.locationIndex:de.CUSTOM_COMPONENT),Laya.Browser.window.wx.onShow(function(t){e._wxOnShow(t)})},_wxUserCloudStorage(){Laya.Browser.window.wx.setUserCloudStorage({KVDataList:[{key:"GameleyYouzi",value:this._userinfo.uid}],success:function(){console.log("GameleyYouzi success")},fail:function(){console.log("GameleyYouzi fail")}})},_wxOnShow(e){console.log("wx onShow--------------"),this.checkUserIsImported(e),e.referrerInfo&&e.referrerInfo.extraData&&e.referrerInfo.extraData.boxAppid&&e.referrerInfo.extraData.orgAppid&&this.sendJumpToOpen(e.referrerInfo.extraData.orgAppid,e.referrerInfo.extraData.boxAppid,e.referrerInfo.extraData.locationIndex?e.referrerInfo.extraData.locationIndex:de.CUSTOM_COMPONENT)},oppoLaunch(){if(Laya.Browser.window.qg&&Laya.Browser.window.qg.getLaunchOptionsSync){let e=Laya.Browser.window.qg.getLaunchOptionsSync();this.checkUserIsImported(e),this.checkFromId(e),e.referrerInfo&&e.referrerInfo.extraData&&e.referrerInfo.extraData.orgAppid&&this.sendJumpToOpen(e.referrerInfo.extraData.orgAppid,e.referrerInfo.extraData.boxAppid,e.referrerInfo.extraData.locationIndex?e.referrerInfo.extraData.locationIndex:de.CUSTOM_COMPONENT)}},checkUserIsImported(e){(e.referrerInfo&&e.referrerInfo.adChannelId&&e.referrerInfo.adSubChannelId||e.query&&e.query.adChannelId&&e.query.adSubChannelId)&&(this._userinfo.type=2),(e.referrerInfo&&e.referrerInfo.leuokShareIn||e.query&&e.query.leuokShareIn)&&(this._userinfo.type=3);var t=!1;e.referrerInfo&&e.referrerInfo.extraData&&(e.referrerInfo.extraData.YouziFixUID&&e.referrerInfo.extraData.YouziFixUID.trim().length>0?(t=!0,this._userinfo.uid=e.referrerInfo.extraData.YouziFixUID):e.referrerInfo.extraData.YouziUID&&e.referrerInfo.extraData.YouziUID.trim().length>0&&(t=!0,this._userinfo.uid=e.referrerInfo.extraData.YouziUID)),e.query&&e.query.extraData&&e.query.extraData.YouziUID&&(t=!0,this._userinfo.uid=e.query.YouziUID),t&&localStorage.setItem("YOUZI_UID",this._userinfo.uid)},checkFromId(e){let t={1:0,2:0,3:0,4:0};if(e.hasOwnProperty("scene")){switch(e.scene){case 1047:case 1048:case 1049:t[1]=7;break;case 1042:case 1053:case 1005:case 1054:t[1]=6;break;case 1073:case 1074:case 1081:case 1082:case 1088:case 1096:case 1107:case 1007:case 1008:case 1014:case 1036:case 1043:case 1044:t[1]=5;break;case 1001:case 1006:case 1037:case 1038:case 1064:case 1077:case 1078:case 1079:case 1084:case 1089:case 1090:case 1095:case 1102:case 1103:case 1104:case 1106:case 1114:case 1113:case 1131:case 1135:case 1022:case 1023:case 1024:case 1026:case 1027:case 1035:case 1067:t[1]=1}}let i=null;e.referrerInfo&&e.referrerInfo.extraData&&(i=e.referrerInfo.extraData);let s=null;e.query&&(s=e.query),i&&((i.YouziFixUID||i.YouziUID)&&(t[2]=2),(i.anChannelId||i.ioChannelId)&&(t[3]=3,this.sourceChannelId=i.anChannelId||i.ioChannelId)),s&&(s.anChannelId||s.ioChannelId)&&(t[3]=3,this.sourceChannelId=s.anChannelId||s.ioChannelId),2==this._userinfo.type&&(t[4]=4),this.chooseOnlyFromId(t),console.log("--------\x3e来源ID:",this.fromId)},chooseOnlyFromId(e){0==e[4]?0==e[2]?0==e[3]?0==e[1]?this.fromId=8:this.fromId=e[1]:this.fromId=3:this.fromId=2:this.fromId=4},_loadData(e){if(this.channelId==be){let e=Laya.Browser.window.tt.getSystemInfoSync();if(this.compareToutiaoVersion(e.SDKVersion,"1.33.0")<0||Laya.Browser.onIOS)return}var t=this;let i={appid:t.appid,channelId:t.channelId,languageType:1,uid:t._userinfo.uid,version:t.resVersion},s=function(){console.log("中心化数据异常"),t._isLoadFinish=!1,t._isDataLoaded=!1;for(let e=0;e<t._requestErrorCbs.length;e++){const i=t._requestErrorCbs[e];i&&i()}};var a=function(i){let s=JSON.parse(JSON.stringify(i));if(console.log("中心化数据OK",s),i&&i.info&&i.info.swith&&1==i.info.swith){t._bottomBannerCloseBtnHide=t.jsonHasKey(i.info,"bottomBannerCloseBtnHide")?i.info.bottomBannerCloseBtnHide:t._bottomBannerCloseBtnHide,t._bottomBannerNameHide=t.jsonHasKey(i.info,"bottomBannerNameHide")?i.info.bottomBannerNameHide:t._bottomBannerNameHide,t._mainPushNameHide=t.jsonHasKey(i.info,"mainPushNameHide")?i.info.mainPushNameHide:t._mainPushNameHide,t._mainRecAmount=t.jsonHasKey(i.info,"mainRecAmount")?i.info.mainRecAmount:3,t._fullScreenType=t.jsonHasKey(i.info,"screenType")?i.info.screenType:0,t._bottomBannerScrollType=t.jsonHasKey(i.info,"bottomBannerScrollType")?i.info.bottomBannerScrollType:ne.Type_Zero,t._mainPushScale=t.jsonHasKey(i.info,"mainPushScale")>0?i.info.mainPushScale:1.2,t._moreGameNameHide=t.jsonHasKey(i.info,"moreGameNameHide")?i.info.moreGameNameHide:t._moreGameNameHide,t._slideWindowNameHide=t.jsonHasKey(i.info,"slideWindowNameHide")?i.info.slideWindowNameHide:t._slideWindowNameHide,t._fullScrennNameHide=t.jsonHasKey(i.info,"fullScrennNameHide")?i.info.fullScrennNameHide:t._fullScrennNameHide,t._smallWallNameHide=t.jsonHasKey(i.info,"smallWallNameHide")?i.info.smallWallNameHide:t._smallWallNameHide,t._pageOpen=i.info.status,t._bannerType=i.info.bannerSwith,t._banerShowSwitchInterval=i.info.bannerAutoInterval,t._bannerCreateInterval=i.info.wxBannerRefresh,t._provinceAllow=i.info.provinceAllow;let e=function(e,t){return t.weight-e.weight},s=function(i){return i=i.sort(e),i=t._clearArrIndex(i),i=t._removeItemByTestPeriod(i)};for(let e=0;e<i.info.recommendListBos.length;e++){var a=i.info.recommendListBos[e];switch(a.contentBos.forEach(e=>{t.allBeRecommendGames.hasOwnProperty.call({},e.appid)||(t.allBeRecommendGames[e.appid]=Object.assign({},e))}),console.log("allBeRecommendGames:"+t.allBeRecommendGames),a.type){case ue:t.bannnerDatas=s(a.contentBos);break;case pe:t.itemListDatas=s(a.contentBos);break;case me:t.hotListDatas=s(a.contentBos);break;case fe:t.moreDatas=s(a.contentBos);break;case Se:t.matrixBannerDatas=s(a.contentBos);break;case ge:t.mainRecDatas=s(a.contentBos);break;case ye:t.gameBannerDatas=s(a.contentBos);break;case Ie:t.offlineBannerDatas=s(a.contentBos);break;case we:t.buyListDatas=s(a.contentBos);break;case Le:t.fullMatrixScreenDatas=s(a.contentBos);break;case xe:t.friendInviteGameDatas=s(a.contentBos);break;default:console.log("无此中心化数据类型",a.type)}}}t.channelId==be&&t.setTouTiaoMoreGames(t.moreDatas),t._isDataLoaded=!0,t._isLoadFinish=!0,e&&e(i);for(let e=0;e<t._loadedCallBacks.length;e++){const i=t._loadedCallBacks[e];i&&i()}t._bannerType==ae.SWITCH&&(t.refreshBannerSwitch(),setInterval(t.refreshBannerSwitch.bind(t),1e3*t._banerShowSwitchInterval))};t.channelId==ve?(console.log("userInfo 调用开始"),t._getWxUserInfo(function(){console.log("请求开始"),t._request("POST",i,t._url(),a,s)})):t._request("POST",i,t._url(),a,s)},_clearArrIndex(e){let t=[];for(let i=0;i<e.length;i++){const s=e[i];this._pushData(s.hide)&&t.push(s)}let i=[];for(let e=0;e<t.length;e++){const s=t[e];this._pushDataBySexual(s.gender)&&i.push(s)}return i},_request(e,t,i,s,a){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4==n.readyState)if(n.status>=200&&n.status<400)if(""!=n.responseText){var e=JSON.parse(n.responseText);s&&s(e)}else s&&s({});else a&&a()},n.open(e,i,!0),n.setRequestHeader("content-type","application/json"),n.send(JSON.stringify(t))},_loadUid(){try{let e=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},t=localStorage.getItem("YOUZI_UID");t&&t.trim().length>0?this._userinfo.uid=t:(this._userinfo.uid=e(),localStorage.setItem("YOUZI_UID",this._userinfo.uid))}catch(e){this._userinfo.uid="10001"}},_removeItemByTestPeriod(e){for(var t=0;t<e.length;t++){var i=e[t];if(1!=i.testPeriod&&3!=i.testPeriod||0!=i.showLimit){if(2==i.testPeriod){var s=localStorage.getItem(i.appid);s&&"CPACPS"==s&&(e.splice(t,1),t--)}}else{var a=localStorage.getItem(i.appid);if(a&&"navigated"==a)continue;e.splice(t,1),t--}}return e},_url(){return this.debug?"https://test.gw.leuok.com/gl-ms-mini-recommend/recommend/show":"https://gw.lightlygame.com/gl-ms-mini-recommend/recommend/show"},_pushData(e){let t=!1;switch(e){case 1:t=!0;break;case 2:this._platform==he&&(t=!0);break;case 3:this._platform==ce&&(t=!0);break;default:t=!1}return t},_pushDataBySexual(e){let t=!1;switch(e){case 0:t=!0;break;case 1:1==this._userinfo.gender&&(t=!0);break;case 2:2==this._userinfo.gender&&(t=!0);break;default:t=!1}return t},_getWxUserInfo(e){var t=this;Laya.Browser.window.wx&&Laya.Browser.window.wx.getUserInfo?(console.log("userInfo 调用 start"),Laya.Browser.window.wx.getUserInfo({success(i){t._userinfo.gender=i.userInfo.gender,console.log("userInfo 成功回调请求"),e()},fail(t){console.log("userInfo 失败回调请求"),e()}}),console.log("userInfo 调用 end")):e()},_loadTexture(e,t){},fullScreenRandomNavigate(){if(this.openFullScreenNavigate&&this.mainRecDatas.length>0){var e=this.getRandomElementFromArray(this.mainRecDatas);this.switchStartOtherGame(e,null)}},startOtherGame(e,t){1==e.jumpShowPage?this.gamePageStartOtherGame(e,t):this.switchStartOtherGame(e,t)},gamePageStartOtherGame(e,t){if(this.channelId!=be)if(this.createGamePageCall){let i=this,s=function(){let s=setTimeout(function(){i.switchStartOtherGame(e,t),clearTimeout(s)},1500)};this.createGamePageCall(e,{gamePageComplete:s})}else this.switchStartOtherGame(e,t);else this.switchStartOtherGame(e,t)},switchStartOtherGame(e,t){switch(this.channelId){case ve:1==e.codeJump?this.wxPreviewImage(e.chopencode||e.vopencode||e.hopencode,e,t):this.navigateToOtherGame(e,t);break;case be:this.showTouTiaoMoreGamesModal(e,t);break;case Ce:this.navigateToOppoMiniGame(e,t);break;default:t&&t(!1),this.notifyNavigateFailUIId()}},openGameInitLog(){var e=this.YouziDateFtt("yyyy-MM-dd hh:mm:ss",new Date),t={logType:"login",channelId:this.channelId,orgAppid:this.appid,sourceId:this.fromId,sourceChannel:Number(this.sourceChannelId),uid:this._userinfo.uid,dt:e,sdkVersion:this.SdkVersion};this.logNavigate(t,function(){console.log("log event send YouziSdk init success")})},sendExposureLog(e,t){e?(this.logCount++,t=t||de.CUSTOM_COMPONENT,this.logObj.hasOwnProperty(t)||(this.logObj[t]=""),this.logObj[t]+=e.appid+",",this.logCount>=15&&this.exposureLogMerge()):console.warn("发送曝光日志时,data不存在",e,t)},exposureLogMerge(){let e=this.YouziDateFtt("yyyy-MM-dd hh:mm:ss",new Date),t=this.logObj;this.logObj={},this.logCount=0,Object.keys(t).forEach(i=>{let s={logType:"exposure",channelId:this.channelId,orgAppid:this.appid,uid:this._userinfo.uid,languageType:1,jumpAppid:t[i].slice(0,-1),locationIndex:Number(i),recommendType:1,screenId:1,sourceId:this.fromId,sourceChannel:Number(this.sourceChannelId),dt:e,sdkVersion:this.SdkVersion};this.logNavigate(s,function(e){})})},showTouTiaoMoreGamesModal(e,t){let i=this;Laya.Browser.window.tt.onNavigateToMiniProgram(function(e){}),Laya.Browser.window.tt.showMoreGamesModal({appLaunchOptions:this.toutiaoMoreGames,success(s){i.sendGameToGame(e),t&&t(!0),console.log("toutiao moregame show success")},fail(e){t&&t(!1),console.log("toutiao moregame show fail")}}),Laya.Browser.window.tt.onMoreGamesModalClose(function(e){})},setTouTiaoMoreGames(e){e.forEach(e=>{let t={togame:e.appid,boxAppid:e.boxAppId,orgAppid:this.appid,YouziUID:this.uid,YouziFixUID:this._userinfo.uid,userType:this._userinfo.type,locationIndex:e.locationIndex?e.locationIndex:de.CUSTOM_COMPONENT,anChannelId:e.anChannelId,ioChannelId:e.ioChannelId};this.extraDataLianYun(e,t),this.toutiaoMoreGames.push({appId:e.appid,extraData:t})})},navigateToOppoMiniGame(e,t){if(this.debug)console.log("oppo小游戏跳转成功");else{let i=this,s=e.pkgName.replace(/\s*/g,""),a={togame:e.appid,boxAppid:"leuokNull",orgAppid:i.appid,YouziUID:i.uid,YouziFixUID:i._userinfo.uid,userType:i._userinfo.type,locationIndex:e.locationIndex,anChannelId:e.anChannelId,ioChannelId:e.ioChannelId};Laya.Browser.window.qg.navigateToMiniGame({pkgName:s,extraData:a,success:function(){i.sendGameToGame(e),i.closeGamePage(),t&&t(!0),console.log("oppo小游戏跳转成功")},fail:function(e){i.closeGamePage(),i.notifyNavigateFailUIId(),t&&t(!1),console.log("oppo小游戏跳转失败:",JSON.stringify(e))}})}},extraDataLianYun(e,t){if(e.miniGameArgs&&""!=e.miniGameArgs){let i=JSON.parse(e.miniGameArgs),s=Object.keys(i)[0];if("togame"==s||"boxAppid"==s||"orgAppid"==s)return void console.log("联运附加key值冲突");t[s]=i[s]}},navigateToOtherGame(e,t){if(!Laya.Browser.window.wx)return t&&t(!1),void this.notifyNavigateFailUIId();if(!Laya.Browser.window.wx.navigateToMiniProgram)return;var i=this;let s=e.appid,a=!1,n="leuokNull";e.boxAppId&&""!=e.boxAppId&&(a=!0,n=s=e.boxAppId);let o={togame:e.appid,boxAppid:n,orgAppid:i.appid,YouziUID:i.uid,YouziFixUID:i._userinfo.uid,userType:i._userinfo.type,locationIndex:e.locationIndex?e.locationIndex:de.CUSTOM_COMPONENT,anChannelId:e.anChannelId,ioChannelId:e.ioChannelId},r=null;e.miniProgramArgs&&""!=e.miniProgramArgs&&(r=e.miniProgramArgs),(e.anChannelId||e.ioChannelId)&&(r=null!=r?r+"&anChannelId="+e.anChannelId+"&ioChannelId="+e.ioChannelId:"?anChannelId="+e.anChannelId+"&ioChannelId="+e.ioChannelId),console.log("mimiProgramPath:"+r),i.extraDataLianYun(e,o),console.log("extraData"+JSON.stringify(o)),Laya.Browser.window.wx.navigateToMiniProgram({appId:s,path:r,extraData:o,success(s){i.closeGamePage(),a?i.sendGameToBox(e):i.sendGameToGame(e),a=!1,t&&t(!0),console.log("navigateToMiniProgram success"),e.testPeriod&&"1"==e.testPeriod?localStorage.setItem(e.appid,"navigated"):"2"==e.testPeriod&&localStorage.setItem(e.appid,"CPACPS")},fail(e){t&&t(!1),i.notifyNavigateFailUIId(),i.closeGamePage(),console.log("navigateToMiniProgram fail",e)}})},notifyNavigateFailUIId(){switch(this.clickGameYouziUIId){case _e.Youzi_MainPush:case _e.Youzi_BottomBanner:case _e.Youzi_GuessLike:case _e.Youzi_FriendInviteGame:this.navigateToMiniCall&&this.navigateToMiniCall(this.clickGameYouziUIId),this.clickGameYouziUIId=0;break;default:console.log("不需要取消")}},closeGamePage(){this.gamePageCloseCall&&(this.gamePageCloseCall(),this.gamePageCloseCall=null)},sendJumpToOpen(e,t,i=1){let s="jump2open";"leuokNull"==t&&(s="app2open",t="");let a=this.YouziDateFtt("yyyy-MM-dd hh:mm:ss",new Date),n={logType:s,userType:this._userinfo.type,channelId:this.channelId,orgAppid:e,boxAppid:t,uid:this._userinfo.uid,languageType:1,jumpAppid:this.appid,locationIndex:i||de.CUSTOM_COMPONENT,recommendType:1,screenId:1,sourceId:this.fromId,sourceChannel:Number(this.sourceChannelId),dt:a,sdkVersion:this.SdkVersion};console.log(n),this.logNavigate(n,function(e){console.log("log event sendJumpToOpen success---")})},sendGameToGame(e){let t=this.YouziDateFtt("yyyy-MM-dd hh:mm:ss",new Date),i={logType:"app2app",userType:this._userinfo.type,channelId:this.channelId,orgAppid:this.appid,uid:this._userinfo.uid,languageType:1,jumpAppid:e.appid,locationIndex:e.locationIndex?e.locationIndex:de.CUSTOM_COMPONENT,recommendType:e.type,screenId:1,sourceId:this.fromId,sourceChannel:Number(this.sourceChannelId),dt:t,sdkVersion:this.SdkVersion};console.log(i),this.logNavigate(i,function(e){console.log("log event success---")})},sendGameToBox(e){let t=this.YouziDateFtt("yyyy-MM-dd hh:mm:ss",new Date),i={logType:"jump2box",userType:this._userinfo.type,channelId:this.channelId,orgAppid:this.appid,uid:this._userinfo.uid,languageType:1,boxAppid:e.boxAppId,jumpAppid:e.appid,locationIndex:e.locationIndex?e.locationIndex:de.CUSTOM_COMPONENT,recommendType:e.type,screenId:1,sourceId:this.fromId,sourceChannel:Number(this.sourceChannelId),dt:t,sdkVersion:this.SdkVersion};console.log(i),this.logNavigate(i,function(e){console.log("log event success---")})},wxPreviewImage(e,t,i){let s=this;Laya.Browser.window.wx.previewImage({current:e,urls:[e],success:function(){i&&i(!0),s.sendGameByQrcode(t)},fail:function(){i&&i(!1)}})},sendGameByQrcode(e){let t=this.YouziDateFtt("yyyy-MM-dd hh:mm:ss",new Date),i={logType:"showcode",userType:this._userinfo.type,channelId:this.channelId,orgAppid:this.appid,uid:this._userinfo.uid,languageType:1,jumpAppid:e.appid,locationIndex:e.locationIndex?e.locationIndex:de.CUSTOM_COMPONENT,recommendType:e.type,screenId:1,sourceId:this.fromId,sourceChannel:Number(this.sourceChannelId),dt:t,sdkVersion:this.SdkVersion};console.log(i),this.logNavigate(i,function(e){console.log("log event success---")})},logNavigate(e,t){console.log("send log---\x3e"+e),this.debug||this._request("POST",e,"https://bi.log.lightlygame.com/recommend/",t)},YouziDateFtt(e,t){var i={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};for(var s in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length))),i)new RegExp("("+s+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?i[s]:("00"+i[s]).substr((""+i[s]).length)));return e},getDatasByBIType(e){return 1==e?this.mainRecDatas:2==e?this.hotListDatas:3===e||4==e?this.matrixBannerDatas:5===e||10===e?this.moreDatas:6==e?this.gameBannerDatas:7==e?this.offlineBannerDatas:8==e||9==e?this.buyListDatas:(console.error("未找到中心化数据 locationIndex",e),[])},_initBannerShow(){if(this._bannerType==ae.MATRIX||this._bannerType==ae.GAME||this._bannerType==ae.WX)for(let e=0;e<this._bannerSwitchs.length;e++){const t=this._bannerSwitchs[e];if(t.destroyed){if(this._bannerSwitchs.splice(e,1),e--,this._bannerSwitchs.length<=0)break}else t&&t.bannerType==this._bannerType?t.showBanner():t&&t.hideBanner()}else if(this._bannerType==ae.SWITCH)for(let e=0;e<this._bannerSwitchs.length;e++){const t=this._bannerSwitchs[e];t&&t.bannerType==ae.MATRIX?t.showBanner():t&&t.hideBanner()}},getMultiMainAmount(e){return e>=this._mainRecAmount?this._mainRecAmount>=this.mainRecDatas.length?[this.mainRecDatas.length,!1]:[this._mainRecAmount,!0]:e>=this.mainRecDatas.length?[this.mainRecDatas.length,!1]:[e,!0]},getGamesIndex(e,t){if(0==this._gameIndexArr.length){this._gameIndexArrLength=e;for(let t=0;t<e;t++)this._gameIndexArr.push(t)}else if(e!=this._gameIndexArrLength){this._gameIndexArrLength=e;for(let t=0;t<e;t++)this._gameIndexArr.push(t)}if(e<=t)return this._gameIndexArr;{let i,s;for(;e;)s=Math.floor(Math.random()*e--),i=this._gameIndexArr[e],this._gameIndexArr[e]=this._gameIndexArr[s],this._gameIndexArr[s]=i;return this._gameIndexArr.slice(0,t)}},getRandomArrayElements(e,t){for(var i,s,a=e.length;a;)s=Math.floor(Math.random()*a--),i=e[a],e[a]=e[s],e[s]=i;return e.slice(0,t)},getRandomElementFromArray:e=>e[Math.floor(Math.random()*e.length)],addBanner(e){this._destroyUnuseWxBanner(e),this._bannerSwitchs.push(e),this._isDataLoaded&&this._initBannerShow()},refreshBannerSwitch(){this.curBannerType||(this.curBannerType=ae.WX),this.curBannerType=this.curBannerType==ae.WX?ae.MATRIX:ae.WX;for(let e=0;e<this._bannerSwitchs.length;e++){let t=this._bannerSwitchs[e];t&&t.bannerType==this.curBannerType?t.showBanner():t&&t.hideBanner()}},_destroyUnuseWxBanner(e){if(e.bannerType==ae.WX)for(let e=0;e<this._bannerSwitchs.length;e++){let t=this._bannerSwitchs[e];if(t&&t.bannerType==ae.WX)return t.destroySelf(),void this._bannerSwitchs.splice(e,1)}},_checkExposureInview(e,t,i,s,a){},getDataByAppId(e){let t=this._getDataByAppid(this.mainRecDatas,e);return t||(t=this._getDataByAppid(this.hotListDatas,e)),t||(t=this._getDataByAppid(this.buyListDatas,e)),t},getDataFromAllGameObj(e){return this.allBeRecommendGames[e]},_getDataByAppid(e,t){for(let i=0;i<e.length;i++)if(e[i].appid==t)return e[i];return null},scrollviewAction(e,t,i){},miscClampf(e,t,i){if(t>i){var s=t;t=i,i=s}return e<t?t:e<i?e:i},BI_AppOnce(e){let t=this.getBI();t&&t.leuok&&t.leuok.appOnce(e)},BI_Action(e){let t=this.getBI();t&&t.leuok&&t.leuok.action(e)},BI_WXBannerError(e){let t=this.getBI();t&&t.leuok&&t.leuok.error(e)},getBI:()=>void 0!==Laya.Browser.window.wx?Laya.Browser.window.wx:void 0!==Laya.Browser.window.BK?Laya.Browser.window.BK:void 0!==Laya.Browser.window.qg?Laya.Browser.window.qg:"undefined"!=typeof window?window:void 0,youziLog(e,t){this.debug&&console.log(e,t)},readFile(e,t){Laya.Browser.window.wx&&Laya.Browser.window.wx.getFileSystemManager().readFile({filePath:e,encoding:"utf-8",success:function(e){t(e.data),console.log("----\x3ereadFile success:",e.data)},fail:function(e){console.log("----\x3ereadFile fail:",e.errMsg)}})},writeFile(e,t){Laya.Browser.window.wx&&Laya.Browser.window.wx.getFileSystemManager().writeFile({filePath:e,data:t,encoding:"utf-8",success:function(){console.log("-----\x3ewrite file success")},fail:function(e){console.log("-----\x3ewrite file fail:",e.errMsg)}})},getAspectRatio(){return this.aspectRatio},jsonHasKey:(e,t)=>e.hasOwnProperty(t),getDataLoaded(){return this._isDataLoaded},getBottomCloseBtnHide(){return this._bottomBannerCloseBtnHide},getBottomNameHide(){return this._bottomBannerNameHide},getMainNameHide(){return this._mainPushNameHide},getMainNameHideScale(){return this._mainPushScale},setPropertiesValue(e,t){this[e]=t},getPropertiesValue(e){return this[e]},openFullNavigate(e){this.openFullScreenNavigate=e},getOpenFullNavigate(){return this.openFullScreenNavigate},getIsVertical:()=>!(Laya.stage.width>Laya.stage.height),dataNullReset(e){this[e].length<=0&&(this[e]=this.moreDatas)},getYouziInviteGameFilterDatas(e){Be.youziInviteGameFilterDatas(e)},compareToutiaoVersion(e,t){e=e.split("."),t=t.split(".");const i=Math.max(e.length,t.length);for(;e.length<i;)e.push("0");for(;t.length<i;)t.push("0");for(let s=0;s<i;s++){const i=parseInt(e[s]),a=parseInt(t[s]);if(i>a)return 1;if(i<a)return-1}return 0}},Be={inviteGameAllInLine:!1,youziInviteGameFilterDatas(e){if(this.inviteGameAllInLine)e(ke.friendInviteGameDatas);else{let t=[];Be.getWechatSaveData("YZ_USER_DATA",i=>{i?(t=Be.getInviteGameDataAnalyse(i),e(t),this.inviteGameAllInLine=t.length==ke.friendInviteGameDatas.length):e(t)})}},getInviteGameDataAnalyse(e){if(ke.friendInviteGameDatas.length>0){let t=ke.friendInviteGameDatas.filter(t=>!!t.hasOwnProperty("goodCondition")&&this.inviteGameDataFilterCondition(e,t.goodCondition));return console.log("符合条件的优选游戏:",t),t}return console.log("后台未配置优选游戏"),[]},inviteGameDataFilterCondition(e,t){let i=0;for(let s=(t=JSON.parse(t)).length-1;s>=0;s--){let a=e[t[s].type];if(!a)break;if(!(a>=Number(t[s].num)))break;i+=1}return 0!=i&&0!=t.length&&i>=t.length},getWechatSaveData(e,t){Laya.Browser.window.wx.getStorage({key:e,success:function(e){t&&(console.log("用户优选记录: ",e.data),t(e.data))},fail:function(){t&&(console.log("用户优选记录失败: "),t({}))}})}},Te={};class Me{constructor(e,t){this.atlasPngUrl=null,this.animaPlaySpeed=100,(e||e>120)&&(Me.unitAtlasPngWidth=e),(t||t>120)&&(Me.unitAtlasPngHeight=t)}createAnimation(e,t){this.atlasPngUrl=e,Te.hasOwnProperty(this.atlasPngUrl)?t(Te[this.atlasPngUrl]):this.loadAnimaRes(t)}loadAnimaRes(e){Laya.loader.load(this.atlasPngUrl,new Laya.Handler(this,this.atlasPngRect,[e]),null,Laya.Loader.IMAGE)}atlasPngRect(e,t){for(var i=[],s=0;s<4;s++)for(var a=0;a<4;a++){var n=Laya.Texture.createFromTexture(t,a*Me.unitAtlasPngWidth,s*Me.unitAtlasPngHeight,Me.unitAtlasPngWidth,Me.unitAtlasPngHeight),o=new Laya.Graphics;o.drawTexture(n),i.push(o)}var r=new Laya.Animation;r.frames=i,r.interval=this.animaPlaySpeed,Te[this.atlasPngUrl]=r,e(r)}}Me.unitAtlasPngWidth=120,Me.unitAtlasPngHeight=120;class Ue extends Y.youzi.Youzi_MainPushUI{constructor(e){super(),this.mainRecData=null,this.curMainRecIdx=0,this.mainRecItemExposure={},this.createMainPushType=1,this.leftTween=null,this.rightTween=null,this.updateMainRecTimer=!1,this.startTimer=!0,this.initCustomParams(e),this.visible=!1,this.btnMainRecBg.visible=!1}initCustomParams(e){e&&(this.x=e.hasOwnProperty("x")?e.x:0,this.y=e.hasOwnProperty("y")?e.y:0,this.scaleX=e.hasOwnProperty("scaleX")?e.scaleX:1,this.scaleY=e.hasOwnProperty("scaleY")?e.scaleX:1,this.createMainPushType=e.hasOwnProperty("createMainPushType")?e.createMainPushType:this.createMainPushType,this.mainRecData=e.hasOwnProperty("mainRecData")?e.mainRecData:this.mainRecData)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){if(ke.mainRecDatas.length>0){if(ke.getMainNameHide()){this.slogan.visible=!1,this.iconBg.visible=!1;let e=ke.getMainNameHideScale();this.btnMainRecBg.scale(e,e)}1==this.createMainPushType&&(this.mainRecData=ke.mainRecDatas[0]),this.btnMainRecBg.on(Laya.Event.CLICK,this,this.onBtnMainRecClicked),this.visible=!0,this.btnMainRecBg.visible=!0,this.btnMainRecBg.rotation=10,this.addMainAnimaOrImage(),ke.sendExposureLog(this.mainRecData,de.MAIN),this.mainRecItemExposure[this.mainRecData.appid]=1,this.startTimerLoop()}}startTimerLoop(){this.startTimer&&(this.startTimer=!1,1==this.createMainPushType&&ke.mainRecDatas.length>1&&(this.updateMainRecTimer=!0,Laya.timer.loop(5e3,this,this.updateMainRec)),this.mainPushRotationAction())}clearTimerLoop(){this.btnMainRecBg.rotation=10,this.startTimer=!0,this.updateMainRecTimer&&(this.updateMainRecTimer=!1,Laya.timer.clear(this,this.updateMainRec)),this.leftTween&&Laya.Tween.clear(this.leftTween),this.rightTween&&Laya.Tween.clear(this.rightTween)}mainPushRotationAction(){this.rotatotionRight()}rotatotionRight(){this.rightTween=Laya.Tween.to(this.btnMainRecBg,{rotation:-10},2e3,null,new Laya.Handler(this,this.rotationLeft))}rotationLeft(){this.leftTween=Laya.Tween.to(this.btnMainRecBg,{rotation:10},2e3,null,new Laya.Handler(this,this.rotatotionRight))}updateMainRec(){this.curMainRecIdx=this.curMainRecIdx+1>=ke.mainRecDatas.length?0:this.curMainRecIdx+1,this.mainRecData=ke.mainRecDatas[this.curMainRecIdx],this.addMainAnimaOrImage(),this.mainRecItemExposure[this.mainRecData.appid]||(ke.sendExposureLog(this.mainRecData,de.MAIN),this.mainRecItemExposure[this.mainRecData.appid]=1)}updateMainRecMultiple(e){this.mainRecData=e,this.addMainAnimaOrImage(),this.mainRecItemExposure[e.appid]||(ke.sendExposureLog(e,de.MAIN),this.mainRecItemExposure[e.appid]=1)}addMainAnimaOrImage(){if(1==this.mainRecData.dynamicType&&this.mainRecData.dynamicIcon){var e=this;this.mainAnima.scale(.75,.75),this.iconMainRec.visible=!1,(new Me).createAnimation(this.mainRecData.dynamicIcon,function(t){e.mainAnima.frames=t.frames,e.mainAnima.interval=t.interval,e.mainAnima.visible=!0,e.mainAnima.play()})}else this.mainAnima.visible=!1,this.iconMainRec.visible=!0,this.iconMainRec.skin=this.mainRecData.iconImg;""!=this.mainRecData.title||null!=this.mainRecData.title?this.slogan.text=this.mainRecData.title:""==this.mainRecData.slogan&&null==this.mainRecData.slogan||(this.slogan.text=this.mainRecData.slogan)}onBtnMainRecClicked(){ke.clickGameYouziUIId=_e.Youzi_MainPush,this.mainRecData.locationIndex=de.MAIN,ke.startOtherGame(this.mainRecData,null),1==this.createMainPushType&&this.updateMainRec()}}class Re{static getInstance(){return this.instance||(this.instance=new Re),this.instance}createItemLabel(e,t,i){e.text=t}createItemImage(e,t){e.skin=t}createAltasPngAnima(e,t){(new Me).createAnimation(t,function(t){e.frames=t.frames,e.interval=t.interval,e.play()})}createYouziListItemScale(e,t,i,s,a,n,o){e.scale(n,o),this.createYouziListItem(e,t,i,s,a)}createYouziListItem(e,t,i,s,a){var n=e.getChildByName(t),o=e.getChildByName(i);s&&(e.getChildByName(s).text=a.title);if(1==a.dynamicType&&a.dynamicIcon){let e=o.width/120;e=Number(e.toFixed(2)),o.scale(e,e),o.visible=!0,n.visible=!1,(new Me).createAnimation(a.dynamicIcon,function(e){o.frames=e.frames,o.interval=e.interval,o.play()})}else o.visible=!1,n.visible=!0,n.skin=a.iconImg}}Re.instance=null;class Ae extends Y.youzi.Youzi_BottomBannerUI{constructor(e,t){super(),this.namelabLabel="namelab",this.listItemScale={x:1,y:1},this.bannerType=ae.MATRIX,this.bannerBottomItemExposure={},this.isOffSwitch=!1,this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.stopAction=!1,this.curFront=!0,this.curBack=!1,this.isClick=!1,this.endCompletHandler=null,this.startCompleteHandler=null,this.dur=10,this.scaleUI=1,this.visible=!1,this.BannerBottomUI.visible=!1,this.bottomList.hScrollBarSkin="",this.isOffSwitch=e,this.designWHAdapter(),this.initCustomParams(t)}designWHAdapter(){Laya.stage.designWidth<Laya.stage.designHeight?720!=Laya.stage.designWidth&&(this.scaleUI=Laya.stage.designWidth/720,this.scale(this.scaleUI,this.scaleUI)):720!=Laya.stage.designHeight&&(this.scaleUI=Laya.stage.designHeight/720,this.scale(this.scaleUI,this.scaleUI))}initCustomParams(e){e?(this.uiStateCallCopy=e.hasOwnProperty("uiStateCall")?e.uiStateCall:null,this.x=e.hasOwnProperty("x")?e.x:Laya.stage.width/2-this.BannerBottomUI.width/2,this.y=e.hasOwnProperty("y")?e.y:Laya.stage.height-this.BannerBottomUI.height):this.pos(Laya.stage.width/2-this.BannerBottomUI.width/2,Laya.stage.height-this.BannerBottomUI.height)}setYouziPosition(e,t){this.pos(e,t)}setUICompleteCall(e){this.uiCompleteCallCopy=e}notifyUIComplete(e,t){this.uiCompleteCallCopy&&this.uiCompleteCallCopy(e,t)}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){ke.dataNullReset("matrixBannerDatas"),ke.matrixBannerDatas.length<=0||(this.loadBottomList(),this.isOffSwitch||ke.addBanner(this))}loadBottomList(){ke.getBottomNameHide()&&(this.namelabLabel=null,this.listItemScale.x=1.2,this.listItemScale.y=1.2,this.bottomList.spaceX=45),ke.getBottomCloseBtnHide(),this.bottomList.array=ke.matrixBannerDatas,this.bottomList.renderHandler=new Laya.Handler(this,this.onListRender),this.bottomList.mouseHandler=new Laya.Handler(this,this.onBannerItemMouseEvent),this.bottomList.on(Laya.Event.MOUSE_UP,this,this.scrollMoveUp),this.notifyUIComplete(_e.Youzi_BottomBanner,{complete:!0}),this.dur=ke.matrixBannerDatas.length?5e3*(ke.matrixBannerDatas.length-5):5e3,this.bottomlistAutoScroll()}onListRender(e,t){Re.getInstance().createYouziListItemScale(e,"icon","iconAnima",this.namelabLabel,ke.matrixBannerDatas[t],this.listItemScale.x,this.listItemScale.y),t==this.bottomList.length-1&&ke.getPropertiesValue("_bottomBannerScrollType")==ne.Type_One&&this.listTweenEndForeverCall(),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&this.BannerBottomUI.visible&&(this.bannerBottomItemExposure[ke.matrixBannerDatas[e].appid]||(ke.sendExposureLog(ke.matrixBannerDatas[e],de.MATRIX),this.bannerBottomItemExposure[ke.matrixBannerDatas[e].appid]=1))}onBannerItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){if(!this.isClick){this.isClick=!0,console.log("当前选择的bottombanner索引:"+t),ke.clickGameYouziUIId=_e.Youzi_BottomBanner;var i=ke.matrixBannerDatas[t];i.locationIndex=de.MATRIX,ke.startOtherGame(i,this.startOtherCall.bind(this))}}else e.type}scrollMoveUp(){Laya.timer.frameOnce(300,this,this.starBottomBannerAction)}startOtherCall(e){this.isClick=!1,this.starBottomBannerAction()}stopBottomBannerAcion(){this.bottomList.scrollBar.stopScroll(),this.bottomList.scrollTo(0),this.stopAction=!0}starBottomBannerAction(){this.stopAction=!1,this.bottomlistAutoScroll()}bottomlistAutoScroll(){switch(ke.getPropertiesValue("_bottomBannerScrollType")){case ne.Type_Zero:this.goAndBackTween();break;case ne.Type_One:this.listTweenEndForever();break;default:this.goAndBackTween()}}listTweenEndForever(){this.bottomList.length<=5||this.stopAction||this.bottomList.tweenTo(this.bottomList.length-1,this.dur)}listTweenEndForeverCall(){Laya.timer.once(300,this,function(){this.bottomList.scrollTo(0),this.listTweenEndForever()}.bind(this))}goAndBackTween(){this.bottomList.length<=5||(this.curFront&&!this.curBack?this.listTweenToEnd():!this.curFront&&this.curBack&&this.listTweenToStart())}listTweenToEnd(){this.stopAction||(this.endCompletHandler=new Laya.Handler(this,this.listTweenToStart,null,!0),this.bottomList.tweenTo(this.bottomList.length-1,this.dur,this.endCompletHandler)),this.curFront=!0,this.curBack=!1}listTweenToStart(){this.stopAction||(this.startCompleteHandler=new Laya.Handler(this,this.listTweenToEnd,null,!0),this.bottomList.tweenTo(0,this.dur,this.startCompleteHandler)),this.curFront=!1,this.curBack=!0}showBanner(){this&&(this.visible=!0,this.BannerBottomUI.visible=!0,this.notifyUIState(_e.Youzi_BottomBanner,!0),this.stopAction&&this.starBottomBannerAction())}hideBanner(){this&&(this.stopBottomBannerAcion(),this.visible=!1,this.BannerBottomUI.visible=!1,this.notifyUIState(_e.Youzi_BottomBanner,!1))}destroySelf(){this&&this.removeSelf()}}const De={BOTTOM:1,TOP:2};class ze{constructor(e,t=null,i=null,s=!1,a=!1){this.isLoadOk=!1,this.adUnitId=null,this.posType=1,this.offset={x:0,y:0},this.bannerType=ae.WX,this.isShowBanner=!1,this.isOffSwitch=!1,this.isOffSwitchSelf=!1,this.bannerAd=null,this.refreshTimer=null,this.adUnitId=e,this.posType=t||1,this.offset=i||{x:0,y:0},this.isOffSwitch=s,this.isOffSwitchSelf=a,this.initShow()}initShow(){this.isLoadOk=ke.getDataLoaded(),this.isLoadOk?this.freshShow():ke._loadedCallBacks.push(this.freshShow.bind(this))}freshShow(){this.createWXBanner(),this.isOffSwitch||(ke.addBanner(this),this._autoSwitchSelf())}createWXBanner(){if(Laya.Browser.window.wx&&Laya.Browser.window.wx.createBannerAd){var e=this,t=Laya.Browser.window.wx.getSystemInfoSync().screenWidth,i=Laya.Browser.window.wx.getSystemInfoSync().screenHeight,s=Laya.stage.designWidth,a=Laya.stage.designHeight,n=t/s*100+(i-t/s*a)/2,o=e.bannerAd;e.bannerAd=Laya.Browser.window.wx.createBannerAd({adUnitId:this.adUnitId,style:{left:this.offset.x,top:this.offset.y,width:t}});var r=!1;e.bannerAd.onResize(function(s){if(!r){if(e.bannerAd.style.realHeight>n){r=!0;var a=t*n/e.bannerAd.style.realHeight;a=ke.miscClampf(a,300,9999),e.bannerAd.style.width=a,e.bannerAd.style.top=i-e.bannerAd.style.realHeight*(a/e.bannerAd.style.realWidth)+e.offset.y,e.bannerAd.style.left=(t-e.bannerAd.style.width)/2+e.offset.x}else e.bannerAd.style.top=i-e.bannerAd.style.realHeight+e.offset.y,i/t>2&&(e.bannerAd.style.top=e.bannerAd.style.top-34+e.offset.y);e.posType==De.TOP&&(e.bannerAd.style.left=(t-e.bannerAd.style.width)/2+e.offset.x,e.bannerAd.style.top=e.offset.y,i/t>2?e.bannerAd.style.top+=76:t/i>2&&(e.bannerAd.style.top+=76))}}),e.bannerAd.onLoad(function(t){o&&(o.hide(),o.destroy()),e.isShowBanner?e.bannerAd.show():e.bannerAd.hide()}),e.bannerAd.onError(function(e){console.warn("微信banner广告出错",e)})}}showBanner(){this.isShowBanner=!0,this.bannerAd&&this.bannerAd.show()}hideBanner(){this.isShowBanner=!1,this.bannerAd&&this.bannerAd.hide()}destroySelf(){this.bannerAd&&(this.bannerAd.destroy(),this.bannerAd=null),this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null),this.isShowBanner=!1}switchBannerNow(){this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null),this.createWXBanner(),this._autoSwitchSelf()}_autoSwitchSelf(){if(!this.isOffSwitchSelf){var e=this;this.refreshTimer=setInterval(function(){e.createWXBanner()},1e3*ke._bannerCreateInterval)}}}class Ge extends Y.youzi.Youzi_GameBannerViewUI{constructor(e,t){super(),this.isOffSwitch=!1,this.bannerType=ae.GAME,this.switchTime=5,this.gameBannerItemExposure={},this.startSwitchIndex=0,this.isHide=!1,this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.pos(Laya.stage.width/2-this.GameBannerList.width/2,Laya.stage.height-this.GameBannerList.height),this.visible=!1,this.GameBannerList.hScrollBarSkin="",this.isOffSwitch=e,this.switchTime=t<5?5:t,this.switchTime*=1e3}setYouziPosition(e,t){this.pos(e,t)}setUICompleteCall(e){this.uiCompleteCallCopy=e}notifyUIComplete(e,t){this.uiCompleteCallCopy&&this.uiCompleteCallCopy(e,t)}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){ke.dataNullReset("gameBannerDatas"),ke.gameBannerDatas.length<=0||(this.loadGameBannerList(),this.creatGameBannerTimerLoop(),this.isOffSwitch||ke.addBanner(this))}loadGameBannerList(){this.GameBannerList.repeatX=ke.gameBannerDatas.length;for(var e=[],t=0;t<ke.gameBannerDatas.length;t++)e.push({infoData:ke.gameBannerDatas[t]});this.GameBannerList.mouseHandler=new Laya.Handler(this,this.onGameBannerItemMouseEvent),this.GameBannerList.dataSource=e;for(var i=0;t<ke.gameBannerDatas.length;i++){this.GameBannerList.getCell(i).getChildByName("icon").skin=ke.gameBannerDatas[i].bannerImg}this.notifyUIComplete(_e.Youzi_GameBanner,{complete:!0})}creatGameBannerTimerLoop(){Laya.timer.loop(this.switchTime,this,this.updateGameBaner)}clearGameBannerTimerLoop(){Laya.timer.clear(this,this.updateGameBaner)}updateGameBaner(e){ke.gameBannerDatas.length<=1?this.checkExposure():(this.startSwitchIndex=this.GameBannerList.startIndex+1,this.GameBannerList.scrollTo(this.startSwitchIndex>=this.GameBannerList.length?0:this.startSwitchIndex),this.checkExposure())}checkExposure(){if(this.visible){var e=ke.gameBannerDatas[this.startSwitchIndex];this.gameBannerItemExposure[e.appid]||(this.gameBannerItemExposure[e.appid]=1,ke.sendExposureLog(e,de.GAME))}}onGameBannerItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的gamebannerlist索引:"+t);var i=ke.gameBannerDatas[t];i.locationIndex=de.GAME,i.type=5,ke.clickGameYouziUIId=_e.Youzi_GameBanner,ke.startOtherGame(i,null)}else e.type}showBanner(){this&&(this.visible=!0,this.isHide&&(this.isHide=!1,this.creatGameBannerTimerLoop()),this.notifyUIState(_e.Youzi_GameBanner,!0))}hideBanner(){this&&(this.isHide=!0,this.visible=!1,this.clearGameBannerTimerLoop(),this.notifyUIState(_e.Youzi_GameBanner,!1))}destroySelf(){this&&this.removeSelf()}}class Ee{constructor(e){this.multipleAmount=1,this.isUpdateMainPush=!1,this.multipleMainPushObj=[],this.paramsJsonArray=[],this.randomData=[],this.startTimerMulti=!0,this.paramsJsonArray=e,this.initShow()}initShow(){ke.getDataLoaded()?this.creatYouziMultipleMainPush():ke._loadedCallBacks.push(this.creatYouziMultipleMainPush.bind(this))}creatYouziMultipleMainPush(){var e=ke.getMultiMainAmount(this.paramsJsonArray.length);this.multipleAmount=e[0],this.isUpdateMainPush=e[1],this.randomData=ke.getGamesIndex(ke.mainRecDatas.length,this.multipleAmount);for(var t=0;t<this.randomData.length;t++){var i=this.paramsJsonArray[t];if(i.hasOwnProperty("parentNode")){i.createMainPushType=2,i.mainRecData=ke.mainRecDatas[this.randomData[t]];var s=new Ue(i);i.parentNode.addChild(s),this.multipleMainPushObj.push(s)}else console.log("多主推数组参数下标"+t+"中父节点为空")}this.startChangeTimeLoop()}startChangeTimeLoop(){if(this.startTimerMulti){this.startTimerMulti=!1,this.isUpdateMainPush&&Laya.timer.loop(5e3,this,this.updateMultipleMainPush);for(var e=0;e<this.multipleMainPushObj.length;e++)this.multipleMainPushObj[e].startTimerLoop()}}stopChangeTimeLoop(){this.isUpdateMainPush&&Laya.timer.clear(this,this.updateMultipleMainPush);for(var e=0;e<this.multipleMainPushObj.length;e++)this.multipleMainPushObj[e].clearTimerLoop();this.startTimerMulti=!0}updateMultipleMainPush(){this.randomData=ke.getGamesIndex(ke.mainRecDatas.length,this.multipleAmount);for(var e=0;e<this.multipleMainPushObj.length;e++)this.multipleMainPushObj[e].updateMainRecMultiple(ke.mainRecDatas[this.randomData[e]])}}class He extends Y.youzi.Youzi_SlideBannerUI{constructor(e,t){super(),this.namelabLabel="namelab",this.slideItemExposure={},this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.slideButton=null,this.showFirst=!1,this.isLeft=!1,this.stopAction=!1,this.moveDistance=this.width,this.scaleUI=1,this.dur=5e3,this.listMoveSpeed=80,this.isLeft=e,this.visible=!1,this.SlideBannerUI.visible=!1,this.SlideBannerList.vScrollBarSkin="",e?this.left=-this.width:(this.right=-this.width,this.SlideBannerBg.scaleX=-1,this.SlideBannerBg.pos(this.SlideBannerBg.width,this.SlideBannerBg.y),this.SlideBannerList.pos(80,this.SlideBannerList.y)),this.designWHAdapter(),this.initCustomParams(t),this.btnSLideClose.on(Laya.Event.CLICK,this,this.closeSlideWindow)}designWHAdapter(){ke.getIsVertical()?720!=Laya.stage.designWidth&&(this.scaleUI=Laya.stage.designWidth/720,this.scale(this.scaleUI,this.scaleUI)):(this.height=614,this.SlideBannerUI.height=614,this.SlideBannerBg.height=614,this.slideBgLeft.height=614,this.SlideBannerList.height=600,720!=Laya.stage.designHeight&&(this.scaleUI=Laya.stage.designHeight/720,this.scale(this.scaleUI,this.scaleUI))),this.y=Laya.stage.height/2-this.height*this.scaleUI/2,this.moveDistance=this.width*this.scaleUI}initCustomParams(e){e&&(this.uiStateCallCopy=e.hasOwnProperty("uiStateCall")?e.uiStateCall:null,e.hasOwnProperty("y")&&(this.y=e.y),e.hasOwnProperty("scaleY")&&(this.scaleY=e.scaleY),e.hasOwnProperty("scaleX")&&(this.scaleX=e.scaleX,this.moveDistance=this.width*e.scaleX))}setSlideButton(e){this.slideButton=e}notifyUIComplete(e,t){this.uiCompleteCallCopy&&this.uiCompleteCallCopy(e,t)}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}slideBtnVisible(e){this.slideButton&&(this.slideButton.visible=e)}showSlideWindow(){if(ke.hotListDatas.length<=0)console.log("抽屉没有数据");else if(!this.SlideBannerUI.visible){this.visible=!0,this.SlideBannerUI.visible=!0,this.slideBtnVisible(!1);let e=this,t=function(){e.startListTween(),e.notifyUIState(_e.Youzi_SlideWindow,!0),e.showFirst||(e.showFirst=!0,e.checkExposure())};this.slideWindowActionShow(t)}}slideWindowActionShow(e){this.isLeft?Laya.Tween.to(this,{left:0},500,Laya.Ease.quadInOut,Laya.Handler.create(this,e)):Laya.Tween.to(this,{right:0},500,Laya.Ease.quadInOut,Laya.Handler.create(this,e))}closeSlideWindow(){let e=this;this.slideWindowActionClose(function(){e.stopListTween(),e.visible=!1,e.SlideBannerUI.visible=!1,e.btnSLideClose.visible=!0,e.slideBtnVisible(!0),e.notifyUIState(_e.Youzi_SlideWindow,!1)}),e.btnSLideClose.visible=!1}slideWindowActionClose(e){this.isLeft?Laya.Tween.to(this,{left:-this.moveDistance},500,Laya.Ease.quadOut,Laya.Handler.create(this,e)):Laya.Tween.to(this,{right:-this.moveDistance},500,Laya.Ease.quadOut,Laya.Handler.create(this,e))}initShow(){ke.dataNullReset("hotListDatas"),ke.getPropertiesValue(oe.SlideWindow_Name)&&(this.namelabLabel=null,this.SlideBannerList.spaceY=-15),ke.hotListDatas.length>0&&(this.slideButton&&(this.slideButton.visible=!0),this.dur=155*(ke.hotListDatas.length+1)/this.listMoveSpeed*1e3,this.SlideBannerList.array=ke.hotListDatas,this.SlideBannerList.renderHandler=new Laya.Handler(this,this.onListRender),this.SlideBannerList.mouseHandler=new Laya.Handler(this,this.onslideListItemMouseEvent),this.SlideBannerList.on(Laya.Event.MOUSE_UP,this,this.scrollMoveUp))}onListRender(e,t){0==ke.hotListDatas[t].hotred&&(e.getChildByName("markImg").visible=!1);Re.getInstance().createYouziListItem(e,"icon","iconAnima",this.namelabLabel,ke.hotListDatas[t]),t==this.SlideBannerList.length-1&&this.listTweenEndForeverCall(),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&this.SlideBannerUI.visible&&(this.slideItemExposure[ke.hotListDatas[e].appid]||(ke.sendExposureLog(ke.hotListDatas[e],de.FLOAT),this.slideItemExposure[ke.hotListDatas[e].appid]=1))}scrollMoveUp(){this.stopAction=!0,this.SlideBannerList.scrollBar.stopScroll(),Laya.timer.frameOnce(300,this,this.startListTween)}stopListTween(){this.SlideBannerList.scrollBar.stopScroll(),this.SlideBannerList.scrollTo(0),this.stopAction=!0}startListTween(){this.stopAction=!1,this.listTweenEndForever()}listTweenEndForever(){this.SlideBannerList.length<=5||this.stopAction||this.SlideBannerList.tweenTo(this.SlideBannerList.length-1,this.dur)}listTweenEndForeverCall(){Laya.timer.once(300,this,function(){this.SlideBannerList.scrollTo(0),this.listTweenEndForever()}.bind(this))}onslideListItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的抽屉索引:"+t);var i=ke.hotListDatas[t];if(i.locationIndex=de.FLOAT,ke.clickGameYouziUIId=_e.Youzi_SlideWindow,ke.startOtherGame(i,null),1==i.hotred)this.SlideBannerList.getCell(t).getChildByName("markImg").visible=!1}else e.type}checkExposure(){if(this.SlideBannerUI.visible)for(var e=0;e<ke.hotListDatas.length&&!(e>5);e++){var t=ke.hotListDatas[e];this.slideItemExposure[t.appid]||(this.slideItemExposure[t.appid]=1,ke.sendExposureLog(t,de.FLOAT))}}}class Oe extends Y.youzi.Youzi_MoreGameUI{constructor(e){super(),this.namelabLabel="namelab",this.mainItemExposure={},this.fisrtShow=!1,this.isCreate=!1,this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.moreBtn=null,this.curFront=!0,this.curBack=!1,this.stopAction=!1,this.isClick=!1,this.dur=5e3,this.endCompletHandler=null,this.startCompleteHandler=null,this.scaleMoreGameUI=1,this.isAddToStage=!1,this.designWHAdapter(),this.initCustomParams(e),this.visible=!1,this.MoreGameUI.visible=!1,this.moreGameList.vScrollBarSkin="",this.moreGameCloseBtn.on(Laya.Event.CLICK,this,this.onBtnCloseClicked)}designWHAdapter(){Laya.stage.designWidth!=this.width&&(this.scaleMoreGameUI=Laya.stage.designWidth/this.width,this.MoreGameUI.scale(this.scaleMoreGameUI,this.scaleMoreGameUI),this.maskBG.scale(this.scaleMoreGameUI,this.scaleMoreGameUI),this.width=Laya.stage.designWidth),Laya.stage.designHeight!=this.height&&(this.maskBG.scaleY=Laya.stage.designHeight/this.height,this.height=Laya.stage.designHeight)}initCustomParams(e){e?(this.MoreGameUI.x=e.hasOwnProperty("x")?e.x:(Laya.stage.width-this.MoreGameUI.width*this.scaleMoreGameUI)/2,this.MoreGameUI.y=e.hasOwnProperty("y")?e.y:(Laya.stage.height-this.MoreGameUI.height*this.scaleMoreGameUI)/2,this.uiStateCallCopy=e.hasOwnProperty("uiStateCall")?e.uiStateCall:null):this.MoreGameUI.pos((Laya.stage.width-this.MoreGameUI.width*this.scaleMoreGameUI)/2,(Laya.stage.height-this.MoreGameUI.height*this.scaleMoreGameUI)/2)}setAddToStage(e){this.isAddToStage=e}setMoreGameBtn(e){this.moreBtn=e}notifyUIComplete(e,t){this.uiCompleteCallCopy&&this.uiCompleteCallCopy(e,t)}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}showMoreGameUI(){this.isCreate&&!this.visible&&(this.isAddToStage&&(this.zOrder=le.UI_ZORDER_THREE),this.visible=!0,this.MoreGameUI.visible=!0,this.starMoreGameAction(),this.notifyUIState(_e.Youzi_MoreGame,!0),this.checkExposure())}onBtnCloseClicked(){this.stopMoreGameAcion(),this.visible=!1,this.MoreGameUI.visible=!1,this.mainItemExposure={},this.notifyUIState(_e.Youzi_MoreGame,!1),this.isAddToStage&&(this.zOrder=0)}initShow(){ke.getPropertiesValue(oe.MoreGame_Name)&&(this.namelabLabel=null,this.moreGameList.spaceY=-15),ke.moreDatas.length>0&&(this.moreBtn&&(this.moreBtn.visible=!0),this.moreGameList.array=ke.moreDatas,this.moreGameList.renderHandler=new Laya.Handler(this,this.onListRender),this.moreGameList.mouseHandler=new Laya.Handler(this,this.moreGameListMouseEvent),this.isCreate=!0,this.notifyUIComplete(_e.Youzi_MoreGame,{complete:!0}),this.dur=ke.moreDatas.length>12?5e3*(ke.moreDatas.length-12):5e3)}onListRender(e,t){Re.getInstance().createYouziListItem(e,"icon","iconAnima",this.namelabLabel,ke.moreDatas[t]),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&this.MoreGameUI.visible&&(this.mainItemExposure[ke.moreDatas[e].appid]||(ke.sendExposureLog(ke.moreDatas[e],de.MORE),this.mainItemExposure[ke.moreDatas[e].appid]=1))}stopMoreGameAcion(){this.stopAction=!0}starMoreGameAction(){this.moreGameListAutoScroll()}moreGameListAutoScroll(){this.MoreGameUI.visible&&(this.moreGameList.length<=15||(this.stopAction=!1,this.curFront&&!this.curBack?this.listTweenToEnd():!this.curFront&&this.curBack&&this.listTweenToStart()))}listTweenToEnd(){this.stopAction||(this.endCompletHandler=new Laya.Handler(this,this.listTweenToStart,null,!0),this.moreGameList.tweenTo(this.moreGameList.length-1,this.dur,this.endCompletHandler)),this.curFront=!0,this.curBack=!1}listTweenToStart(){this.stopAction||(this.startCompleteHandler=new Laya.Handler(this,this.listTweenToEnd,null,!0),this.moreGameList.tweenTo(0,this.dur,this.startCompleteHandler)),this.curFront=!1,this.curBack=!0}moreGameListMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){if(!this.isClick){this.isClick=!0,console.log("当前选择的更多游戏索引:"+t);var i=ke.moreDatas[t];i.locationIndex=de.MORE,ke.clickGameYouziUIId=_e.Youzi_MoreGame,ke.startOtherGame(i,this.startOtherCall.bind(this))}}else e.type}startOtherCall(){this.isClick=!1,this.starMoreGameAction()}checkExposure(){if(this.MoreGameUI.visible)for(var e=0;e<ke.moreDatas.length&&!(e>14);e++){var t=ke.moreDatas[e];this.mainItemExposure[t.appid]||(this.mainItemExposure[t.appid]=1,ke.sendExposureLog(t,de.MORE))}}}class Pe extends Y.youzi.Youzi_SlideWindowUI{constructor(e,t){super(),this.namelabLabel="namelab",this.slideItemExposure={},this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.slideButton=null,this.slideMask=null,this.showFirst=!1,this.isLeft=!1,this.isAddStage=!1,this.moveDistance=this.width,this.scaleUI=1,this.isLeft=e,this.visible=!1,this.SlideWindowUI.visible=!1,this.slideList.vScrollBarSkin="",e?this.left=-this.width:(this.right=-this.width,this.slideBg.scaleX=-1,this.slideBg.pos(this.slideBg.width,this.slideBg.y),this.slideList.pos(2*this.slideList.x,this.slideList.y)),this.designWHAdapter(),this.initCustomParams(t),this.btnSLideClose.on(Laya.Event.CLICK,this,this.closeSlideWindow)}designWHAdapter(){720!=Laya.stage.designWidth&&(this.scaleUI=Laya.stage.designWidth/720,this.scale(this.scaleUI,this.scaleUI)),this.y=Laya.stage.height/2-this.height*this.scaleUI/2,this.moveDistance=this.width*this.scaleUI}initCustomParams(e){e&&(this.uiStateCallCopy=e.hasOwnProperty("uiStateCall")?e.uiStateCall:null,e.hasOwnProperty("y")&&(this.y=e.y),e.hasOwnProperty("scaleY")&&(this.scaleY=e.scaleY),e.hasOwnProperty("scaleX")&&(this.scaleX=e.scaleX,this.moveDistance=this.width*e.scaleX))}setAddToStage(e){this.isAddStage=e}setSlideButton(e){this.slideButton=e}setSlideMask(e){this.slideMask=e}notifyUIComplete(e,t){this.uiCompleteCallCopy&&this.uiCompleteCallCopy(e,t)}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}showSlideBtnAndHideSlideMask(){this.slideButton&&(this.slideButton.visible=!0),this.slideMask&&(this.slideMask.visible=!1)}hideSlideBtnAndShowSlideMask(){this.slideButton&&(this.slideButton.visible=!1),this.slideMask&&(this.slideMask.visible=!0)}showSlideWindow(){if(ke.hotListDatas.length<=0)console.log("抽屉没有数据");else if(this.isAddStage&&(this.slideMask.zOrder=le.UI_ZORDER_THREE-1,this.zOrder=le.UI_ZORDER_THREE),!this.SlideWindowUI.visible){this.visible=!0,this.SlideWindowUI.visible=!0,this.hideSlideBtnAndShowSlideMask();var e=this;this.slideWindowActionShow(function(){e.notifyUIState(_e.Youzi_SlideWindow,!0),e.showFirst||(e.showFirst=!0,e.checkExposure())})}}slideWindowActionShow(e){this.isLeft?Laya.Tween.to(this,{left:0},500,Laya.Ease.quadInOut,Laya.Handler.create(this,e)):Laya.Tween.to(this,{right:0},500,Laya.Ease.quadInOut,Laya.Handler.create(this,e))}closeSlideWindow(){if(ke.hotListDatas.length<=0)console.log("抽屉没有数据");else{var e=this;this.slideWindowActionClose(function(){e.visible=!1,e.SlideWindowUI.visible=!1,e.btnSLideClose.visible=!0,e.showSlideBtnAndHideSlideMask(),e.isAddStage&&(e.slideMask.zOrder=0,e.zOrder=0),e.notifyUIState(_e.Youzi_SlideWindow,!1)}),e.btnSLideClose.visible=!1}}slideWindowActionClose(e){this.isLeft?Laya.Tween.to(this,{left:-this.moveDistance},500,Laya.Ease.quadInOut,Laya.Handler.create(this,e)):Laya.Tween.to(this,{right:-this.moveDistance},500,Laya.Ease.quadInOut,Laya.Handler.create(this,e))}initShow(){ke.dataNullReset("hotListDatas"),ke.getPropertiesValue(oe.SlideWindow_Name)&&(this.namelabLabel=null,this.slideList.spaceY=-15),ke.hotListDatas.length>0&&(this.slideButton&&(this.slideButton.visible=!0),this.slideList.array=ke.hotListDatas,this.slideList.renderHandler=new Laya.Handler(this,this.onListRender),this.slideList.mouseHandler=new Laya.Handler(this,this.onslideListItemMouseEvent))}onListRender(e,t){0==ke.hotListDatas[t].hotred&&(e.getChildByName("markImg").visible=!1);Re.getInstance().createYouziListItem(e,"icon","iconAnima",this.namelabLabel,ke.hotListDatas[t]),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&this.SlideWindowUI.visible&&(this.slideItemExposure[ke.hotListDatas[e].appid]||(ke.sendExposureLog(ke.hotListDatas[e],de.FLOAT),this.slideItemExposure[ke.hotListDatas[e].appid]=1))}onslideListItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的抽屉索引:"+t);var i=ke.hotListDatas[t];if(i.locationIndex=de.FLOAT,ke.clickGameYouziUIId=_e.Youzi_SlideWindow,ke.startOtherGame(i,null),1==i.hotred)this.slideList.getCell(t).getChildByName("markImg").visible=!1}else e.type}checkExposure(){if(this.SlideWindowUI.visible)for(var e=0;e<ke.hotListDatas.length&&!(e>14);e++){var t=ke.hotListDatas[e];this.slideItemExposure[t.appid]||(this.slideItemExposure[t.appid]=1,ke.sendExposureLog(t,de.FLOAT))}}}class Ne extends Y.youzi.Youzi_GuessLikeUI{constructor(e){super(),this.guessAnyItemExposure={},this.firstShow=!1,this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.curFront=!0,this.curBack=!1,this.stopAction=!1,this.isClick=!1,this.endCompletHandler=null,this.startCompleteHandler=null,this.dur=5e3,this.scaleUI=1,this.visible=!1,this.guessUI.visible=!1,this.guesslist.hScrollBarSkin="",this.designWHAdapter(),this.initCustomParams(e)}designWHAdapter(){720!=Laya.stage.designWidth&&(this.scaleUI=Laya.stage.designWidth/720,this.scale(this.scaleUI,this.scaleUI))}initCustomParams(e){e&&(this.x=e.hasOwnProperty("x")?e.x:0,this.y=e.hasOwnProperty("y")?e.y:0)}setUICompleteCall(e){this.uiCompleteCallCopy=e}notifyUIComplete(e,t){this.uiCompleteCallCopy&&this.uiCompleteCallCopy(e,t)}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){ke.dataNullReset("matrixBannerDatas"),ke.matrixBannerDatas.length<=0||(this.guesslist.dataSource=ke.matrixBannerDatas,this.guesslist.mouseHandler=new Laya.Handler(this,this.onGuessLikeItemMouseEvent),this.guesslist.renderHandler=new Laya.Handler(this,this.onListRender),this.visible=!0,this.guessUI.visible=!0,this.notifyUIComplete(_e.Youzi_GuessLike,{complete:!0}),this.notifyUIState(_e.Youzi_GuessLike,!0),this.dur=ke.matrixBannerDatas.length>5?5e3*(ke.matrixBannerDatas.length-5):5e3,this.starGuessLikeAction())}onListRender(e,t){Re.getInstance().createYouziListItem(e,"icon","iconAnima",null,ke.matrixBannerDatas[t]),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&this.guessUI.visible&&(this.guessAnyItemExposure[ke.matrixBannerDatas[e].appid]||(ke.sendExposureLog(ke.matrixBannerDatas[e],de.GUESS),this.guessAnyItemExposure[ke.matrixBannerDatas[e].appid]=1))}stopGuessLikeAcion(){this.stopAction=!0}starGuessLikeAction(){this.guessAnylistAutoScroll()}guessAnylistAutoScroll(){this.guessUI.visible&&(this.guesslist.length<=5||(this.stopAction=!1,this.curFront&&!this.curBack?this.listTweenToEnd():!this.curFront&&this.curBack&&this.listTweenToStart()))}listTweenToEnd(){this.stopAction||(this.endCompletHandler=new Laya.Handler(this,this.listTweenToStart,null,!0),this.guesslist.tweenTo(this.guesslist.length-1,this.dur,this.endCompletHandler)),this.curFront=!0,this.curBack=!1}listTweenToStart(){this.stopAction||(this.startCompleteHandler=new Laya.Handler(this,this.listTweenToEnd,null,!0),this.guesslist.tweenTo(0,this.dur,this.startCompleteHandler)),this.curFront=!1,this.curBack=!0}onGuessLikeItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){if(!this.isClick){this.isClick=!0,console.log("当前选择的guesslike索引:"+t),ke.clickGameYouziUIId=_e.Youzi_GuessLike;var i=ke.matrixBannerDatas[t];i.locationIndex=de.GUESS,ke.startOtherGame(i,this.startOtherCall.bind(this))}}else e.type}startOtherCall(e){this.isClick=!1,this.starGuessLikeAction()}}class Fe extends Y.youzi.Youzi_SmallWallUI{constructor(e){super(),this.namelabLabel="namelab",this.smallWallItemExposure={},this.curFront=!0,this.curBack=!1,this.stopAction=!1,this.isClick=!1,this.dur=5e3,this.scaleUI=1,this.endCompletHandler=null,this.startCompleteHandler=null,this.visible=!1,this.SmallWallUI.visible=!1,this.smallWallList.vScrollBarSkin="",this.designWHAdapter(),this.initCustomParams(e)}designWHAdapter(){720!=Laya.stage.designWidth&&(this.scaleUI=Laya.stage.designWidth/720,this.scale(this.scaleUI,this.scaleUI))}initCustomParams(e){e&&(this.x=e.hasOwnProperty("x")?e.x:0,this.y=e.hasOwnProperty("y")?e.y:0)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){ke.getPropertiesValue(oe.SmallWall_Name)&&(this.namelabLabel=null,this.smallWallList.repeatY=2,this.smallWallList.spaceY=-25),ke.moreDatas.length>0&&(this.smallWallList.array=ke.moreDatas,this.smallWallList.renderHandler=new Laya.Handler(this,this.onListRender),this.smallWallList.mouseHandler=new Laya.Handler(this,this.onSmallWallListItemMouseEvent),this.visible=!0,this.SmallWallUI.visible=!0,this.dur=ke.moreDatas.length>8?5e3*(ke.moreDatas.length-8):5e3,this.starSmallWallAction())}scrollBarListen(){this.starSmallWallAction()}onListRender(e,t){1==ke.moreDatas[t].hotred&&(e.getChildByName("redhit").visible=!0);Re.getInstance().createYouziListItem(e,"icon","iconAnima",this.namelabLabel,ke.moreDatas[t]),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&this.SmallWallUI.visible&&(this.smallWallItemExposure[ke.moreDatas[e].appid]||(ke.sendExposureLog(ke.moreDatas[e],de.SMALL_MATRIX_WALL),this.smallWallItemExposure[ke.moreDatas[e].appid]=1))}stopSmallWallAcion(){this.stopAction=!0}starSmallWallAction(){this.smallWallListAutoScroll()}smallWallListAutoScroll(){this.SmallWallUI.visible&&(this.smallWallList.length<=8||(this.stopAction=!1,this.curFront&&!this.curBack?this.listTweenToEnd():!this.curFront&&this.curBack&&this.listTweenToStart()))}listTweenToEnd(){this.stopAction||(this.endCompletHandler=new Laya.Handler(this,this.listTweenToStart,null,!0),this.smallWallList.tweenTo(this.smallWallList.length-1,this.dur,this.endCompletHandler)),this.curFront=!0,this.curBack=!1}listTweenToStart(){this.stopAction||(this.startCompleteHandler=new Laya.Handler(this,this.listTweenToEnd,null,!0),this.smallWallList.tweenTo(0,this.dur,this.startCompleteHandler)),this.curFront=!1,this.curBack=!0}onSmallWallListItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){if(!this.isClick){this.isClick=!0,console.log("当前选择的大家都在玩儿索引:"+t);var i=ke.moreDatas[t];if(i.locationIndex=de.SMALL_MATRIX_WALL,ke.clickGameYouziUIId=_e.Youzi_SmallWall,ke.startOtherGame(i,this.startOtherCall.bind(this)),1==i.hotred)this.smallWallList.getCell(t).getChildByName("redhit").visible=!1}}else e.type}startOtherCall(e){this.isClick=!1,this.starSmallWallAction()}}class Ve extends Y.youzi.Youzi_OffLineUI{constructor(){super(),this.offLineGameShow=[],this.offLineGameDatas=[],this.offLineCreateComplete=!1,this.isSendLog=!0,this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.hideOffLineGameTimes=0,this.scaleUI=1,this.OffLineUI.pos(Laya.stage.width/2-this.OffLineUI.width/2,Laya.stage.height/2-this.OffLineUI.height/2),this.visible=!1,this.OffLineUI.visible=!1,this.designWHAdapter(),this.OffLineCloseButton.on(Laya.Event.CLICK,this,this.onBtnOffLineClose)}designWHAdapter(){720!=Laya.stage.designWidth&&(this.scaleUI=Laya.stage.designWidth/720,this.OffLineUI.scale(this.scaleUI,this.scaleUI),this.OffLineMask.scale(this.scaleUI,this.scaleUI)),ke.getAspectRatio()>1.9&&(this.OffLineMask.scaleY=2)}notifyUIComplete(e,t){this.uiCompleteCallCopy&&this.uiCompleteCallCopy(e,t)}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){this.offLineGameDatas=ke.offlineBannerDatas,this.wxOnShow(),this.wxOnHide()}wxOnShow(){var e=this;Laya.Browser.window.wx&&Laya.Browser.window.wx.onShow(function(t){var i=Math.floor((new Date).getTime()-e.hideOffLineGameTimes);if(Math.floor(i/1e3)>=8&&e.offLineCreateComplete&&(e.visible=!0,e.OffLineUI.visible=!0,e.zOrder=le.UI_ZORDER_ONE,e.notifyUIState(_e.Youzi_OffLine,!0),e.isSendLog))for(var s=0;s<e.offLineGameShow.length;s++)ke.sendExposureLog(e.offLineGameShow[s],de.OFFLINE),s==e.offLineGameShow.length&&(e.isSendLog=!1)})}wxOnHide(){var e=this;Laya.Browser.window.wx&&Laya.Browser.window.wx.onHide(function(){e.hideOffLineGameTimes=(new Date).getTime(),e.offLineGameDatas.length>0&&!e.offLineCreateComplete&&e.createOffLineDialog()})}createOffLineDialog(){if(this.offLineGameDatas.length<=0)console.log("离线推荐没有数据");else{for(var e=[],t=0;t<this.offLineGameDatas.length&&!(t>=3);t++){var i=this.offLineGameDatas[t];e.push({namelab:i.title})}switch(e.length){case 1:this.OffLineList.width=140,this.OffLineList.x=194;break;case 2:this.OffLineList.width=305,this.OffLineList.x=111.5}this.OffLineList.mouseHandler=new Laya.Handler(this,this.onOffLinelistItemMouseEvent),this.OffLineList.dataSource=e;for(var s=0;s<this.offLineGameDatas.length;s++){if(1==this.offLineGameDatas[s].dynamicType&&this.offLineGameDatas[s].dynamicIcon){var a=this.OffLineList.getCell(s).getChildByName("iconAnima");a.scale(1.16,1.16),(new Me).createAnimation(this.offLineGameDatas[s].dynamicIcon,function(e){a.frames=e.frames,a.interval=e.interval,a.visible=!0,a.play()})}else{this.OffLineList.getCell(s).getChildByName("icon").skin=this.offLineGameDatas[s].iconImg}if(1==this.offLineGameDatas[s].hotred)this.OffLineList.getCell(s).getChildByName("redhit").visible=!0;if(this.offLineGameShow.push(this.offLineGameDatas[s]),++s>=e.length){this.offLineCreateComplete=!0;break}}this.notifyUIComplete(_e.Youzi_OffLine,{complete:!0})}}onBtnOffLineClose(){this.visible=!1,this.OffLineUI.visible=!1,this.zOrder=0,this.notifyUIState(_e.Youzi_OffLine,!1)}onOffLinelistItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的hotlist索引:"+t);var i=this.offLineGameDatas[t];if(i.locationIndex=de.OFFLINE,i.type=3,1==i.hotred)this.OffLineList.getCell(t).getChildByName("icon").getChildByName("redhit").visible=!1;ke.clickGameYouziUIId=_e.Youzi_OffLine,ke.startOtherGame(i,null)}else"mouseover"==e.type||e.type}}class We extends Y.youzi.Youzi_FullScreenUI{constructor(e){super(),this.namelabLabel="namelab",this.fullScreenExposure={},this.breaki=14,this.curFront=!0,this.curBack=!1,this.stopAction=!1,this.isClick=!1,this.dur=5e3,this.endCompletHandler=null,this.startCompleteHandler=null,this.FullScreenUIScale=1,this.uiStateCallCopy=null,this.column=3,this.row=4,this.visible=!1,this.FullScreenUI.visible=!1,this.FullScreenList.visible=!1,this.FullScreenList.vScrollBarSkin="",this.designWHAdapter(),this.initCustomParams(e),this.scale(0,0),this.pivot(this.width/2,this.height/2),this.pos(Laya.stage.width/2,this.height/2),this.closeFullScreen.on(Laya.Event.CLICK,this,this.onCloseFullScreen)}designWHAdapter(){"full"==Laya.stage.scaleMode?(this.FullScreenUIScale=Laya.stage.width/this.width,this.FullScreenUI.scale(this.FullScreenUIScale,this.FullScreenUIScale),this.width=Laya.stage.width,this.height=Laya.stage.height):(Laya.stage.designWidth!=this.width&&(this.FullScreenUIScale=Laya.stage.designWidth/this.width,this.FullScreenUI.scale(this.FullScreenUIScale,this.FullScreenUIScale),this.BG.scaleX=this.FullScreenUIScale,this.width=Laya.stage.designWidth),Laya.stage.designHeight!=this.height&&(this.BG.scaleY=Laya.stage.designHeight/this.height,this.height=Laya.stage.designHeight)),ke.getAspectRatio()>1.9&&(this.BG.scaleY=2,this.height+=300,this.FullScreenUI.height+=300,this.FullScreenList.repeatY=5,this.FullScreenList.height+=300,this.breaki=17)}initCustomParams(e){e&&(this.uiStateCallCopy=e.hasOwnProperty("uiStateCall")?e.uiStateCall:null)}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){ke.dataNullReset("fullMatrixScreenDatas"),ke.getPropertiesValue(oe.FullScreen_Name)&&(this.namelabLabel=null),ke.fullMatrixScreenDatas.length>0?(this.column=this.FullScreenList.repeatX,this.row=this.FullScreenList.repeatY,this.dur=ke.fullMatrixScreenDatas.length>this.breaki+1?5e3*(ke.fullMatrixScreenDatas.length-this.breaki):5e3,this.FullScreenList.array=ke.fullMatrixScreenDatas,this.FullScreenList.mouseHandler=new Laya.Handler(this,this.onItemClick),this.FullScreenList.renderHandler=new Laya.Handler(this,this.onListRender)):(this.destroy(),console.log("全屏落地页无数据"))}onListRender(e,t){0==ke.fullMatrixScreenDatas[t].hotred&&(e.getChildByName("redhit").visible=!1);this.namelabLabel||(e.getChildByName("namelabBG").visible=!1);Re.getInstance().createYouziListItem(e,"icon","iconAnima",this.namelabLabel,ke.fullMatrixScreenDatas[t]),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.FullScreenUI.visible&&(this.fullScreenExposure[ke.fullMatrixScreenDatas[e].appid]||(ke.sendExposureLog(ke.fullMatrixScreenDatas[e],de.FULL_MATRIX_SCRENN),this.fullScreenExposure[ke.fullMatrixScreenDatas[e].appid]=1))}showFullScreen(){ke.fullMatrixScreenDatas.length<=0?console.log("全屏落地页无数据不展示"):this&&this.parent&&(this.zOrder=le.UI_ZORDER_TWO,this.visible=!0,Laya.Tween.to(this,{scaleX:1,scaleY:1},500,Laya.Ease.quadIn,Laya.Handler.create(this,this.showActionFinsh)))}showActionFinsh(){this.notifyUIState(_e.Youzi_Full,!0),ke.fullScreenRandomNavigate(),Laya.timer.once(3e3,this,this.starFullListAction),this.FullScreenUI.visible=!0,this.FullScreenList.visible=!0}onCloseFullScreen(){this.stopFullListAcion(),Laya.Tween.to(this,{scaleX:0,scaleY:0},500,Laya.Ease.quadInOut,Laya.Handler.create(this,this.closeActionFinsh))}closeActionFinsh(){this.zOrder=0,this.visible=!1,this.FullScreenUI.visible=!1,this.FullScreenList.visible=!1,this.fullScreenExposure={},this.notifyUIState(_e.Youzi_Full,!1)}stopFullListAcion(){this.stopAction=!0}starFullListAction(){this.fullScreenListAutoScroll()}fullScreenListAutoScroll(){this.FullScreenUI.visible&&(this.FullScreenList.length<=this.breaki+1||(this.stopAction=!1,this.curFront&&!this.curBack?this.listTweenToEnd():!this.curFront&&this.curBack&&this.listTweenToStart()))}listTweenToEnd(){this.stopAction||(this.endCompletHandler=new Laya.Handler(this,this.listTweenToStart,null,!0),this.FullScreenList.tweenTo(this.FullScreenList.length-this.column*this.row+1,this.dur,this.endCompletHandler)),this.curFront=!0,this.curBack=!1}listTweenToStart(){this.stopAction||(this.startCompleteHandler=new Laya.Handler(this,this.listTweenToEnd,null,!0),this.FullScreenList.tweenTo(0,this.dur,this.startCompleteHandler)),this.curFront=!1,this.curBack=!0}onItemClick(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的全屏落地页索引:"+t);var i=ke.fullMatrixScreenDatas[t];i.locationIndex=de.FULL_MATRIX_SCRENN,ke.clickGameYouziUIId=_e.Youzi_Full,ke.startOtherGame(i,null)}else e.type}checkExposure(){if(this.FullScreenUI.visible)for(var e=0;e<ke.fullMatrixScreenDatas.length;e++){if(e>this.breaki){console.log("break i:"+e);break}var t=ke.fullMatrixScreenDatas[e];this.fullScreenExposure[t.appid]||(this.fullScreenExposure[t.appid]=1,ke.sendExposureLog(t,de.FULL_MATRIX_SCRENN))}}}class Ye extends Y.youzi.Youzi_GuessLikeHUI{constructor(e){super(),this.guessData=[],this.guessAnyItemExposure={},this.firstShow=!1,this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.curFront=!0,this.curBack=!1,this.stopAction=!1,this.isClick=!1,this.dur=5e3,this.endCompletHandler=null,this.startCompleteHandler=null,this.dataOrder=1,this.scaleUI=1,this.guessLikeUiType=0,this.listTweenType=0,this.visible=!1,this.guessUI.visible=!1,this.guesslist.vScrollBarSkin="",this.designWHAdapter(),this.initCustomParams(e)}designWHAdapter(){ke.getIsVertical()?720!=Laya.stage.designWidth&&(this.scaleUI=Laya.stage.designWidth/720,this.scale(this.scaleUI,this.scaleUI)):720!=Laya.stage.designHeight&&(this.scaleUI=Laya.stage.designHeight/720,this.scale(this.scaleUI,this.scaleUI))}initCustomParams(e){e&&(this.x=e.hasOwnProperty("x")?e.x:0,this.y=e.hasOwnProperty("y")?e.y:0,this.dataOrder=e.hasOwnProperty("dataOrder")?e.dataOrder:1,this.guessLikeUiType=e.hasOwnProperty("guessLikeUiType")?e.guessLikeUiType:0,this.listTweenType=e.hasOwnProperty("listTweenType")?e.listTweenType:0,1==this.guessLikeUiType&&this.doubleGuessUI(e))}doubleGuessUI(e){e.hasOwnProperty("bgVisible")&&(this.guessLikeBg.visible=e.bgVisible),this.guessLikeBg.height+=55,this.title.visible=!1,this.guesslist.y-=64,this.guesslist.height+=100,this.guesslist.repeatY=4}setYouziPosition(e,t){this.pos(e,t)}setUICompleteCall(e){this.uiCompleteCallCopy=e}notifyUIComplete(e,t){this.uiCompleteCallCopy&&this.uiCompleteCallCopy(e,t)}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){ke.dataNullReset("matrixBannerDatas"),ke.matrixBannerDatas.length<=0||(1==this.guessLikeUiType&&(this.guessData=ke.matrixBannerDatas.slice(0),2==this.dataOrder&&this.guessData.reverse()),this.guesslist.array=this.guessData,this.guesslist.renderHandler=new Laya.Handler(this,this.onListRender),this.guesslist.mouseHandler=new Laya.Handler(this,this.onGuessLikeItemMouseEvent),this.guesslist.on(Laya.Event.MOUSE_UP,this,this.scrollMoveUp),this.visible=!0,this.guessUI.visible=!0,this.notifyUIComplete(_e.Youzi_GuessLike,{complete:!0}),this.notifyUIState(_e.Youzi_GuessLike,!0),this.dur=this.guessData.length>5?5e3*(this.guessData.length-5):5e3,2!=this.guessLikeUiType&&this.starGuessLikeHAction())}onListRender(e,t){Re.getInstance().createYouziListItem(e,"icon","iconAnima",null,this.guessData[t]),t==this.guesslist.length-1&&1==this.listTweenType&&this.listTweenEndForeverCall(),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&this.guessUI.visible&&(this.guessAnyItemExposure[this.guessData[e].appid]||(ke.sendExposureLog(this.guessData[e],de.GUESS),this.guessAnyItemExposure[this.guessData[e].appid]=1))}scrollMoveUp(){this.guesslist.scrollBar.stopScroll(),Laya.timer.frameOnce(300,this,this.starGuessLikeHAction)}stopGuessLikeHAcion(){this.guesslist.scrollBar.stopScroll(),this.guesslist.scrollTo(0),this.stopAction=!0}starGuessLikeHAction(){this.stopAction=!1,this.guessAnylistHAutoScroll()}guessAnylistHAutoScroll(){0==this.listTweenType?this.goAndBackTween():1==this.listTweenType&&this.listTweenEndForever()}listTweenEndForever(){this.guesslist.length<=5||this.stopAction||this.guesslist.tweenTo(this.guesslist.length-1,this.dur)}listTweenEndForeverCall(){this.guesslist.scrollTo(0),this.listTweenEndForever()}goAndBackTween(){this.guesslist.length<=5||(this.stopAction=!1,this.curFront&&!this.curBack?this.listTweenToEnd():!this.curFront&&this.curBack&&this.listTweenToStart())}listTweenToEnd(){this.stopAction||(this.endCompletHandler=new Laya.Handler(this,this.listTweenToStart,null,!0),this.guesslist.tweenTo(this.guesslist.length-this.guesslist.repeatY,this.dur,this.endCompletHandler)),this.curFront=!0,this.curBack=!1}listTweenToStart(){this.stopAction||(this.startCompleteHandler=new Laya.Handler(this,this.listTweenToEnd,null,!0),this.guesslist.tweenTo(0,this.dur,this.startCompleteHandler)),this.curFront=!1,this.curBack=!0}onGuessLikeItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){if(!this.isClick){this.isClick=!0,console.log("当前选择的guesslikeh索引:"+t);var i=this.guessData[t];2==this.guessLikeUiType?(i.locationIndex=de.FLOAT,ke.clickGameYouziUIId=_e.Youzi_SlideWindow):(i.locationIndex=de.GUESS,ke.clickGameYouziUIId=_e.Youzi_GuessLike),ke.startOtherGame(i,this.startOtherCall.bind(this))}}else e.type}startOtherCall(e){this.isClick=!1,Laya.timer.once(1e3,this,this.starGuessLikeHAction)}}class Xe extends Y.youzi.Youzi_MoreGameHUI{constructor(e){super(),this.namelabLabel="namelab",this.mainItemHExposure={},this.isAddToStage=!1,this.fisrtShow=!1,this.isCreate=!1,this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.moreBtn=null,this.curFront=!0,this.curBack=!1,this.stopAction=!1,this.isClick=!1,this.dur=5e3,this.scaleMoreGameUIH=1,this.designWHAdapter(),this.initCustomParams(e),this.visible=!1,this.MoreGameUI.visible=!1,this.moreGameList.vScrollBarSkin="",this.moreGameCloseBtn.on(Laya.Event.CLICK,this,this.onBtnCloseClicked)}designWHAdapter(){Laya.stage.designHeight!=this.height&&(this.scaleMoreGameUIH=Laya.stage.designHeight/this.height,this.MoreGameUI.scale(this.scaleMoreGameUIH,this.scaleMoreGameUIH),this.maskBG.scale(this.scaleMoreGameUIH,this.scaleMoreGameUIH),this.height=Laya.stage.designHeight),Laya.stage.designWidth!=this.width&&(this.maskBG.scaleX=Laya.stage.designWidth/this.width,this.width=Laya.stage.designWidth)}initCustomParams(e){e?(this.MoreGameUI.x=e.hasOwnProperty("x")?e.x:(Laya.stage.width-this.MoreGameUI.width*this.scaleMoreGameUIH)/2,this.MoreGameUI.y=e.hasOwnProperty("y")?e.y:(Laya.stage.height-this.MoreGameUI.height*this.scaleMoreGameUIH)/2,this.uiStateCallCopy=e.hasOwnProperty("uiStateCall")?e.uiStateCall:null):this.MoreGameUI.pos((Laya.stage.width-this.MoreGameUI.width*this.scaleMoreGameUIH)/2,(Laya.stage.height-this.MoreGameUI.height*this.scaleMoreGameUIH)/2)}setAddToStage(e){this.isAddToStage=e}setMoreGameBtn(e){this.moreBtn=e}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}showMoreGameUI(){this.isCreate&&!this.visible&&(this.isAddToStage&&(this.zOrder=le.UI_ZORDER_THREE),this.visible=!0,this.moreGameList.mouseThrough=!1,this.MoreGameUI.visible=!0,this.notifyUIState(_e.Youzi_MoreGame,!0),this.starMoreGameAction(),this.fisrtShow||(this.fisrtShow=!0,this.checkExposure()))}onBtnCloseClicked(){this.stopMoreGameAcion(),this.visible=!1,this.moreGameList.mouseThrough=!0,this.MoreGameUI.visible=!1,this.notifyUIState(_e.Youzi_MoreGame,!1),this.isAddToStage&&(this.zOrder=0)}initShow(){ke.getPropertiesValue(oe.MoreGame_Name)&&(this.namelabLabel=null,this.moreGameList.spaceY=-15),ke.moreDatas.length>0&&(this.moreBtn&&(this.moreBtn.visible=!0),this.moreGameList.array=ke.moreDatas,this.moreGameList.renderHandler=new Laya.Handler(this,this.onListRender),this.moreGameList.mouseHandler=new Laya.Handler(this,this.moreGameListMouseEvent),this.isCreate=!0,this.dur=ke.moreDatas.length>12?5e3*(ke.moreDatas.length-12):5e3)}onListRender(e,t){Re.getInstance().createYouziListItem(e,"icon","iconAnima",this.namelabLabel,ke.moreDatas[t]),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&this.MoreGameUI.visible&&(this.mainItemHExposure[ke.moreDatas[e].appid]||(ke.sendExposureLog(ke.moreDatas[e],de.MORE),this.mainItemHExposure[ke.moreDatas[e].appid]=1))}stopMoreGameAcion(){this.stopAction=!0}starMoreGameAction(){this.moreGameListAutoScroll()}moreGameListAutoScroll(){this.MoreGameUI.visible&&(this.moreGameList.length<=12||(this.stopAction=!1,this.dur=5e3*(ke.moreDatas.length-12),this.curFront&&!this.curBack?this.listTweenToEnd():!this.curFront&&this.curBack&&this.listTweenToStart()))}listTweenToEnd(){if(!this.stopAction){var e=new Laya.Handler(this,this.listTweenToStart,null,!0);this.moreGameList.tweenTo(this.moreGameList.length-1,this.dur,e)}this.curFront=!0,this.curBack=!1}listTweenToStart(){if(!this.stopAction){var e=new Laya.Handler(this,this.listTweenToEnd,null,!0);this.moreGameList.tweenTo(0,this.dur,e)}this.curFront=!1,this.curBack=!0}moreGameListMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){if(!this.isClick){this.isClick=!0,console.log("当前选择的moreGameH索引:"+t);var i=ke.moreDatas[t];i.locationIndex=de.MORE,ke.clickGameYouziUIId=_e.Youzi_MoreGame,ke.startOtherGame(i,this.startOtherCall.bind(this))}}else e.type}startOtherCall(){this.isClick=!1,this.starMoreGameAction()}checkExposure(){if(this.MoreGameUI.visible)for(var e=0;e<ke.moreDatas.length&&!(e>=11);e++){var t=ke.moreDatas[e];this.mainItemHExposure[t.appid]||(this.mainItemHExposure[t.appid]=1,ke.sendExposureLog(t,de.MORE))}}}class je extends Y.youzi.Youzi_OffLineHUI{constructor(){super(),this.offLineGameShow=[],this.offLineGameDatas=[],this.offLineCreateComplete=!1,this.isSendLog=!0,this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.hideOffLineGameTimes=0,this.scaleUI=1,this.OffLineUI.pos(Laya.stage.width/2-this.OffLineUI.width/2,Laya.stage.height/2-this.OffLineUI.height/2),this.visible=!1,this.OffLineUI.visible=!1,this.designWHAdapter(),this.OffLineCloseButton.on(Laya.Event.CLICK,this,this.onBtnOffLineClose)}designWHAdapter(){720!=Laya.stage.designHeight&&(this.scaleUI=Laya.stage.designHeight/720,this.OffLineUI.scale(this.scaleUI,this.scaleUI),this.OffLineMask.scale(this.scaleUI,this.scaleUI)),ke.getAspectRatio()>1.9&&(this.OffLineMask.scaleX=2)}setUICompleteCall(e){this.uiCompleteCallCopy=e}notifyUIComplete(e,t){this.uiCompleteCallCopy&&this.uiCompleteCallCopy(e,t)}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){this.offLineGameDatas=ke.offlineBannerDatas,this.wxOnShow(),this.wxOnHide()}wxOnShow(){var e=this;Laya.Browser.window.wx&&Laya.Browser.window.wx.onShow(function(t){var i=Math.floor((new Date).getTime()-e.hideOffLineGameTimes);if(Math.floor(i/1e3)>=8&&e.offLineCreateComplete&&(e.zOrder=le.UI_ZORDER_ONE,e.visible=!0,e.OffLineUI.visible=!0,e.notifyUIState(_e.Youzi_OffLine,!0),e.isSendLog))for(var s=0;s<e.offLineGameShow.length;s++)ke.sendExposureLog(e.offLineGameShow[s],de.OFFLINE),s==e.offLineGameShow.length&&(e.isSendLog=!1)})}wxOnHide(){var e=this;Laya.Browser.window.wx&&Laya.Browser.window.wx.onHide(function(){e.hideOffLineGameTimes=(new Date).getTime(),e.offLineGameDatas.length>0&&!e.offLineCreateComplete&&e.createOffLineDialog()})}createOffLineDialog(){if(this.offLineGameDatas.length<=0)console.log("离线推荐没有数据");else{for(var e=[],t=0;t<this.offLineGameDatas.length&&!(t>=3);t++){var i=this.offLineGameDatas[t];e.push({infoData:i,namelab:i.title})}var s=0;switch(e.length){case 1:s=205;break;case 2:s=85,this.OffLineList.spaceX=50;break;default:s=8,this.OffLineList.spaceX=15}this.OffLineList.x=s,this.OffLineList.mouseHandler=new Laya.Handler(this,this.onOffLinelistItemMouseEvent),this.OffLineList.dataSource=e;for(var a=0;a<this.offLineGameDatas.length;a++){if(1==this.offLineGameDatas[a].dynamicType&&this.offLineGameDatas[a].dynamicIcon){var n=this.OffLineList.getCell(a).getChildByName("iconAnima");n.scale(1.16,1.16),(new Me).createAnimation(this.offLineGameDatas[a].dynamicIcon,function(e){n.frames=e.frames,n.interval=e.interval,n.visible=!0,n.play()})}else{this.OffLineList.getCell(a).getChildByName("icon").skin=this.offLineGameDatas[a].iconImg}if(1==this.offLineGameDatas[a].hotred)this.OffLineList.getCell(a).getChildByName("redhit").visible=!0;if(this.offLineGameShow.push(this.offLineGameDatas[a]),++a>=e.length){this.offLineCreateComplete=!0;break}}this.notifyUIComplete(_e.Youzi_OffLine,{complete:!0})}}onBtnOffLineClose(){this.visible=!1,this.OffLineUI.visible=!1,this.zOrder=0,this.notifyUIState(_e.Youzi_OffLine,!1)}onOffLinelistItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的hotlist索引:"+t);var i=this.offLineGameDatas[t];if(i.locationIndex=de.OFFLINE,i.type=3,1==i.hotred)this.OffLineList.getCell(t).getChildByName("icon").getChildByName("redhit").visible=!1;ke.clickGameYouziUIId=_e.Youzi_OffLine,ke.startOtherGame(i,null)}else"mouseover"==e.type||e.type}}class qe extends Y.youzi.Youzi_SlideWindowHUI{constructor(e,t){super(),this.namelabLabel="namelab",this.slideItemExposure={},this.uiCompleteCallCopy=null,this.uiStateCallCopy=null,this.slideButton=null,this.slideMask=null,this.showFirst=!1,this.acitonPianYi=0,this.isLeft=!1,this.isAddStage=!1,this.moveDistance=this.width,this.scaleUI=1,this.visible=!1,this.SlideWindowUI.visible=!1,this.slideList.vScrollBarSkin="",this.isLeft=e,this.btnSLideClose.on(Laya.Event.CLICK,this,this.closeSlideWindow),ke.getAspectRatio()>=1.9&&(this.acitonPianYi=20),e?this.left=-this.width:(this.right=-this.width,this.slideBg.scaleX=-1,this.slideBg.pos(this.slideBg.width,this.slideBg.y),this.slideList.pos(this.slideList.x,this.slideList.y)),this.designWHAdapter(),this.initCustomParams(t)}designWHAdapter(){720!=Laya.stage.designHeight&&(this.scaleUI=Laya.stage.designHeight/720,this.scale(this.scaleUI,this.scaleUI)),this.y=Laya.stage.height/2-this.height*this.scaleUI/2,this.moveDistance=this.width*this.scaleUI}initCustomParams(e){e&&(this.uiStateCallCopy=e.hasOwnProperty("uiStateCall")?e.uiStateCall:null,e.hasOwnProperty("y")&&(this.y=e.y),e.hasOwnProperty("scaleY")&&(this.scaleY=e.scaleY),e.hasOwnProperty("scaleX")&&(this.scaleX=e.scaleX,this.moveDistance=this.width*e.scaleX))}setAddToStage(e){this.isAddStage=e}setSlideButton(e){this.slideButton=e}setSlideMask(e){this.slideMask=e}notifyUIComplete(e,t){this.uiCompleteCallCopy&&this.uiCompleteCallCopy(e,t)}offUICompleteCall(){this.uiCompleteCallCopy&&(this.uiCompleteCallCopy=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}offUIStateCall(){this.uiStateCallCopy&&(this.uiStateCallCopy=null)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}showSlideBtnAndHideSlideMask(){this.slideButton&&(this.slideButton.visible=!0),this.slideMask&&(this.slideMask.visible=!1)}hideSlideBtnAndShowSlideMask(){this.slideButton&&(this.slideButton.visible=!1),this.slideMask&&(this.slideMask.visible=!0)}showSlideWindow(){if(ke.hotListDatas.length<=0)console.log("抽屉没有数据");else if(this.isAddStage&&(this.slideMask.zOrder=le.UI_ZORDER_THREE-1,this.zOrder=le.UI_ZORDER_THREE),!this.SlideWindowUI.visible){this.visible=!0,this.SlideWindowUI.visible=!0,this.hideSlideBtnAndShowSlideMask();var e=this;this.slideWindowActionShow(function(){e.notifyUIState(_e.Youzi_SlideWindow,!0),e.showFirst||(e.showFirst=!0,e.checkExposure())})}}slideWindowActionShow(e){this.isLeft?Laya.Tween.to(this,{left:this.acitonPianYi},500,Laya.Ease.quadInOut,Laya.Handler.create(this,e)):Laya.Tween.to(this,{right:this.acitonPianYi},500,Laya.Ease.quadInOut,Laya.Handler.create(this,e))}closeSlideWindow(){if(ke.hotListDatas.length<=0)console.log("抽屉没有数据");else{var e=this;this.slideWindowActionClose(function(){e.notifyUIState(_e.Youzi_SlideWindow,!1),e.visible=!1,e.SlideWindowUI.visible=!1,e.btnSLideClose.visible=!0,e.showSlideBtnAndHideSlideMask(),e.isAddStage&&(e.slideMask.zOrder=0,e.zOrder=0)}),e.btnSLideClose.visible=!1}}slideWindowActionClose(e){this.isLeft?Laya.Tween.to(this,{left:-this.moveDistance},500,Laya.Ease.quadInOut,Laya.Handler.create(this,e)):Laya.Tween.to(this,{right:-this.moveDistance},500,Laya.Ease.quadInOut,Laya.Handler.create(this,e))}initShow(){ke.dataNullReset("hotListDatas"),ke.getPropertiesValue(oe.SlideWindow_Name)&&(this.namelabLabel=null,this.slideList.spaceY=-25),ke.hotListDatas.length>0&&(this.slideButton&&(this.slideButton.visible=!0),this.slideList.array=ke.hotListDatas,this.slideList.renderHandler=new Laya.Handler(this,this.onListRender),this.slideList.mouseHandler=new Laya.Handler(this,this.onslideListItemMouseEvent))}onListRender(e,t){0==ke.hotListDatas[t].hotred&&(e.getChildByName("markImg").visible=!1);Re.getInstance().createYouziListItem(e,"icon","iconAnima",this.namelabLabel,ke.hotListDatas[t]),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&this.SlideWindowUI.visible&&(this.slideItemExposure[ke.hotListDatas[e].appid]||(ke.sendExposureLog(ke.hotListDatas[e],de.FLOAT),this.slideItemExposure[ke.hotListDatas[e].appid]=1))}onslideListItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的slideh索引:"+t);var i=ke.hotListDatas[t];if(i.locationIndex=de.FLOAT,ke.clickGameYouziUIId=_e.Youzi_SlideWindow,ke.startOtherGame(i,null),1==i.hotred)this.slideList.getCell(t).getChildByName("markImg").visible=!1}else e.type}checkExposure(){if(this.SlideWindowUI.visible)for(var e=0;e<ke.hotListDatas.length&&!(e>11);e++){var t=ke.hotListDatas[e];this.slideItemExposure[t.appid]||(this.slideItemExposure[t.appid]=1,ke.sendExposureLog(t,de.FLOAT))}}}class Ze extends Y.youzi.Youzi_SmallWallHUI{constructor(e){super(),this.namelabLabel="namelab",this.smallWallHItemExposure={},this.curFront=!0,this.curBack=!1,this.stopAction=!1,this.isClick=!1,this.dur=5e3,this.scaleUI=1,this.endCompletHandler=null,this.startCompleteHandler=null,this.visible=!1,this.SmallWallUIH.visible=!1,this.smallWallListH.vScrollBarSkin="",this.designWHAdapter(),this.initCustomParams(e)}designWHAdapter(){720!=Laya.stage.designHeight&&(this.scaleUI=Laya.stage.designHeight/720,this.scale(this.scaleUI,this.scaleUI))}initCustomParams(e){e&&(this.x=e.hasOwnProperty("x")?e.x:0,this.y=e.hasOwnProperty("y")?e.y:0)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){ke.getPropertiesValue(oe.SmallWall_Name)&&(this.namelabLabel=null,this.smallWallListH.repeatY=2,this.smallWallListH.spaceY=-25),ke.moreDatas.length>0&&(this.smallWallListH.renderHandler=new Laya.Handler(this,this.onListRender),this.smallWallListH.array=ke.moreDatas,this.smallWallListH.mouseHandler=new Laya.Handler(this,this.onSmallWallListItemMouseEvent),this.visible=!0,this.SmallWallUIH.visible=!0,this.dur=ke.moreDatas.length>8?5e3*(ke.moreDatas.length-8):5e3,this.starSmallWallAction())}onListRender(e,t){1==ke.moreDatas[t].hotred&&(e.getChildByName("redhit").visible=!0);Re.getInstance().createYouziListItem(e,"icon","iconAnima",this.namelabLabel,ke.moreDatas[t]),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&this.SmallWallUIH.visible&&(this.smallWallHItemExposure[ke.moreDatas[e].appid]||(ke.sendExposureLog(ke.moreDatas[e],de.SMALL_MATRIX_WALL),this.smallWallHItemExposure[ke.moreDatas[e].appid]=1))}stopSmallWallAcion(){this.stopAction=!0}starSmallWallAction(){this.smallWallListAutoScroll()}smallWallListAutoScroll(){this.SmallWallUIH.visible&&(this.smallWallListH.length<=8||(this.stopAction=!1,this.curFront&&!this.curBack?this.listTweenToEnd():!this.curFront&&this.curBack&&this.listTweenToStart()))}listTweenToEnd(){this.stopAction||(this.endCompletHandler=new Laya.Handler(this,this.listTweenToStart,null,!0),this.smallWallListH.tweenTo(this.smallWallListH.length-1,this.dur,this.endCompletHandler)),this.curFront=!0,this.curBack=!1}listTweenToStart(){this.stopAction||(this.startCompleteHandler=new Laya.Handler(this,this.listTweenToEnd,null,!0),this.smallWallListH.tweenTo(0,this.dur,this.startCompleteHandler)),this.curFront=!1,this.curBack=!0}onSmallWallListItemMouseEvent(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){if(!this.isClick){this.isClick=!0,console.log("当前选择的大家都在玩儿索引:"+t);var i=ke.moreDatas[t];if(i.locationIndex=de.SMALL_MATRIX_WALL,ke.clickGameYouziUIId=_e.Youzi_SmallWall,ke.startOtherGame(i,this.startOtherCall.bind(this)),1==i.hotred)this.smallWallListH.getCell(t).getChildByName("redhit").visible=!1}}else e.type}startOtherCall(e){this.isClick=!1,this.starSmallWallAction()}}class Ke extends Y.youzi.Youzi_FullScreenHUI{constructor(e){super(),this.namelabLabel="namelab",this.fullScreenExposure={},this.FullScreenUIScale=1,this.breaki=14,this.curFront=!0,this.curBack=!1,this.stopAction=!1,this.isClick=!1,this.dur=5e3,this.endCompletHandler=null,this.startCompleteHandler=null,this.uiStateCallCopy=null,this.column=3,this.row=4,this.visible=!1,this.FullScreenUI.visible=!1,this.FullScreenList.hScrollBarSkin="",this.designWHAdapter(),this.initCustomParams(e),this.scale(0,0),this.pivot(this.width/2,this.height/2),this.pos(this.width/2,Laya.stage.designHeight/2),this.closeFullScreen.on(Laya.Event.CLICK,this,this.onCloseFullScreen)}designWHAdapter(){Laya.stage.designHeight!=this.height&&(this.FullScreenUIScale=Laya.stage.designHeight/this.height,this.FullScreenUI.scale(this.FullScreenUIScale,this.FullScreenUIScale),this.BG.scaleY=this.FullScreenUIScale,this.height=Laya.stage.designHeight),Laya.stage.designWidth!=this.width&&(this.BG.scaleX=Laya.stage.designWidth/this.width,this.width=Laya.stage.designWidth),ke.getAspectRatio()>1.9&&(this.BG.scaleX=2,this.width+=300,this.FullScreenUI.width+=300,this.FullScreenList.repeatX=5,this.FullScreenList.width+=300,this.breaki=17)}initCustomParams(e){e&&(this.uiStateCallCopy=e.hasOwnProperty("uiStateCall")?e.uiStateCall:null)}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){ke.dataNullReset("fullMatrixScreenDatas"),ke.getPropertiesValue(oe.FullScreen_Name)&&(this.namelabLabel=null),ke.fullMatrixScreenDatas.length>0?(this.dur=ke.fullMatrixScreenDatas.length>this.breaki+1?5e3*(ke.fullMatrixScreenDatas.length-this.breaki-1):5e3,this.column=this.FullScreenList.repeatX,this.row=this.FullScreenList.repeatY,this.FullScreenList.array=ke.fullMatrixScreenDatas,this.FullScreenList.mouseHandler=new Laya.Handler(this,this.onItemClick),this.FullScreenList.renderHandler=new Laya.Handler(this,this.onListRender)):console.log("全屏落地页无数据")}onListRender(e,t){0==ke.fullMatrixScreenDatas[t].hotred&&(e.getChildByName("redhit").visible=!1);this.namelabLabel||(e.getChildByName("namelabBG").visible=!1);Re.getInstance().createYouziListItem(e,"icon","iconAnima",this.namelabLabel,ke.fullMatrixScreenDatas[t]),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.FullScreenUI.visible&&(this.fullScreenExposure[ke.fullMatrixScreenDatas[e].appid]||(ke.sendExposureLog(ke.fullMatrixScreenDatas[e],de.FULL_MATRIX_SCRENN),this.fullScreenExposure[ke.fullMatrixScreenDatas[e].appid]=1))}showFullScreen(){ke.fullMatrixScreenDatas.length<=0?console.log("全屏落地页无数据不展示"):this&&this.parent&&(this.zOrder=le.UI_ZORDER_TWO,this.visible=!0,this.FullScreenUI.visible=!0,Laya.Tween.to(this,{scaleX:1,scaleY:1},500,Laya.Ease.quadIn,Laya.Handler.create(this,this.showActionFinsh)))}showActionFinsh(){this.notifyUIState(_e.Youzi_Full,!0),ke.fullScreenRandomNavigate(),Laya.timer.once(3e3,this,this.starFullListAction)}onCloseFullScreen(){this.stopFullListAcion(),Laya.Tween.to(this,{scaleX:0,scaleY:0},500,Laya.Ease.quadInOut,Laya.Handler.create(this,this.closeActionFinsh))}closeActionFinsh(){this.zOrder=0,this.visible=!1,this.FullScreenUI.visible=!1,this.fullScreenExposure={},this.notifyUIState(_e.Youzi_Full,!1)}stopFullListAcion(){this.stopAction=!0}starFullListAction(){this.fullScreenListAutoScroll()}fullScreenListAutoScroll(){this.FullScreenUI.visible&&(this.FullScreenList.length<=this.breaki+1||(this.stopAction=!1,this.curFront&&!this.curBack?this.listTweenToEnd():!this.curFront&&this.curBack&&this.listTweenToStart()))}listTweenToEnd(){this.stopAction||(this.endCompletHandler=new Laya.Handler(this,this.listTweenToStart,null,!0),this.FullScreenList.tweenTo(this.FullScreenList.length-this.column*this.row+1,this.dur,this.endCompletHandler)),this.curFront=!0,this.curBack=!1}listTweenToStart(){this.stopAction||(this.startCompleteHandler=new Laya.Handler(this,this.listTweenToEnd,null,!0),this.FullScreenList.tweenTo(0,this.dur,this.startCompleteHandler)),this.curFront=!1,this.curBack=!0}onItemClick(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的全屏落地页索引:"+t);var i=ke.fullMatrixScreenDatas[t];i.locationIndex=de.FULL_MATRIX_SCRENN,ke.clickGameYouziUIId=_e.Youzi_Full,ke.startOtherGame(i,null)}else e.type}checkExposure(){if(this.FullScreenUI.visible)for(var e=0;e<ke.fullMatrixScreenDatas.length&&!(e>this.breaki);e++){var t=ke.fullMatrixScreenDatas[e];this.fullScreenExposure[t.appid]||(this.fullScreenExposure[t.appid]=1,ke.sendExposureLog(t,de.FULL_MATRIX_SCRENN))}}}class Je extends Y.youzi.Youzi_RecentlyUsedUI{constructor(e){super(),this.recentlyUsedExposure={},this.hw=0,this.breaki=9,this.curFront=!0,this.curBack=!1,this.stopAction=!1,this.isClick=!1,this.dur=5e3,this.endCompletHandler=null,this.startCompleteHandler=null,this.uiStateCallCopy=null,this.scaleUI=1,this.listMoveSpeed=80,this.visible=!1,this.RecentlyUsedList.visible=!1,this.RecentlyUsedList.vScrollBarSkin="",console.log("YouziRecentlyUsed"),this.designWHAdapter(),this.scale(0,0),this.pivot(this.width/2,this.height/2),this.pos(Laya.stage.width/2,this.height/2),this.initCustomParams(e),this.CloseBtn.on(Laya.Event.CLICK,this,this.closeRecentlyUsed)}designWHAdapter(){"full"==Laya.stage.scaleMode?(this.scaleUI=Laya.stage.width/this.width,this.RecentlyUsedUI.scale(this.scaleUI,this.scaleUI),this.width=Laya.stage.width,this.height=Laya.stage.height):(Laya.stage.designWidth!=this.width&&(this.scaleUI=Laya.stage.designWidth/this.width,this.RecentlyUsedUI.scale(this.scaleUI,this.scaleUI),this.width=Laya.stage.designWidth),Laya.stage.designHeight!=this.height&&(this.height=Laya.stage.designHeight,this.RecentlyUsedList.height=this.RecentlyUsedList.height+(Laya.stage.designHeight-1280))),ke.getAspectRatio()>1.9&&(this.RecentlyUsedList.repeatY=10,this.RecentlyUsedList.height+=240,this.breaki=10,this.height+=240,this.RecentlyUsedUI.y+=100)}initCustomParams(e){e&&(this.uiStateCallCopy=e.hasOwnProperty("uiStateCall")?e.uiStateCall:null)}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){ke.dataNullReset("fullMatrixScreenDatas"),ke.fullMatrixScreenDatas.length>0?(this.dur=130*(ke.fullMatrixScreenDatas.length+1)/this.listMoveSpeed*1e3,this.RecentlyUsedList.array=ke.fullMatrixScreenDatas,this.RecentlyUsedList.mouseHandler=new Laya.Handler(this,this.onItemClick),this.RecentlyUsedList.renderHandler=new Laya.Handler(this,this.onListRender)):ke.youziLog("全屏落地页类型2:","无数据")}onListRender(e,t){Re.getInstance().createYouziListItem(e,"icon","iconAnima","namelab",ke.fullMatrixScreenDatas[t]),this.checkSendExpsureLog(t)}checkSendExpsureLog(e){this.visible&&(this.recentlyUsedExposure[ke.fullMatrixScreenDatas[e].appid]||(ke.sendExposureLog(ke.fullMatrixScreenDatas[e],de.FULL_MATRIX_SCRENN),this.recentlyUsedExposure[ke.fullMatrixScreenDatas[e].appid]=1))}showRecentlyUsed(){ke.fullMatrixScreenDatas.length<=0?ke.youziLog("全屏落地页类型2:","无数据"):this&&this.parent&&(this.zOrder=le.UI_ZORDER_TWO,this.visible=!0,Laya.Tween.to(this,{scaleX:1,scaleY:1},500,Laya.Ease.quadIn,Laya.Handler.create(this,this.showActionFinish)))}showActionFinish(){this.notifyUIState(_e.Youzi_Full,!0),ke.fullScreenRandomNavigate(),Laya.timer.once(3e3,this,this.starFullListAction),this.RecentlyUsedList.visible=!0}closeRecentlyUsed(){Laya.Tween.to(this,{scaleX:0,scaleY:0},500,Laya.Ease.quadOut,Laya.Handler.create(this,this.closeActionFinish))}closeActionFinish(){this.zOrder=0,this.visible=!1,this.RecentlyUsedList.visible=!1,this.stopFullListAcion(),this.recentlyUsedExposure={},this.notifyUIState(_e.Youzi_Full,!1)}stopFullListAcion(){this.stopAction=!0}starFullListAction(){this.fullScreenListAutoScroll()}fullScreenListAutoScroll(){this.visible&&(this.RecentlyUsedList.length<=this.breaki+1||(this.stopAction=!1,this.curFront&&!this.curBack?this.listTweenToEnd():!this.curFront&&this.curBack&&this.listTweenToStart()))}listTweenToEnd(){this.stopAction||(this.endCompletHandler=new Laya.Handler(this,this.listTweenToStart,null,!0),this.RecentlyUsedList.tweenTo(this.RecentlyUsedList.length-this.RecentlyUsedList.repeatY,this.dur,this.endCompletHandler)),console.log("kkkk:",this.RecentlyUsedList.length-this.RecentlyUsedList.repeatY),this.curFront=!0,this.curBack=!1}listTweenToStart(){this.stopAction||(this.startCompleteHandler=new Laya.Handler(this,this.listTweenToEnd,null,!0),this.RecentlyUsedList.tweenTo(0,this.dur,this.startCompleteHandler)),this.curFront=!1,this.curBack=!0}onItemClick(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的全屏落地页索引:"+t);var i=ke.fullMatrixScreenDatas[t];i.locationIndex=de.FULL_MATRIX_SCRENN,ke.clickGameYouziUIId=_e.Youzi_Full,ke.startOtherGame(i,null)}else e.type}checkExposure(){if(this.visible)for(var e=0;e<ke.fullMatrixScreenDatas.length;e++){if(e>this.breaki){console.log("break i:"+e);break}var t=ke.fullMatrixScreenDatas[e];this.recentlyUsedExposure[t.appid]||(this.recentlyUsedExposure[t.appid]=1,ke.sendExposureLog(t,de.FULL_MATRIX_SCRENN))}}}class $e extends Y.youzi.Youzi_FullMixBannerUI{constructor(e){super(),this.mixnamelabLabel="namelab",this.isCreate=!1,this.bannerItemReport={},this.mixListItemReport={},this.uiScale=1,this.durBanner=5e3,this.bannerStop=!1,this.bannerScrollLeft=!0,this.bannerScrollRight=!1,this.bannerScrollRightHandler=null,this.bannerScrollLeftHandler=null,this.durMixFull=5e3,this.mixFullStop=!1,this.fullScrollTop=!0,this.fullScrollBottom=!1,this.fullScrollBottomHandler=null,this.fullScrollTopHandler=null,this.mixFullBreak=11,this.fullRow=2,this.fullColumm=3,this.uiStateCallCopy=null,this.visible=!1,this.Box_Label.visible=!1,this.BannerUI.visible=!1,this.MixList.visible=!1,this.MixListUI.visible=!1,this.CloseBtn.visible=!1,this.BannerUIList.hScrollBarSkin="",this.MixList.vScrollBarSkin="",this.designWHAdapter(),this.pivot(this.width/2,this.height/2),this.pos(Laya.stage.width/2,this.height/2),this.initCustomParams(e),this.scale(0,0)}designWHAdapter(){"full"==Laya.stage.scaleMode?(this.FullMixBannerUI.scale(Laya.stage.width/this.width,Laya.stage.width/this.width),this.width=Laya.stage.width,this.height=Laya.stage.height):(Laya.stage.designWidth!=this.width&&(this.uiScale=Laya.stage.designWidth/this.width,this.FullMixBannerUI.scale(this.uiScale,this.uiScale),this.width=Laya.stage.designWidth),Laya.stage.designHeight!=this.height&&(this.MaskBg.scaleY=Laya.stage.designHeight/this.height,this.height=Laya.stage.designHeight)),ke.getAspectRatio()>1.9&&(this.MixList.repeatY=4,this.MixListUI.height+=220,this.MixList.height+=220,this.mixFullBreak=14)}initCustomParams(e){e&&(this.uiStateCallCopy=e.hasOwnProperty("uiStateCall")?e.uiStateCall:null)}notifyUIState(e,t){this.uiStateCallCopy&&this.uiStateCallCopy(e,t)}onAwake(){ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){this.CloseBtn.on(Laya.Event.CLICK,this,this.closeFullMixBanner),this.createMixBanner(),this.createMixListUI()}createMixBanner(){ke.dataNullReset("matrixBannerDatas"),ke.matrixBannerDatas.length>0?(this.BannerUI.visible=!0,this.durBanner=ke.matrixBannerDatas.length>5?5500*(ke.matrixBannerDatas.length-5):5e3,this.BannerUIList.array=ke.matrixBannerDatas,this.BannerUIList.mouseHandler=new Laya.Handler(this,this.bannerItemClick),this.BannerUIList.renderHandler=new Laya.Handler(this,this.bannerListItemRender)):ke.youziLog("YouziMixBanner:","矩阵banner 无数据")}bannerListItemRender(e,t){Re.getInstance().createYouziListItem(e,"icon","iconAnima",null,ke.matrixBannerDatas[t]),this.checkBannerSendExpsureLog(t)}checkBannerSendExpsureLog(e){this.BannerUI.visible&&(this.bannerItemReport[ke.matrixBannerDatas[e].appid]||(ke.sendExposureLog(ke.matrixBannerDatas[e],de.FULL_MATRIX_SCRENN),this.bannerItemReport[ke.matrixBannerDatas[e].appid]=1))}createMixListUI(){ke.dataNullReset("fullMatrixScreenDatas"),ke.getPropertiesValue(oe.FullScreen_Name)&&(this.mixnamelabLabel=null),ke.fullMatrixScreenDatas.length>0?(this.durMixFull=ke.fullMatrixScreenDatas.length>this.mixFullBreak?4e3*(ke.fullMatrixScreenDatas.length-this.mixFullBreak):5e3,this.fullColumm=this.MixList.repeatX,this.fullRow=this.MixList.repeatY,this.MixList.array=ke.fullMatrixScreenDatas,this.MixList.mouseHandler=new Laya.Handler(this,this.mixFullItemClick),this.MixList.renderHandler=new Laya.Handler(this,this.mixListItemRender)):ke.youziLog("YouziMixBanner:","矩阵落地页类型3 无数据")}mixListItemRender(e,t){0==ke.fullMatrixScreenDatas[t].hotred&&(e.getChildByName("redhit").visible=!1);this.mixnamelabLabel||(e.getChildByName("namelabBG").visible=!1);Re.getInstance().createYouziListItem(e,"icon","iconAnima",this.mixnamelabLabel,ke.fullMatrixScreenDatas[t]),this.checkFullSendExpsureLog(t)}checkFullSendExpsureLog(e){this.MixListUI.visible&&(this.mixListItemReport[ke.fullMatrixScreenDatas[e].appid]||(ke.sendExposureLog(ke.fullMatrixScreenDatas[e],de.FULL_MATRIX_SCRENN),this.mixListItemReport[ke.fullMatrixScreenDatas[e].appid]=1))}showFullMixBanner(){(ke.fullMatrixScreenDatas.length>0||ke.matrixBannerDatas.length>0)&&this&&this.parent&&(this.visible=!0,this.zOrder=le.UI_ZORDER_TWO,Laya.Tween.to(this,{scaleX:1,scaleY:1},500,Laya.Ease.quintIn,Laya.Handler.create(this,this.showActionFinish)))}showActionFinish(){this.MixListUI.visible=!0,this.MixList.visible=!0,this.Box_Label.visible=!0,this.notifyUIState(_e.Youzi_Full,!0),ke.fullScreenRandomNavigate(),Laya.timer.once(3e3,this,this.showCloseBtn)}showCloseBtn(){this.CloseBtn.visible=!0,this.startBannerScrollAction(),this.startMixFullScrollAction()}closeFullMixBanner(){Laya.Tween.to(this,{scaleX:0,scaleY:0},500,Laya.Ease.quadOut,Laya.Handler.create(this,this.closeActionFinish))}closeActionFinish(){this.visible=!1,this.CloseBtn.visible=!1,this.MixListUI.visible=!1,this.MixList.visible=!1,this.Box_Label.visible=!1,this.zOrder=0,this.notifyUIState(_e.Youzi_Full,!1),this.stopBannerScrollAction(),this.stopMixFullScrollAction(),this.bannerItemReport={},this.mixListItemReport={}}stopBannerScrollAction(){this.bannerStop=!0}startBannerScrollAction(){this.bannerAutoScroll()}bannerAutoScroll(){this.BannerUIList.length<=5||(this.bannerStop=!1,this.bannerScrollLeft&&!this.bannerScrollRight?this.bannerListTweenToRight():this.bannerScrollRight&&!this.bannerScrollLeft&&this.bannerListTweenToLeft())}bannerListTweenToRight(){this.bannerStop||(this.bannerScrollLeftHandler=new Laya.Handler(this,this.bannerListTweenToLeft,null,!0),this.BannerUIList.tweenTo(this.BannerUIList.length-1,this.durBanner,this.bannerScrollLeftHandler)),this.bannerScrollLeft=!0,this.bannerScrollRight=!1}bannerListTweenToLeft(){this.bannerStop||(this.bannerScrollRightHandler=new Laya.Handler(this,this.bannerListTweenToRight,null,!0),this.BannerUIList.tweenTo(0,this.durBanner,this.bannerScrollRightHandler)),this.bannerScrollLeft=!1,this.bannerScrollRight=!0}stopMixFullScrollAction(){this.mixFullStop=!0}startMixFullScrollAction(){this.fullScroolAutoAction()}fullScroolAutoAction(){this.MixList.length<=this.mixFullBreak+1||(this.mixFullStop=!1,this.fullScrollTop&&!this.fullScrollBottom?this.fullListTweenToBottom():this.fullScrollBottom&&!this.fullScrollTop&&this.fullListTweenToTop())}fullListTweenToBottom(){this.mixFullStop||(this.fullScrollBottomHandler=new Laya.Handler(this,this.fullListTweenToTop,null,!0),this.MixList.tweenTo(this.MixList.length-this.fullColumm*this.fullRow+1,this.durMixFull,this.fullScrollBottomHandler),console.log("kkkL:",this.MixList.length-this.fullColumm*this.fullRow+1)),this.fullScrollTop=!0,this.fullScrollBottom=!1}fullListTweenToTop(){this.mixFullStop||(this.fullScrollTopHandler=new Laya.Handler(this,this.fullListTweenToBottom,null,!0),this.MixList.tweenTo(0,this.durMixFull,this.fullScrollTopHandler)),this.fullScrollTop=!1,this.fullScrollBottom=!0}bannerItemClick(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的mix banner索引:"+t);var i=ke.matrixBannerDatas[t];i.locationIndex=de.FULL_MATRIX_SCRENN,ke.clickGameYouziUIId=_e.Youzi_Full,ke.startOtherGame(i,null)}else e.type}mixFullItemClick(e,t){if("mousedown"==e.type);else if("mouseup"==e.type){console.log("当前选择的全屏落地页3索引:"+t);var i=ke.fullMatrixScreenDatas[t];i.locationIndex=de.FULL_MATRIX_SCRENN,ke.clickGameYouziUIId=_e.Youzi_Full,ke.startOtherGame(i,null)}else e.type}}class Qe extends Y.youzi.Youzi_ScreenPageUI{constructor(e,t){super(),this.gamePageData=null,this.gamePageUrl=null,this.notifyComplete=null,this.uiStateCallCopy=null,this.gamePageData=e,this.gamePageUrl=e.newPush,this.luoDiBtn.visible=!1,this.Small.visible=!1,this.designWHAdapter(),this.initParams(t),ke.setPropertiesValue("gamePageCloseCall",this.closeGamePage.bind(this)),Laya.stage.addChild(this)}designWHAdapter(){ke.getIsVertical()?Laya.Browser.clientHeight/Laya.Browser.clientWidth>1.9&&this.Big.scale(1,1.23):(this.width=1280,this.height=720,this.LuoDi.rotation=-90,this.LuoDi.pos(0,this.LuoDi.width),Laya.Browser.clientWidth/Laya.Browser.clientHeight>1.9&&this.Big.scale(1,1.23))}initParams(e){this.notifyComplete=ke.jsonHasKey(e,"gamePageComplete")?e.gamePageComplete:null}notifyFunc(e){this.notifyComplete&&(this.notifyComplete(e),this.notifyComplete=null)}setUIStateCall(e){this.uiStateCallCopy=e}notifyUiState(e){this.uiStateCallCopy&&this.uiStateCallCopy(e)}onAwake(){this.gamePageUrl?(Laya.loader.load(this.gamePageUrl,Laya.Handler.create(this,this.onLoadComplete),null,Laya.Loader.IMAGE),Laya.loader.on(Laya.Event.ERROR,this,this.onLoadError)):this.onLoadError()}onLoadComplete(e){e&&(this.zOrder=le.UI_ZORDER_ONE,this.Big.texture=Laya.Loader.getRes(this.gamePageUrl),this.notifyUiState(1),this.notifyFunc(1))}onLoadError(){this.closeGamePage()}closeGamePage(){this.notifyUiState(0),this.zOrder=0,ke.setPropertiesValue("gamePageCloseCall",null),this.visible=!1,this.removeSelf()}}class et extends Y.youzi.Youzi_FriendInvite_GameUI{constructor(e){super(),this.gameData=null,this.visible=!1,this.closeBtn.visible=!1,this.designWHAdapter(),this.initCustomParams(e),Laya.stage.addChild(this)}designWHAdapter(){this.noTouch.centerX=0,this.noTouch.centerY=0,this.Bg.centerX=0,this.Bg.centerY=0,this.width=Laya.stage.width,this.height=Laya.stage.height}initCustomParams(e){let t=e.scaleNum||1;1!=t&&this.Bg.scale(t,t)}onAwake(){this.acceptBtn.on(Laya.Event.CLICK,this,this.clickAccept),this.closeBtn.on(Laya.Event.CLICK,this,this.clickClose),ke.getDataLoaded()?this.initShow():ke._loadedCallBacks.push(this.initShow.bind(this))}initShow(){ke.getYouziInviteGameFilterDatas(e=>{if(e.length>0){if(this.chooseGameData(e),!this.gameData)return void this.clickClose();this.zOrder=le.UI_ZORDER_ONE,this.visible=!0,this.showCloseBtn();let t={message:"showYouziInviteContent",gameName:this.gameData.title,playerContentWidth:this.playerContent.width,playerContentHeight:this.playerContent.height};this.postMessageToWechatSubContext(t)}else this.clickClose()})}chooseGameData(e){this.gameData=ke.getRandomElementFromArray(e)}postMessageToWechatSubContext(e){Laya.Browser.window.wx.getOpenDataContext().postMessage(e),this.sendExpsureLog()}showCloseBtn(){Laya.timer.once(3e3,this,function(){this.closeBtn.visible=!0}.bind(this))}clickAccept(){ke.clickGameYouziUIId=_e.Youzi_FriendInviteGame,this.gameData.locationIndex=de.INVITE_FRIEND_PLAYGAME,ke.startOtherGame(this.gameData,null),this.clickClose()}clickClose(){this.postMessageToWechatSubContext({message:"closeYouziOpen"}),this.zOrder=0,this.visible=!1,this.removeSelf()}sendExpsureLog(){ke.sendExposureLog(this.gameData,de.INVITE_FRIEND_PLAYGAME)}}class tt{constructor(){this.gamePageCallTemp=null,this.fullScreenMatrixNode=null,this.fullScreenMatrix=null,this.fullScreenMatrixH=null,this.recentlyUsedScreen=null,this.fullMixBanner=null,this.vertical=!0,this.hw=0,this.tempMoreGameUI=null,this.tempSlideWindowUI=null,this.slideWindowMask=null,this.tempMoreGameUIH=null,this.tempSlideWindowUIH=null,this.slideWindowMaskH=null,this.offLineTemp=null}static getInstance(){return null==this.instance&&(this.instance=new tt),this.instance}youziDebug(e){ke.setPropertiesValue("debug",e)}openFullAutoNavigate(e){ke.openFullNavigate(e)}setGameNameHide(e,t){ke.setPropertiesValue(e,t)}initYouzi(e,t,i){ke.setPropertiesValue("createGamePageCall",this.createYouziGamePage.bind(this)),this.getAspectRatio(),ke.init(e,t,i)}getAspectRatio(){0==this.hw&&(Laya.stage.width>Laya.stage.height?(this.vertical=!1,this.hw=Laya.Browser.width/Laya.Browser.height):this.hw=Laya.Browser.height/Laya.Browser.width),ke.setPropertiesValue("aspectRatio",this.hw)}createYouziGamePage(e,t){new Qe(e,t).setUIStateCall(this.gamePageCallTemp)}registerNavigateToMiniCall(e){ke.setPropertiesValue("navigateToMiniCall",e)}offNavigateToMimiCall(){ke.setPropertiesValue("navigateToMiniCall",null)}registerGamePageCall(e){this.gamePageCallTemp=e}offGamePageCall(){this.gamePageCallTemp=null}createInviteFriendGame(e={}){if(Laya.Browser.window.wx)new et(e)}createMoreGameButton(e,t,i){var s=null;i||(i={}),(s=i.hasOwnProperty("btnUrl")?new Laya.Button(i.btnUrl):new Laya.Button("youziTexture/btn-entrance-nogift.png")).visible=!1,s.mouseEnabled=!0,s.stateNum=1,s.width=i.hasOwnProperty("width")?i.width:119,s.height=i.hasOwnProperty("height")?i.height:119;var a=i.hasOwnProperty("x")?i.x:0,n=i.hasOwnProperty("y")?i.y:0;return s.pos(a,n),e.addChild(s),t&&(s.dataSource=1),s}showMoreGameUI(e){e&&e.showMoreGameUI()}createMoreGameUIToStage(e,t){return this.tempMoreGameUI||(this.tempMoreGameUI=new Oe(t),this.tempMoreGameUI.setAddToStage(!0),this.tempMoreGameUI.setMoreGameBtn(e),Laya.stage.addChild(this.tempMoreGameUI)),e&&1==e.dataSource&&e.on(Laya.Event.CLICK,this,this.showMoreGameUI,[this.tempMoreGameUI]),this.tempMoreGameUI}createMoreGameUIHToStage(e,t){return this.tempMoreGameUIH||(this.tempMoreGameUIH=new Xe(t),this.tempMoreGameUIH.setAddToStage(!0),this.tempMoreGameUIH.setMoreGameBtn(e),Laya.stage.addChild(this.tempMoreGameUIH)),e&&1==e.dataSource&&e.on(Laya.Event.CLICK,this,this.showMoreGameUI,[this.tempMoreGameUIH]),this.tempMoreGameUIH}createMoreGameUI(e,t,i){var s=new Oe(i);return s.setMoreGameBtn(t),t&&1==t.dataSource&&t.on(Laya.Event.CLICK,this,this.showMoreGameUI,[s]),e.addChild(s),s}createMoreGameUIH(e,t,i){var s=new Xe(i);return s.setMoreGameBtn(t),t&&1==t.dataSource&&t.on(Laya.Event.CLICK,this,this.showMoreGameUI,[s]),e.addChild(s),s}createSlideButton(e,t,i,s){var a=new Laya.Button("youziTexture/btn_slide.png");a.mouseEnabled=!0,a.stateNum=1,s||(s={}),a.visible=!1,a.width=s.hasOwnProperty("width")?s.width:80,a.height=s.hasOwnProperty("height")?s.width:74;var n=0,o=s.hasOwnProperty("y")?s.y:Laya.stage.height/2;return t?(a.scaleX=-1,n=s.hasOwnProperty("x")?s.x:a.width):n=s.hasOwnProperty("x")?s.x:Laya.stage.width-a.width,a.pos(n,o),e.addChild(a),i&&(a.dataSource=1),a}showSlideWindowUI(e,t){t&&(t.setSlideButton(e),t.showSlideWindow())}createSlideWindowToStage(e,t,i){return this.tempSlideWindowUI||(this.tempSlideWindowUI=new Pe(t,i),this.tempSlideWindowUI.setAddToStage(!0),this.tempSlideWindowUI.setSlideButton(e),this.tempSlideWindowUI.setSlideMask(this.createCacheSlideWindowMask()),Laya.stage.addChild(this.createCacheSlideWindowMask()),Laya.stage.addChild(this.tempSlideWindowUI)),e&&1==e.dataSource&&e.on(Laya.Event.CLICK,this,this.showSlideWindowUI,[e,this.tempSlideWindowUI]),this.tempSlideWindowUI}createSlideWindowHToStage(e,t,i){return this.tempSlideWindowUIH||(this.tempSlideWindowUIH=new qe(t,i),this.tempSlideWindowUIH.setAddToStage(!0),this.tempSlideWindowUIH.setSlideButton(e),this.tempSlideWindowUIH.setSlideMask(this.createCacheSlideWindowMask()),Laya.stage.addChild(this.createCacheSlideWindowMask()),Laya.stage.addChild(this.tempSlideWindowUIH)),e&&1==e.dataSource&&e.on(Laya.Event.CLICK,this,this.showSlideWindowUI,[e,this.tempSlideWindowUIH]),this.tempSlideWindowUIH}createSlideWindowUI(e,t,i,s){var a=this.createSlideWindowMask(),n=new Pe(i,s);return n.setSlideButton(t),n.setSlideMask(a),t&&1==t.dataSource&&t.on(Laya.Event.CLICK,this,this.showSlideWindowUI,[t,n]),e.addChild(a),e.addChild(n),n}createSlideWindowUIH(e,t,i,s){var a=this.createSlideWindowMask(),n=new qe(i,s);return n.setSlideButton(t),n.setSlideMask(a),t&&1==t.dataSource&&t.on(Laya.Event.CLICK,this,this.showSlideWindowUI,[t,n]),e.addChild(a),e.addChild(n),n}createSlideBanner(e,t,i,s){var a=new He(i,s);return a.setSlideButton(t),t&&1==t.dataSource&&t.on(Laya.Event.CLICK,this,this.showSlideWindowUI,[t,a]),e.addChild(a),a}createCacheSlideWindowMask(){return this.slideWindowMask?this.slideWindowMask:(this.slideWindowMask=this.createSlideWindowMask(),this.slideWindowMask)}createSlideWindowMask(){var e=new Laya.Button("youziTexture/blank.png");return e.width=Laya.stage.designWidth+320,e.height=Laya.stage.designHeight+320,this.hw>1.9&&e.scale(1.8,1.8),e.stateNum=1,e.centerX=0,e.centerY=0,e.visible=!1,e}createBottomBanner(e,t,i){var s=new Ae(t,i);return e.addChild(s),s}bottomBannerActionStopOrStart(e,t){t&&(e?t.stopBottomBannerAcion():t.starBottomBannerAction())}createGuessLike(e,t){var i=new Ne(t);return e.addChild(i),i}createGuessLikeH(e,t){var i=new Ye(t);return e.addChild(i),i}guessLikeListTweenStopOrStart(e,t,i){t&&(e?t.stopGuessLikeAcion():t.starGuessLikeAction()),i&&(e?i.stopGuessLikeHAcion():i.starGuessLikeHAction())}createMainPush(e,t){var i=new Ue(t);return e.addChild(i),i}mainPushActionStopOrStart(e,t){e?t.clearTimerLoop():t.startTimerLoop()}createMultiMainPush(e){return new Ee(e)}stopOrStartMultiMainPush(e,t){t&&(e?t.stopChangeTimeLoop():t.startChangeTimeLoop())}createOffline(e){this.offLineTemp||(this.offLineTemp=new Ve,this.offLineTemp.setUIStateCall(e),Laya.stage.addChild(this.offLineTemp))}createOfflineH(e){this.offLineTemp||(this.offLineTemp=new je,this.offLineTemp.setUIStateCall(e),Laya.stage.addChild(this.offLineTemp))}createYouzi_WechatBanner(e,t=null,i=null,s=!1,a=!1){return new ze(e,t,i,s,a)}createYouzi_GameBanner(e,t,i){var s=new Ge(e,t);return i&&s.setYouziPosition(i.x,i.y),s}createYouziSmallWall(e,t){var i=new Fe(t);return e.addChild(i),i}smallWallActionStopOrStart(e,t){t&&(e?t.stopSmallWallAcion():t.starSmallWallAction())}createYouziSmallWallH(e,t){var i=new Ze(t);return e.addChild(i),i}smallWallHActionStopOrStart(e,t){t&&(e?t.stopSmallWallAcion():t.starSmallWallAction())}showFullMatrixAutoType(e){ke.getDataLoaded()?this.fullScreenAutoCreate(e):ke._loadedCallBacks.push(this.fullScreenAutoCreate.bind(this,null,[e]))}fullScreenAutoCreate(e){switch(e&&e.hasOwnProperty("fullScreenType")?e.fullScreenType:ke._fullScreenType){case re.TYPE_FULL_MATRIX:this.showFullScreenMatrix(e);break;case re.TYPE_RECENTLY_USED:this.showFullRecentlyUsed(e);break;case re.TYPE_FULL_MIXBANNER:this.showFullMixBannerScreen(e);break;default:ke.youziLog("全屏落地页无需创建:","没有可创建的全屏落地页类型")}}showFullScreenMatrix(e){this.fullScreenMatrix?this.vertical?this.fullScreenMatrix.showFullScreen():this.fullScreenMatrixH.showFullScreen():this.vertical?(this.fullScreenMatrix=new We(e),this.fullScreenMatrixNode=Laya.stage.addChild(this.fullScreenMatrix),this.fullScreenMatrix.showFullScreen()):(this.fullScreenMatrixH=new Ke(e),this.fullScreenMatrixNode=Laya.stage.addChild(this.fullScreenMatrixH),this.fullScreenMatrixH.showFullScreen())}showFullRecentlyUsed(e){this.recentlyUsedScreen?this.recentlyUsedScreen.showRecentlyUsed():(this.recentlyUsedScreen=new Je(e),Laya.stage.addChild(this.recentlyUsedScreen),this.recentlyUsedScreen.showRecentlyUsed())}showFullMixBannerScreen(e){this.fullMixBanner?this.fullMixBanner.showFullMixBanner():(this.fullMixBanner=new $e(e),Laya.stage.addChild(this.fullMixBanner),this.fullMixBanner.showFullMixBanner())}}tt.instance=null;class it extends Y.MainUiUI{constructor(){super(),this.isTryed=!1,it.instance=this,this.resizeHander(),h.on(Laya.Event.RESIZE,this,this.resizeHander)}static get Instance(){return it.instance}OnShow(e){this.InitDate(),this.InitHandler(),this.InitUi(),q.Instance.IsGuide()&&(this.mainBox.visible=!1),st.Instance.ShowDuoHuiTui_main(),st.Instance.ShowBannerHuiTui_main()}resizeHander(){this.height=Laya.stage.height}InitUi(){this.user_id.text="user_id:"+b.Instance.CurModel.m_userid,this.SetPlayerGrade(b.Instance.CurModel.GetUserAttr(v.money)),this.SetStage(),this.SetStagePro(0),this.SetSettingBox(!1)}InitDate(){this.GetImage(),this.coinFollow=new R(.1,0,0,.1),this.proWidth=this.pro.width,this.isTryed=!1}AdaptiveUI(){}moreFunc(e){e||(console.log("mainui"),st.Instance.ShowDuoHuiTui_main(),st.Instance.CreateMoreGame())}choutiFunc(e){e||(st.Instance.ShowDuoHuiTui_main(),st.Instance.CreateMoreGame())}InitHandler(){this.on(Laya.Event.MOUSE_DOWN,this,this.StartGame),this.settingBtn.CZ=(()=>{this.SetSettingBox()}),this.moreGameBtn.clickHandler=new Laya.Handler(this,()=>{st.Instance.ClearDuoHuiTui_main(),st.Instance.CreateFull_main(this.moreFunc.bind(this))}),this.coutiBtn.clickHandler=new Laya.Handler(this,()=>{st.Instance.ClearDuoHuiTui_main(),st.Instance.CreateChouTi_main(this.choutiFunc.bind(this))}),this.skinBtn.CZ=(()=>{Ht.Instance.AddView(Ut.SkinUi),st.Instance.ClearDuoHuiTui_main(),st.Instance.ClearBannerHuiTui_main()}),this.updateBtn.CZ=(()=>{Ht.Instance.AddView(Ut.GradeUi),st.Instance.ClearDuoHuiTui_main(),st.Instance.ClearBannerHuiTui_main()}),h.on(c.Event.ShowMainUi,this,this.ShowMainBox),h.on(c.Event.SetMonery,this,this.SetPlayerGrade),h.on(c.Event.SetStage,this,this.SetStage),h.on(c.Event.SetStagePro,this,this.SetStagePro),this.sound_btn.clickHandler=new Laya.Handler(this,()=>{this.SoundSetting()}),this.shake_btn.clickHandler=new Laya.Handler(this,()=>{this.ShakeSetting()})}SetStage(){this.stageValue.text=m.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:b.Instance.CurModel.ServerTime}];L.Instance.HttpPostRequest(S.protocols.Start,t,e=>{e.play_id&&(m.Instance.Play_Id=e.play_id),Nt.Start(m.Instance.stage.toString()),m.Instance.stage>=3?(Ht.Instance.AddView(Ut.TryOutUi),st.Instance.ClearDuoHuiTui_main(),st.Instance.ClearBannerHuiTui_main()):this.MainStartGame()},e=>{})}MainStartGame(){this.mainBox.visible=!1,this.sliderBox.visible=!1,this.off(Laya.Event.MOUSE_DOWN,this,this.StartGame),this.gameStart.stop(),at.Instance.GameStart(),V.Instance.StartGameClick(),It.Instance.StartGame(),dt.Instance.TryOutFriendPlayAni(),$.Instance.SetBlock(),q.Instance.StartGuide(),st.Instance.ClearDuoHuiTui_main(),st.Instance.ShowDuoHuiTui_game()}TryStartGame(){this.sliderBox.visible=!1,this.gameStart.stop(),this.off(Laya.Event.MOUSE_DOWN,this,this.StartGame),at.Instance.GameStart(),V.Instance.StartGameClick(),It.Instance.StartGame(),dt.Instance.TryOutFriendPlayAni(),$.Instance.SetBlock(),st.Instance.ShowDuoHuiTui_game(),st.Instance.ShowBannerHuiTui_main()}TryClick(){this.isTryed=!0,this.mainBox.visible=!1}ShowMainBox(){this.mainBox.visible=!0,this.sliderBox.visible=!0,this.gameStart.play(0,!0),this.SetPlayerGrade(b.Instance.CurModel.GetUserAttr(v.money)),this.isTryed=!1,this.on(Laya.Event.MOUSE_DOWN,this,this.StartGame),st.Instance.ShowDuoHuiTui_main(),st.Instance.ShowBannerHuiTui_main()}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.SoundShow(a.Instance.sound),this.ShakeShow(a.Instance.vibrate)}SoundSetting(){a.Instance.sound=!a.Instance.sound,this.SoundShow(a.Instance.sound)}SoundShow(e){e?(this.sound_open.visible=!0,this.sound_guan.visible=!1,a.Instance.SettingSound(1),console.log("开启声音")):(this.sound_open.visible=!1,this.sound_guan.visible=!0,a.Instance.SettingSound(0),console.log("关闭声音"))}ShakeSetting(){a.Instance.vibrate=!a.Instance.vibrate,this.ShakeShow(a.Instance.vibrate)}ShakeShow(e){e?(this.shake_open.visible=!0,this.shake_guan.visible=!1,console.log("开启震动")):(this.shake_open.visible=!1,this.shake_guan.visible=!0,console.log("关闭震动"))}OnClose(){this.off(Laya.Event.MOUSE_DOWN,this,this.StartGame),h.off(Laya.Event.RESIZE,this,this.resizeHander),h.off(c.Event.ShowMainUi,this,this.ShowMainBox),h.off(c.Event.SetMonery,this,this.SetPlayerGrade),h.off(c.Event.SetStage,this,this.SetStage),h.off(c.Event.SetStagePro,this,this.SetStagePro),it.instance=null,Laya.timer.clearAll(this)}}class st{static get Instance(){return this.instance||(this.instance=new st)}showMoreGameForCancel(e){switch(e){case _e.Youzi_MainPush:case _e.Youzi_BottomBanner:this.CreateFull_main();break;default:console.log("不需要")}}InitHandler(){tt.getInstance().registerNavigateToMiniCall(this.showMoreGameForCancel.bind(this))}ShowDuoHuiTui_main(){if(this.multiPush_main)tt.getInstance().stopOrStartMultiMainPush(!1,this.multiPush_main),this.duohuituiSp_main.visible=!0;else{this.duohuituiSp_main=new Laya.Sprite,Ht.Instance.popNode.addChild(this.duohuituiSp_main);let e=[{parentNode:this.duohuituiSp_main,x:20,y:.5*Laya.stage.height-300},{parentNode:this.duohuituiSp_main,x:Laya.stage.width-100,y:.5*Laya.stage.height-300},{parentNode:this.duohuituiSp_main,x:Laya.stage.width-100,y:.5*Laya.stage.height-80}];this.multiPush_main=tt.getInstance().createMultiMainPush(e)}}ClearDuoHuiTui_main(){tt.getInstance().stopOrStartMultiMainPush(!0,this.multiPush_main),this.duohuituiSp_main.visible=!1}ShowBannerHuiTui_main(){this.bannerpush_main?(tt.getInstance().bottomBannerActionStopOrStart(!1,this.bannerpush_main),this.bannerHuiTuiSp_main.visible=!0):(this.bannerHuiTuiSp_main=new Laya.Sprite,Ht.Instance.popNode.addChild(this.bannerHuiTuiSp_main),this.bannerpush_main=tt.getInstance().createBottomBanner(this.bannerHuiTuiSp_main,!1))}ClearBannerHuiTui_main(){tt.getInstance().bottomBannerActionStopOrStart(!0,this.bannerpush_main),this.bannerHuiTuiSp_main.visible=!1}CreateChouTi_main(e=null){st.instance.choutiCallback=e;this.choutiObj_main=tt.getInstance().createSlideWindowUI(it.Instance,null,!0,{uiStateCall:function(e,t){t?(console.log("抽屉显示"),st.instance.choutiCallback&&st.instance.choutiCallback(!0)):(console.log("抽屉隐藏"),st.instance.choutiCallback&&st.instance.choutiCallback(!1))}}),this.choutiObj_main.showSlideWindow()}CreateFull_main(e=null){console.log(e.name),st.instance.fullCallback=e;tt.getInstance().showFullMatrixAutoType({uiStateCall:function(e,t){console.log(e),t?(console.log("全屏矩阵打开"),st.instance.fullCallback&&st.instance.fullCallback(!0)):(console.log("全屏矩阵关闭"),st.instance.fullCallback&&st.instance.fullCallback(!1))}})}ShowDuoHuiTui_Result(){if(this.multiPush_result)tt.getInstance().stopOrStartMultiMainPush(!1,this.multiPush_result),this.duohuituiSp_result.visible=!0;else{this.duohuituiSp_result=new Laya.Sprite,Ht.Instance.popNode.addChild(this.duohuituiSp_result);let e=[{parentNode:this.duohuituiSp_result,x:20,y:.5*Laya.stage.height-240},{parentNode:this.duohuituiSp_result,x:20,y:.5*Laya.stage.height},{parentNode:this.duohuituiSp_result,x:Laya.stage.width-100,y:.5*Laya.stage.height-240},{parentNode:this.duohuituiSp_result,x:Laya.stage.width-100,y:.5*Laya.stage.height}];this.multiPush_result=tt.getInstance().createMultiMainPush(e)}}ClearDuoHuiTui_Result(){tt.getInstance().stopOrStartMultiMainPush(!0,this.multiPush_result),this.duohuituiSp_result.visible=!1}ShowDuoHuiTui_game(){if(this.multiPush_game)tt.getInstance().stopOrStartMultiMainPush(!1,this.multiPush_game),this.duohuituiSp_game.visible=!0;else{this.duohuituiSp_game=new Laya.Sprite,Ht.Instance.popNode.addChild(this.duohuituiSp_game);let e=[{parentNode:this.duohuituiSp_game,x:20,y:154}];this.multiPush_game=tt.getInstance().createMultiMainPush(e)}}ClearDuoHuiTui_game(){tt.getInstance().stopOrStartMultiMainPush(!0,this.multiPush_game),this.duohuituiSp_game.visible=!1}CreateMoreGame(){this.moreGame=tt.getInstance().createMoreGameUI(Ht.Instance.popNode,null,{uiStateCall:function(e,t){t?console.log("打开矩阵墙"):console.log("关闭矩阵墙")}}),this.moreGame.showMoreGameUI()}}class at{constructor(){this.towerCount=0,this.roleCount=0,this.blockCount=0,this.easterCount=0}static get Instance(){return at.instance||(at.instance=new at)}GameStart(){this.towerCount=0,this.roleCount=0,this.blockCount=0}GameWin(){Nt.LongVibrate(),se.Clear(),st.Instance.ClearDuoHuiTui_game(),Ht.Instance.AddView(Ut.ResultUi,!0),H.Instance.Reset(),$.Instance.Reset(),dt.Instance.Reset(),It.Instance.Reset(),ie.Instance.Reset()}ToDance(e=!1){st.Instance.ClearBannerHuiTui_main(),se.CheatBanner(null),It.Instance.GoToDance(),e?dt.Instance.GoToDance1():dt.Instance.GoToDance(),D.Instance.SetCamState(wt.jump,.03),Laya.timer.once(4e3,this,this.GameWin)}GameOver(){q.Instance.GameDied(),V.Instance.OnClickUp(),It.Instance.StopCreate(),V.Instance._Switch=!1,Nt.LongVibrate(),se.Clear(),st.Instance.ClearDuoHuiTui_game(),st.Instance.ClearBannerHuiTui_main(),Ht.Instance.AddView(Ut.ResultUi,!1),H.Instance.Reset(),$.Instance.Reset(),dt.Instance.Reset(),It.Instance.Reset(),It.Instance.SetActiveFalse(),ie.Instance.Reset()}Pause(){this.easterCount>=1?this.GameOver():this.easterCount++}Easter(){}Arrive(){H.Instance.Reset(),$.Instance.Reset()}NextLevel(){m.Instance.stage++,Lt.Instance.InItScene(),Ht.Instance.CloseView(Ut.ResultUi),h.event(c.Event.ShowMainUi),h.event(c.Event.SetStage),h.event(c.Event.SetStagePro,0),st.Instance.CreateFull_main(this.huituiFunc.bind(this))}ReStart(){dt.Instance.Reset(),Lt.Instance.InItScene(),h.event(c.Event.ShowMainUi),h.event(c.Event.SetStagePro,0),st.Instance.CreateFull_main(this.huituiFunc.bind(this))}huituiFunc(e){e||console.log("result Close huitui")}ShowTopTip(){}}class nt extends Laya.Script3D{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.mat=e.getChildAt(0).meshRenderer.material}Cheack(){if(this.tarTran.localPositionZ-this.tran.localPositionZ>=5)return console.log("回收tower"),void this.Des();this.MoveHpText()}MoveHpText(){let e=O.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)}SetTower(e){this._firend=null,this.tarTran=It.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._createFriend(),this._hp=e.hp,this.hpText||(this.hpText=H.Instance.CreateHpText(),this.hpText.text=this._hp.toString(),this._camera||(this._camera=D.Instance._camer),Ht.Instance.popNode.addChild(this.hpText)),this.MoveHpText(),Laya.timer.frameLoop(1,this,this.Cheack)}_createFriend(){this._firend=dt.Instance.CreateFriend(this.FriendSpawnPoint)}SaveFriend(){this._firend&&(this._firend.TweenFall(),this._firend=null)}Atked(e){if(this._hp-=m.bulletAttack,this._hp<=0)return this.SaveFriend(),P.Instance.CreateBoomEffect(this.tran.position),this.Des(),void at.Instance.towerCount++;P.Instance.CreateHitEffect(e);let t=Math.ceil(this._hp);this.hpText.text=t.toString(),this.SetMat()}SetMat(){this.mat.albedoIntensity=4,Laya.timer.once(100,this,()=>{this.mat.albedoIntensity=1})}Des(){Laya.timer.clearAll(this),this.hpText&&(M.Instance.SetDisableForUi(k.HpText,this.hpText),this.hpText=null),this.mat.albedoIntensity=1,H.Instance.RemoveTower(this.selfobj),M.Instance.SetDisableObject(this.selfobj),this._firend&&(this._firend.Des(),this._firend=null)}onDisable(){}onDestroy(){}}var ot=Laya.Vector3;class rt extends Laya.Script3D{constructor(){super(...arguments),this.speed=U.VecZero,this._forward=new ot(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=g.bulletspeed}StartMove(e,t=!1){this.tarTran=e,this.over=t,Laya.timer.frameLoop(1,this,this._MOVE)}_MOVE(){this.tran.translate(this.speed),ot.distance(this.tarTran.position,this.tran.position)>=g.bulletMaxDis?this.Des():this.CreateRay()}CreateRay(){let e=this.rayPoint.position.clone();if(this._scene||(this._scene=Lt.Instance._mainscene),this.ray||(this.forward||(this.forward=U.VecZero),this.ray=new Laya.Ray(U.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,g.bulletRayLength)){let e=this.outHit.collider.owner;if(e.layer==B.tower){let t=e.getComponent(nt);t&&t.Atked(this.outHit.point)}else if(e.layer==B.enemy){let t=e.getComponent(te);t&&t.Atked(this.outHit.point)}else e.layer==B.cube1||e.layer==B.cube2||e.layer==B.cube3?($.Instance.CubeBlockAtked(e),at.Instance.blockCount++):P.Instance.CreateHitEffect(this.outHit.point);this.Des()}else;}Des(){Laya.timer.clearAll(this),M.Instance.SetDisableObject(this.selfobj),M.bulletCount--}onDestroy(){}}var lt=Laya.Vector3,ht=Laya.Quaternion;class ct extends Laya.Script3D{constructor(){super(...arguments),this._up=new lt(0,1,0),this.isreturn=!1,this.isover=!1,this.isClickCom=!0,this.isStop=!0,this.ts=new lt(0,0,.01),this.isFristShoot=!0}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=U.VecZero,this.speed=g.friendspeed,this.quaternion1=new ht}SetTar(){this.isreturn=!1,this.isClickCom=!0,this.isStop=!0,this.isover=!1,this.PlayAni(A.animator.Idle,1),h.off(c.Event.StopShot,this,this.StopCreate)}TryAddFriend(e){this.PlayAni(A.animator.Idle,1),this.dataPar=e,this.dataPar.ishave=!0,this.isClickCom=!0,this.isStop=!0,this.isreturn=!0,this.isover=!1,dt.Instance.AddGetDic(this.selfobj.id,this),this.BulletHandler(),It.Instance.IsBulleting()&&this.CreateBullet(),Laya.timer.frameLoop(1,this,this.Move)}TweenFall(){let e=Laya.Tween.to(this.tran,{localPositionY:0},400,Laya.Ease.quintIn,Laya.Handler.create(this,()=>{let t=It.Instance.GetFrindPar();t?(this.dataPar=t,this.dataPar.ishave=!0,this.tar=this.dataPar.sp,this.tarTra=this.tar.transform,e.clear(),this.StartMove()):console.warn("friendPar没有位置了")},null,!1))}StartMove(){this.PlayAni(A.animator.RunAndGun,2),this.isreturn=!1,this.isClickCom=!0,this.isStop=!0,this.isover=!1,Laya.timer.frameLoop(1,this,this.Move)}_createRay(){this.CreateRay()}Move(){if(this.isreturn)return void this._createRay();let e=this.tarTra.position.clone();lt.subtract(e,this.tran.position,this.forW),lt.normalize(this.forW,this.forW),this.forW=new lt(this.forW.x*this.speed,this.forW.y*this.speed,this.forW.z*this.speed),this.tran.translate(this.forW,!1),lt.distance(this.tran.position,e)<.1?this.ArriveTarPos():(ht.lookAt(e,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),ht.slerp(this.tran.rotation,this.quaternion1,.1,this.quaternion1),this.tran.rotation=this.quaternion1.clone())}ArriveTarPos(){this.isClickCom=!0,this.isStop=!0,this.isreturn=!0,this.tar.addChild(this.selfobj),this.tran.localPosition=U.VecZero,this.PlayAni(A.animator.RunAndGun,2),dt.Instance.AddGetDic(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=U.VecZero,this.BulletHandler(),this.CreateBullet()},null,!1))}CreateRay(){let e=this.rayPoint.position;if(this._scene||(this._scene=Lt.Instance._mainscene),this.rayF||(this.rayF=new Laya.Ray(U.VecZero,new lt(0,0,1)),this.outHitF=new Laya.HitResult),this.rayF.origin=e,this._scene.physicsSimulation.rayCast(this.rayF,this.outHitF,g.playerRayLengthF)){this.outHitF.collider.owner;this.Died(this.outHitF.point)}else if(this.rayL||(this.rayL=new Laya.Ray(U.VecZero,new lt(1,0,0)),this.outHitL=new Laya.HitResult),this.rayL.origin=e,this._scene.physicsSimulation.rayCast(this.rayL,this.outHitL,g.playerRayLengthLR)){this.outHitL.collider.owner;this.Died(this.outHitL.point)}else if(this.rayR||(this.rayR=new Laya.Ray(U.VecZero,new lt(-1,0,0)),this.outHitR=new Laya.HitResult),this.rayR.origin=e,this._scene.physicsSimulation.rayCast(this.rayR,this.outHitR,g.playerRayLengthLR)){this.outHitR.collider.owner;this.Died(this.outHitR.point)}else;}PlayAni(e,t,i){this.animator.play(e),t||(t=1),this.animator.speed=t}BulletHandler(){h.on(c.Event.StopShot,this,this.StopCreate)}CreateBullet(){this.isStop=!1,this.isClickCom&&(this.isClickCom=!1,this._CreateBullet(),Laya.timer.loop(2*m.bulletTime*1e3,this,this.LoopCreate))}LoopCreate(){if(this.isStop)return Laya.timer.clear(this,this.LoopCreate),void(this.isClickCom=!0);this._CreateBullet()}_CreateBullet(){let e=M.Instance.SetActiveObject(M.pooltype.PlayerBullet);if(e){Lt.Instance.bulletCon.addChild(e),e.transform.position=this.bulletPos.position.clone(),e.transform.localRotationEuler=this.bulletPos.rotationEuler.clone();let t=e.getComponent(rt);t||(t=e.addComponent(rt)),t.StartMove(this.bulletPos,this.isover)}}StopCreate(){this.isStop=!0}Died(e){this.dataPar&&(this.dataPar.ishave=!1),P.Instance.CreateXueEffect(e),dt.Instance.RemoveGet(this.selfobj),this.Des(),It.Instance.CheackGame()}SetPar(){let e=this.tran.position.clone();It.Instance.playerContainer.addChild(this.selfobj),this.tran.position=e.clone()}ToStand(e){this.SetPar(),this.tp=e,ht.lookAt(e,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone(),this.PlayAni(A.animator.CrouchFiring,1),Laya.timer.frameLoop(1,this,this._TOSTAND)}_TOSTAND(){if(lt.subtract(this.tp,this.tran.position,this.forW),lt.normalize(this.forW,this.forW),this.forW=new lt(.15*this.forW.x,.15*this.forW.y,.15*this.forW.z),this.tran.translate(this.forW,!1),lt.distance(this.tran.position,this.tp)<.1){Laya.timer.clear(this,this._TOSTAND);let e=Laya.Tween.to(this.tran,{localRotationEulerY:0},100,Laya.Ease.quintIn,Laya.Handler.create(this,()=>{e.clear()},null,!1))}else ht.lookAt(this.tp,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}Dance(e){this.PlayAni(A.animator.RunAndGun,2),this.danceP=e.position.clone(),this.r=e.rotationEuler.clone(),Laya.timer.frameLoop(1,this,this._Dance)}_Dance(){if(lt.subtract(this.danceP,this.tran.position,this.forW),lt.normalize(this.forW,this.forW),this.forW=new lt(.15*this.forW.x,.15*this.forW.y,.15*this.forW.z),this.tran.translate(this.forW),lt.distance(this.tran.position,this.danceP)<.15)return Laya.timer.clear(this,this._Dance),this.tran.position=this.danceP.clone(),this.tran.rotationEuler=this.r.clone(),void this.PlayAni(A.animator.Dance,1);ht.lookAt(this.danceP,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}StartAtkEnemy(){Laya.timer.clear(this,this._TOSTAND),this.isover=!0,this.isFristShoot=!0,this.enemyTar=null,Laya.timer.frameLoop(1,this,this._atkEnemy)}_atkEnemy(){if(null==this.enemyTar)this.enemyTar=ie.Instance.PlayerGetEnemy(),null!=this.enemyTar&&(this.ATKp=this.enemyTar.transform.position.clone(),ht.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=ie.Instance.PlayerGetEnemy(),null!=this.enemyTar&&(this.ATKp=this.enemyTar.transform.position.clone(),ht.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.CreateBullet()),this.ATKp=this.enemyTar.transform.position.clone(),ht.lookAt(this.ATKp,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}}Des(){this.dataPar&&(this.dataPar.ishave=!1,this.dataPar=null),dt.Instance.RemoveFriend(this.selfobj),dt.Instance.RemoveGet(this.selfobj),Laya.timer.clearAll(this),Laya.Tween.clearAll(this),h.off(c.Event.StopShot,this,this.StopCreate),M.Instance.SetDisableObject(this.selfobj)}onDestroy(){}}class dt{constructor(){this.v3=U.VecZero,this.friendDic=new l,this.getDic=new l}static get Instance(){return this.instance||(this.instance=new dt)}CreateFriend(e){let t=M.Instance.SetActiveObject(M.pooltype.player+m.Instance.equipId);if(t){t.transform.position=e.position.clone(),t.transform.rotationEuler=e.rotationEuler.clone(),It.Instance.playerContainer.addChild(t);let i=t.getComponent(ct);return i||(i=t.addComponent(ct)),i.SetTar(),this.friendDic.set(t.id,i),i}return null}CreateTryOut(){for(let e=0;e<3;e++)Laya.timer.frameOnce(e,this,this._createtryout,null,!1)}_createtryout(){let e=It.Instance.GetFrindPar();if(!e)return void console.warn("friendPar没有位置了");let t=M.Instance.SetActiveObject(M.pooltype.player+m.Instance.equipId);if(t){e.sp.addChild(t),t.transform.localPosition=U.VecZero,t.transform.localRotationEuler=U.VecZero;let i=t.getComponent(ct);i||(i=t.addComponent(ct)),i.TryAddFriend(e),this.friendDic.set(t.id,i)}}TryOutFriendPlayAni(){for(const e in this.friendDic.container){const t=this.friendDic.get(e);t.CreateBullet(),t.PlayAni(A.animator.RunAndGun,2)}}RemoveFriend(e){this.friendDic.delete(e.id)}AddGetDic(e,t){console.log(22222222),this.getDic.set(e,t)}RemoveGet(e){this.getDic.delete(e.id)}GetArrive(){return this.getDic.size}ToArrive(e,t){if(1==e){for(const e in this.getDic.container){const t=this.getDic.get(e);this.v3.x=0,t.ToStand(this.v3.clone())}return}let i=2*g.arriveStandWidth/(e-1),s=0;this.v3.z=t;for(const e in this.getDic.container){const t=this.getDic.get(e);this.v3.x=g.arriveStandWidth-s*i,t.ToStand(this.v3.clone()),s++}}StartAtkEnemy(){for(const e in this.getDic.container){this.getDic.get(e).StartAtkEnemy()}}GetGetSp(){let e=this.getDic.size,i=t.randomInt(1,e),s=1;for(const e in this.getDic.container){if(s==i){return this.getDic.get(e).selfobj}s++}return null}GoToDance(){for(const e in this.getDic.container){let t=ut.Instance.GetDancePos();if(!t)return;this.getDic.get(e).Dance(t)}}GoToDance1(){for(const e in this.getDic.container){let t=ut.Instance.GetDancePos();const i=this.getDic.get(e);i.SetPar(),t&&i.Dance(t)}}Reset(){let e=[];for(const t in this.friendDic.container)e.push(t);if(e.length>0)for(let t=0;t<e.length;t++){const i=e[t];let s=this.friendDic.get(i);s&&s.Des()}console.log("this.friendDic.size",this.friendDic.size),this.getDic.clear()}}class ut{constructor(){this.airisshow=!1,this.danceindex=0}static get Instance(){return this.instance||(this.instance=new ut)}Init(e){e?(this.finalTra=e.transform,this.jumpCamTra=e.getChildByName("jumpCamPos").transform,this.FinalBlock=e.getChildAt(0),this.EnemySpawnPoint=this.FinalBlock.getChildByName("EnemySpawnPoint").transform,this.PlayerDancePoint=this.FinalBlock.getChildByName("PlayerDancePoint"),this.helicopter=this.FinalBlock.getChildByName("helicopter"),this.toured=this.FinalBlock.getChildByName("toured").transform,this.FinalBlock.active=!1):console.error("飞机不存在")}SetAir(){this.danceindex=0,this.airisshow=!1,this.FinalBlock.active=!1;let e=E.Instance._level.road_list.length;this.winPos=e*g.barrierRoadLength,this.finalTra.localPositionZ=this.winPos,this.stageProLen=this.winPos-It.Instance.playerStartTra.localPositionZ;let t=E.Instance._level.isgold;this.helicopter.active=t,this.toured1=this.FinalBlock.getChildByName("toured1").transform.position.clone(),this.toured2=this.FinalBlock.getChildByName("toured2").transform.position.clone()}CheckPlayerRoadPos(e){let t=this.winPos-e;t<=60&&!this.airisshow?this.ShowAir():(h.event(c.Event.SetStagePro,(this.stageProLen-t)/this.stageProLen),t<=0&&this.ArriveFinal())}ShowAir(){this.airisshow=!0,this.FinalBlock.active=!0}ArriveFinal(){if(It.Instance.ArriveFinal(),E.Instance._level.isgold)at.Instance.ToDance(!0);else{let e=0,t=It.Instance.ArriveIsdead();if(t||e++,0==(e+=dt.Instance.GetArrive()))return;dt.Instance.ToArrive(e,this.toured.position.z),t||It.Instance.ToArrive(e,this.toured.position.z),Laya.timer.once(1300,this,this.CreateEnemy)}}CreateEnemy(){It.Instance.StartAtkEnemy(),dt.Instance.StartAtkEnemy(),ie.Instance.CreateEnemy(this.EnemySpawnPoint.position.clone())}GetDancePos(){if(this.danceindex>this.PlayerDancePoint.numChildren-1)return null;let e=this.PlayerDancePoint.getChildAt(this.danceindex).transform;return this.danceindex++,e}}var pt=Laya.Vector3,mt=Laya.Quaternion;class gt extends Laya.Script3D{constructor(){super(...arguments),this.isarrive=!1,this.isdead=!1,this._up=new pt(0,1,0),this.ts=new pt(0,0,.01),this.isFristShoot=!0}onAwake(){this.selfobj=this.owner,this.tran=this.selfobj.transform,this.body=this.selfobj.getChildAt(0),this.animator=this.body.getComponent(Laya.Animator),this.rayPoint=this.selfobj.getChildByName("rayPoint").transform,this.bulletPos=this.selfobj.getChildByName("bulletPos").transform,this._speed=U.VecZero,this._speed.z=g.playerspeed,this.forW=U.VecZero,this.quaternion1=new mt}StartMove(){this.isdead=!1,this.isarrive=!1,Laya.timer.frameLoop(1,this,this.Move)}Move(){if(this.isarrive){if(this.isdead)return;return void this.CreateRay()}this.tran.translate(this._speed);let e=this.tran.localPositionZ;z.Instance.CheckPlayerRoadPos(e),ut.Instance.CheckPlayerRoadPos(e),$.Instance.CheckPlayerRoadPos(e),D.Instance.CameraMoveIngame(e),this.isdead||this.CreateRay()}Arrive(){this.isarrive=!0}CreateRay(){let e=this.rayPoint.position;if(this._scene||(this._scene=Lt.Instance._mainscene),this.rayF||(this.rayF=new Laya.Ray(U.VecZero,new pt(0,0,1)),this.outHitF=new Laya.HitResult),this.rayF.origin=e,this._scene.physicsSimulation.rayCast(this.rayF,this.outHitF,g.playerRayLengthF)){this.outHitF.collider.owner;this.Died(this.outHitF.point)}else if(this.rayL||(this.rayL=new Laya.Ray(U.VecZero,new pt(1,0,0)),this.outHitL=new Laya.HitResult),this.rayL.origin=e,this._scene.physicsSimulation.rayCast(this.rayL,this.outHitL,g.playerRayLengthLR)){this.outHitL.collider.owner;this.Died(this.outHitL.point)}else if(this.rayR||(this.rayR=new Laya.Ray(U.VecZero,new pt(-1,0,0)),this.outHitR=new Laya.HitResult),this.rayR.origin=e,this._scene.physicsSimulation.rayCast(this.rayR,this.outHitR,g.playerRayLengthLR)){this.outHitR.collider.owner;this.Died(this.outHitR.point)}else;}PlayAni(e,t,i){this.animator.play(e),t||(t=1),this.animator.speed=t}Slider(e){this.tran.localPositionX+=e;let t=this.tran.localPositionX;Math.abs(t)>g.playerMoveMaxX&&(this.tran.localPositionX=t>0?g.playerMoveMaxX:-g.playerMoveMaxX)}CreateBullet(){return this.isdead?null:this.bulletPos}Died(e){this.isdead=!0,this.body.active=!1,P.Instance.CreateXueEffect(e),It.Instance.CheackGame(!0)}Reset(){this.body.active=!0,this.PlayAni(A.animator.Idle,1),Laya.timer.clearAll(this)}ToStand(e){this.isdead||(this.tp=e,mt.lookAt(e,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone(),this.PlayAni(A.animator.CrouchFiring,1),Laya.timer.frameLoop(1,this,this._TOSTAND))}_TOSTAND(){pt.subtract(this.tp,this.tran.position,this.forW),pt.normalize(this.forW,this.forW),this.forW=new pt(.15*this.forW.x,.15*this.forW.y,.15*this.forW.z),this.tran.translate(this.forW),pt.distance(this.tran.position,this.tp)<.1?Laya.timer.clear(this,this._TOSTAND):(mt.lookAt(this.tp,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone())}StartAtkEnemy(){Laya.timer.clear(this,this._TOSTAND),this.isFristShoot=!0,this.enemyTar=null,Laya.timer.frameLoop(1,this,this._atkEnemy)}_atkEnemy(){if(!this.isdead)if(null==this.enemyTar)this.enemyTar=ie.Instance.PlayerGetEnemy(),null!=this.enemyTar&&(this.tp=this.enemyTar.transform.position.clone(),mt.lookAt(this.tp,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=ie.Instance.PlayerGetEnemy(),null!=this.enemyTar&&(this.tp=this.enemyTar.transform.position.clone(),mt.lookAt(this.tp,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone())),null==this.enemyTar)return It.Instance.StopCreate(!0),void(this.isFristShoot=!0);this.isFristShoot&&(this.isFristShoot=!1,It.Instance.CreateBullet(!0)),this.tp=this.enemyTar.transform.position.clone(),mt.lookAt(this.tp,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}}Dance(e){this.PlayAni(A.animator.RunAndGun,2),this.dancepos=e.position.clone(),this.r=e.rotationEuler.clone(),Laya.timer.frameLoop(1,this,this._Dance)}_Dance(){if(pt.subtract(this.dancepos,this.tran.position,this.forW),pt.normalize(this.forW,this.forW),this.forW=new pt(.15*this.forW.x,.15*this.forW.y,.15*this.forW.z),this.tran.translate(this.forW),pt.distance(this.tran.position,this.dancepos)<.15)return Laya.timer.clear(this,this._Dance),this.tran.position=this.dancepos.clone(),this.tran.rotationEuler=this.r.clone(),void this.PlayAni(A.animator.Dance,1);mt.lookAt(this.dancepos,this.tran.position,this._up,this.quaternion1),this.quaternion1.invert(this.quaternion1),this.tran.rotation=this.quaternion1.clone()}onDisable(){}onDestroy(){}}var yt=Laya.Vector3;class It{constructor(){this.isover=!1,this.isClickCom=!0,this.isStop=!0}static get Instance(){return this.instance||(this.instance=new It)}Init(e,t){this.playerStartTra=e.transform,this.playerContainer=t}CreatePlayer(){let e=M.Instance.SetActiveObject(M.pooltype.player+m.Instance.equipId);if(e){this.player=e,this.SetFriendPoint(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(gt);this.playerBehavior=t||this.player.addComponent(gt)}else console.error("player不存在")}InitPlayerPos(){this.player.active=!0,this.playerTra.position=this.playerStartTra.position.clone(),this.playerTra.rotationEuler=this.playerStartTra.rotationEuler.clone(),this.playerBehavior.PlayAni(A.animator.Idle,1)}ChangePlayer(){this.player&&M.Instance.SetDisableObject(this.player);let e=M.Instance.SetActiveObject(M.pooltype.player+m.Instance.equipId);if(e){this.player=e,this.SetFriendPoint(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(gt);this.playerBehavior=t||this.player.addComponent(gt)}}SetFriendPoint(e){this.FriendArrPos=[];let t=e.getChildByName("FriendSpawPos");t||console.error("friend父物体不存在");for(let e=0;e<t.numChildren;e++){let i={ishave:!1};i.sp=t.getChildAt(e),this.FriendArrPos.push(i)}}GetFrindPar(){for(let e=0;e<this.FriendArrPos.length;e++){const t=this.FriendArrPos[e];if(!t.ishave)return t}return null}SetPlayerPos(e){this.player||(this.CreatePlayer(),this.InitPlayerPos()),this._camera||(this._camera=D.Instance._camer,this._dis=-yt.distance(this.playerTra.position,this._camera.transform.position),this._y=O.WorldToScreen2(this._camera,this.playerTra.position).y);let t=new yt(e,this._y,this._dis),i=O.ScreenToWorld(this._camera,t);this.playerTra.localPositionX=i.x}StartGame(){this.playerBehavior&&(this.playerBehavior.StartMove(),this.playerBehavior.PlayAni(A.animator.RunAndGun,2))}SliderPlayer(e){let t=e.toFixed(2),i=Number(t)*g.sliderFactor;this.playerBehavior&&this.playerBehavior.Slider(i)}CreateBullet(e=!1){this.playerBehavior&&(this.isStop=!1,this.isClickCom&&(console.log("开始创建子弹"),this.isClickCom=!1,this._CreateBullet(),Laya.timer.loop(1e3*m.bulletTime,this,this.LoopCreate)))}LoopCreate(){if(this.isStop)return Laya.timer.clear(this,this.LoopCreate),void(this.isClickCom=!0);this._CreateBullet()}_CreateBullet(){Nt.ShortVibrate();let e=this.playerBehavior.CreateBullet();if(null==e)return;let t=M.Instance.SetActiveObject(M.pooltype.PlayerBullet);if(t){Lt.Instance.bulletCon.addChild(t),t.transform.position=e.position.clone(),t.transform.localRotationEuler=e.rotationEuler.clone();let i=t.getComponent(rt);i||(i=t.addComponent(rt)),i.StartMove(e,this.isover)}}StopCreate(e=!1){this.isStop=!0,e||h.event(c.Event.StopShot)}IsBulleting(){return!this.isStop}ArriveFinal(){V.Instance.OnClickUp(),It.Instance.StopCreate(),V.Instance._Switch=!1,at.Instance.Arrive(),this.playerBehavior&&this.playerBehavior.Arrive()}ArriveIsdead(){return!this.playerBehavior||this.playerBehavior.isdead}ToArrive(e,t){this.playerBehavior&&(1==e?this.playerBehavior.ToStand(new yt(0,0,t)):this.playerBehavior.ToStand(new yt(-g.arriveStandWidth,0,t)))}StartAtkEnemy(){this.playerBehavior&&(this.isover=!0,this.playerBehavior.StartAtkEnemy())}CheackGame(e){if(e){0==dt.Instance.GetArrive()&&(this.playerBehavior.Arrive(),at.Instance.GameOver())}else{if(0==dt.Instance.GetArrive()){this.playerBehavior.isdead&&(this.playerBehavior.Arrive(),at.Instance.GameOver())}}}GoToDance(){if(!this.playerBehavior)return;let e=ut.Instance.GetDancePos();e&&this.playerBehavior.Dance(e)}Reset(){for(let e=0;e<this.FriendArrPos.length;e++){this.FriendArrPos[e].ishave=!1}this.isover=!1,this.playerBehavior&&this.playerBehavior.Reset()}SetActiveFalse(){this.player&&(this.player.active=!1)}}var wt,ft=Laya.Vector3;!function(e){e[e.game=1]="game",e[e.jump=2]="jump"}(wt||(wt={}));class St extends Laya.Script3D{constructor(){super(),this.arg=.1,this.canmovegame=!1,this.startShake=!1,this.seconds=0,this.started=!1,this.quake=.3}onAwake(){this.selfObj=this.owner,this._tran=this.selfObj.transform,this.nowP=U.VecZero,this.nowR=U.VecZero,this.dis=U.VecZero,this.temp=U.VecZero}Init(){let e=D.Instance.startPosTra;this._tran.position=e.position.clone(),this._tran.localRotationEuler=U.SpToCam(e.localRotationEuler.clone()),this.dis.x=It.Instance.playerStartTra.position.x-this._tran.position.x,this.dis.y=It.Instance.playerStartTra.position.y-this._tran.position.y,this.dis.z=It.Instance.playerStartTra.position.z-this._tran.position.z}SetCameraByState(e,t){switch(this.arg=t,e){case wt.game:if(this.tarTra=It.Instance.playerTra,!this.tarTra)return;let i=D.Instance.startPosTra;this._tran.position=i.position.clone(),this._tran.localRotationEuler=U.SpToCam(i.localRotationEuler.clone()),this.canmovegame=!0;break;case wt.jump:if(this.tarTra=ut.Instance.jumpCamTra,!this.tarTra)return;this.canmovegame=!1,Laya.timer.frameLoop(1,this,this.JumpCameraMove),Laya.timer.once(3e3,this,this.StopMove)}}StopMove(){Laya.timer.clear(this,this.JumpCameraMove)}MoveGame(e){this.canmovegame&&(this.temp.z=e-this.dis.z,this._tran.localPositionZ=this.temp.z)}JumpCameraMove(){let e,t;1==this.arg?(e=this.tarTra.position,t=U.SpToCam(this.tarTra.localRotationEuler.clone())):(e=U.MixVector3(this._tran.position.clone(),this.tarTra.position,this.arg,this.nowP),t=U.MixVector3(this._tran.localRotationEuler,U.SpToCam(this.tarTra.localRotationEuler.clone()),this.arg,this.nowR)),this._tran.position=e,this._tran.localRotationEuler=t}onDisable(){}onDestroy(){Laya.timer.clearAll(this)}ShakeFor(e,t){this.camPOS=this.selfObj.transform.position.clone(),this.seconds=e,this.started=!0,this.startShake=!0,this.quake=t}onLateUpdate(){this.startShake&&this.Quake(),this.started&&(this.started=!1,Laya.timer.once(1e3*this.seconds,this,()=>{this.startShake=!1,this.selfObj.transform.position=this.camPOS}))}Quake(){t.random_1to1(),this.quake,t.random_1to1(),this.quake,t.random_1to1(),this.quake;var e=new ft(this.camPOS.x+Math.random()*this.quake,this.camPOS.y+Math.random()*this.quake,this.camPOS.z+Math.random()*this.quake);this.selfObj.transform.position=e}}class Lt{static get Instance(){return Lt.instance||(Lt.instance=new Lt)}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._camera=this._mainscene.getChildByName("Main Camera"),this._camera.enableHDR=!1,this.bulletCon=t.getChildByName("bulletContainer"),this.effectCon=t.getChildByName("effectPos"),this.InitSceneArg();let i=t.getChildByName("buildings");z.Instance.Init(i);let s=t.getChildByName("playerstartPoint"),a=t.getChildByName("playerContainer");It.Instance.Init(s,a);let n=t.getChildByName("BlockContainer");$.Instance.Init(n);let o=t.getChildByName("towerContainer");H.Instance.Init(o);let l,h=t.getChildByName("startCamPos"),c=t.getChildByName("startXCamPos");l=r.isX?c:h,D.Instance.Init(this._camera,l);let d=t.getChildByName("finalPos");ut.Instance.Init(d),this.INITGAME()}INITGAME(){Laya.timer.frameOnce(10,this,()=>{It.Instance.CreatePlayer(),this.InItScene()})}InitSceneArg(){this._camera.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)}SkyRotate(){Laya.timer.frameLoop(2,this,this.St)}St(){this.mat&&(this.mat.rotation+=.1)}InItScene(){E.Instance.SetLevel(),ut.Instance.SetAir(),z.Instance.SetBuild(),D.Instance.SetCamState(wt.game,1),It.Instance.InitPlayerPos()}}class xt{constructor(){this.cloth=[]}static get Instance(){return this.instance||(this.instance=new xt)}LoadAsset(e){let t=[u.main_path,u.enemy_path,u.playerBullet_path,u.tower_path].concat(u.player_path).concat(u.barrier_paths).concat(u.effect_path).concat(u.enemytexture);_.LoadResource(t,()=>{this.InitAsset(),e&&e()})}InitAsset(){u.player_path.forEach(e=>{let t=Laya.loader.getRes(e);Laya.loader.clearRes(e),this.LoadPoolRes(t.name,t)}),u.enemytexture.forEach(e=>{let t=Laya.loader.getRes(e);Laya.loader.clearRes(e),this.cloth.push(t)}),u.effect_path.forEach(e=>{let t=Laya.loader.getRes(e);Laya.loader.clearRes(e),this.LoadPoolRes(t.name,t)});let e=Laya.loader.getRes(u.enemy_path);Laya.loader.clearRes(u.enemy_path),this.LoadPoolRes(e.name,e);let t=Laya.loader.getRes(u.playerBullet_path);Laya.loader.clearRes(u.playerBullet_path),this.LoadPoolRes(t.name,t);let i=Laya.loader.getRes(u.tower_path);Laya.loader.clearRes(u.tower_path),this.LoadPoolRes(i.name,i);let s=Laya.loader.getRes(u.main_path);Laya.loader.clearRes(u.main_path),u.barrier_paths.forEach(e=>{let t=Laya.loader.getRes(e);Laya.loader.clearRes(e),this.LoadPoolRes(t.name,t)}),Lt.Instance.Init(s)}LoadPoolRes(e,t){M.Instance.InitData(e,t)}}class vt{static Init(){tt.getInstance().initYouzi(this.appid,this.resVersion,this.miniGamePlatType)}static BIInit(){Laya.Browser.onWeiXin&&Laya.Browser.window.wx.leuok&&(console.log("执行init"),Laya.Browser.window.wx.leuok.init({gameId:1094,appId:"wxf83b7ecc423c7a97",multiRegion:!1,adlog:!0,bilog:!0,env:"prod",log:!1}))}static adlogin(){Laya.Browser.onWeiXin&&Laya.Browser.window.wx.leuok&&(console.log("执行login"),Laya.Browser.window.wx.leuok.adLogin())}}vt.appid="wxf83b7ecc423c7a97",vt.resVersion="1.00.00",vt.miniGamePlatType=1002;var Ct=Laya.Tween;class bt extends Y.LoadUiUI{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,bt.instance=this,h.on(Laya.Event.RESIZE,this,this.resizeHander)}static get Instance(){return bt.instance}resizeHander(){this.height=Laya.stage.height}OnShow(e){this.proTex.text="0%",this.pro1.width=0,this.InitUi(),this.LoginGame(),this.LoadSubpackage(),Laya.timer.frameOnce(5,this,()=>{this.resizeHander()}),Nt.AldEvent("进入加载加载界面!")}InitDate(){this.proLen=this.pro.width}InitHandler(){}InitUi(){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&&xt.Instance.LoadAsset(()=>{Nt.AldEvent("资源加载成功"),this.loadResCom=!0,this.AllCom()})}LoginGame(){r.isWx?Nt.Login(e=>{this.onWxLoginHandler(e)}):this.LocalLogin()}onWxLoginHandler(e){if(console.log("微信回调成功!"),console.log(e),"error"==e||null==e.code){if(0==this.errorTime&&Nt.AldEvent("微信登录失败"),this.errorTime++,this.errorTime>=3)return;Nt.Login(e=>{this.onWxLoginHandler(e)})}else{0==this.errorTime&&Nt.AldEvent("微信登录成功!");let i=Nt.SystemInfo(),s="ipx";if(null!=i){var t=i.model;s=`${i.brand}_${t}_${i.system}_wx${i.version}_SDKVer${i.SDKVersion}`,console.log("platformModel:"+s)}new b(e.code,e.nickName,e.avatarUrl,e.gender,e.country,e.province,e.city,s,Nt.ShareId,Nt.Chanel),this.LocalLogin()}}LocalLogin(){L.Instance.login(null,e=>{this.OnLoginComplete(e)},e=>{this.OnLoginError(e)})}OnLoginComplete(e){if("0"!=e.code){if(console.log("登录异常错误!"),Nt.AldEvent("本地登录成功!"),this.timers++,this.timers>=4)return;r.isWx?Nt.Login(e=>{this.onWxLoginHandler(e)}):this.LocalLogin()}else this.loginCom=!0,this.LoadRes(),this.AllCom()}OnLoginError(e){console.log("登录错误"),Nt.AldEvent("本地登陆失败")}LoadSubpackage(){Nt.LoadSubPackage("subpackage",e=>{e&&(console.log("subpackage com++++++++++++++++"),bt.instance.subLoadCom=!0,bt.instance.LoadRes())})}AllCom(){this.proCom&&this.loadResCom&&this.loginCom&&(se.InitVideo(),Laya.timer.once(1e3,this,()=>{Nt.AldEvent("进入主界面"),Ht.Instance.OpenView(Ut.MainUi),V.Instance.InitMouseEvent(),Ot.OnShowHandle(),a.Instance.Init(),Pt.Reg(),st.Instance.InitHandler(),vt.adlogin()}))}OnClose(){bt.instance=null,h.off(Laya.Event.RESIZE,this,this.resizeHander)}}class _t extends Y.MaskUiUI{constructor(){super(),this.resizeHander(),h.on(Laya.Event.RESIZE,this,this.resizeHander)}OnShow(e){this.InitHandler()}InitUi(){}InitDate(){}InitHandler(){this.on(Laya.Event.CLICK,this,this.Test)}Test(){}OnClose(){h.off(Laya.Event.RESIZE,this,this.resizeHander),this.off(Laya.Event.CLICK,this,this.Test)}resizeHander(){this.height=Laya.stage.height}}class kt extends Y.ResultUiUI{constructor(){super(),this.isWin=!1,kt.instance=this,this.resizeHander(),h.on(Laya.Event.RESIZE,this,this.resizeHander)}static get Instance(){return kt.instance}OnShow(e){this.isWin=e,this.InitDate(),this.InitHandler(),this.InitUi(),se.CheatBanner(this.winbtnBox),st.Instance.ShowDuoHuiTui_Result()}BannerMove(){}resizeHander(){this.height=Laya.stage.height}InitDate(){this.coinValue=1==this.isWin?E.Instance._level.gold:E.Instance._level.fail_gold,this.tes1=this.coinValue,this.coinValue+=m.tower_reward*at.Instance.towerCount+m.enemy_reward*at.Instance.roleCount+m.block_reward*at.Instance.blockCount;let e=1==this.isWin?1:0,t=this.coinValue,s=[{t:b.Instance.CurModel.ServerTime},{play_id:m.Instance.Play_Id},{win:e},{money:t}];L.Instance.HttpPostRequest(S.protocols.GameResult,s,e=>{},e=>{Ht.Instance.ShowTips("结算失败")}),this.isWin?(a.Instance.PlaySound(i.win),Nt.Success(m.Instance.stage.toString())):(a.Instance.PlaySound(i.defeat),Nt.Fail(m.Instance.stage.toString()))}InitHandler(){this.doublegetBtn.CZ=(()=>{this.DoubleGetHandler()}),this.nextBtn.CZ=(()=>{this.isWin?this.NextHandler():this.ResetHandler()})}InitUi(){this.winTop.visible=this.isWin,this.shibaiTop.visible=!this.isWin,this.valueText.text="+"+this.coinValue,this.doubleText.text=(3*this.coinValue).toString(),this.towerCount.text="X"+at.Instance.towerCount.toString(),this.towerValue.text=(m.tower_reward*at.Instance.towerCount).toString(),this.roleCount.text="X"+at.Instance.roleCount.toString(),this.roleValue.text=(m.enemy_reward*at.Instance.roleCount).toString(),this.blockCount.text="X"+at.Instance.blockCount.toString(),this.blockValue.text=(m.block_reward*at.Instance.blockCount).toString()}DoubleGetHandler(){se.ShowVideo(e=>{if(e){Nt.AldEvent("结束界面看视屏获得钱");var t=[{t:b.Instance.CurModel.ServerTime.toString()},{reward_item:"1000"},{reward_num:(2*this.coinValue).toString()}];L.Instance.HttpPostRequest(S.protocols.Fissionvd,t,e=>{Ht.Instance.ShowTips("金币:X"+3*this.coinValue),this.NextHandler()},e=>{})}})}NextHandler(){at.Instance.NextLevel()}ResetHandler(){Ht.Instance.CloseView(Ut.ResultUi),Ht.Instance.AddView(Ut.DefeatGradeUi)}OnClose(){h.off(Laya.Event.RESIZE,this,this.resizeHander),kt.instance=null,Laya.timer.clearAll(this),st.Instance.ClearDuoHuiTui_Result(),se.Clear()}}class Bt extends Y.GameUiUI{static get Instance(){return Bt.instance}constructor(){super(),Bt.instance=this,this.resizeHander(),h.on(Laya.Event.RESIZE,this,this.resizeHander)}OnShow(e){this.InitDate(),this.InitHandler(),this.InitUi()}resizeHander(){this.height=Laya.stage.height}InitDate(){}InitHandler(){}InitUi(){}OnClose(){h.off(Laya.Event.RESIZE,this,this.resizeHander),Bt.instance=null,Laya.timer.clearAll(this)}}class Tt extends Y.GradeUiUI{constructor(){super(),this.iscoinShowfreecoinbtn=!1,this.resizeHander(),h.on(Laya.Event.RESIZE,this,this.resizeHander)}OnShow(e){this.InitDate(),this.InitHandler(),this.InitUi(),se.CheatBanner(null)}InitUi(){this.SetUi(),this.RefreshCoinShow();let e=this.cost1<this.cost2?this.cost1:this.cost2;this.freecoinValue=Math.floor(1.2*e),this.coinValue.text=this.freecoinValue.toString()}SetUi(){this.atkLv.text="LV"+this.tempPowerLevel;let e=d.Instance._atk.length,t=this.tempPowerLevel>e?e:this.tempPowerLevel;this.cost1=d.Instance.GetAtk(t).cost,this.atkValue.text=this.cost1.toString(),this.rateLv.text="LV"+this.tempRateLevel;let i=d.Instance._rate.length,s=this.tempRateLevel>i?i:this.tempRateLevel;this.cost2=d.Instance.GetRate(s).cost,this.rateValue.text=this.cost2.toString(),b.Instance.CurModel.GetUserAttr(v.money)<this.cost1?(this.atkBtn.gray=!0,this.atkBtn.mouseEnabled=!1):(this.atkBtn.gray=!1,this.atkBtn.mouseEnabled=!0),b.Instance.CurModel.GetUserAttr(v.money)<this.cost2?(this.rateBtn.gray=!0,this.rateBtn.mouseEnabled=!1):(this.rateBtn.gray=!1,this.rateBtn.mouseEnabled=!0)}InitDate(){this.tempPowerLevel=m.Instance.powerLevel,this.tempRateLevel=m.Instance.rateLevel,this.RefreshData()}RefreshData(){let e=b.Instance.CurModel.user_video.detail;if(e){let t=e.freecoin;if(!t)return void(this.iscoinShowfreecoinbtn=!0);if(t<p.freeGetcoinTime)return void(this.iscoinShowfreecoinbtn=!0);this.iscoinShowfreecoinbtn=!1}else this.iscoinShowfreecoinbtn=!0}RefreshCoinShow(){this.iscoinShowfreecoinbtn?(this.coinBtn.gray=!1,this.coinBtn.mouseEnabled=!0):(this.coinBtn.gray=!0,this.coinBtn.mouseEnabled=!1)}InitHandler(){this.backBtn.CZ=(()=>{Ht.Instance.CloseView(Ut.GradeUi)}),this.atkBtn.clickHandler=new Laya.Handler(this,this.AtkBtnHandler),this.rateBtn.clickHandler=new Laya.Handler(this,this.RateBtnHandler),this.coinBtn.clickHandler=new Laya.Handler(this,this.CoinBtnHandler)}AtkBtnHandler(){b.Instance.CurModel.GetUserAttr(v.money)<this.cost1?Ht.Instance.ShowTips("金币不足!",1):m.Instance.GradePower(this.tempPowerLevel+1,"money",this.cost1,e=>{e&&(Nt.AldEvent("升级界面花钱升级攻击力"),this.tempPowerLevel++,this.SetUi(),h.event(c.Event.SetMonery,b.Instance.CurModel.GetUserAttr(v.money)))})}RateBtnHandler(){b.Instance.CurModel.GetUserAttr(v.money)<this.cost2?Ht.Instance.ShowTips("金币不足!",1):m.Instance.GradeRate(this.tempRateLevel+1,"money",this.cost2,e=>{e&&(Nt.AldEvent("升级界面花钱升级速度"),this.tempRateLevel++,this.SetUi(),h.event(c.Event.SetMonery,b.Instance.CurModel.GetUserAttr(v.money)))})}CoinBtnHandler(){se.ShowVideo(e=>{if(e){var t=[{t:b.Instance.CurModel.ServerTime.toString()},{reward_item:"1000"},{reward_num:this.freecoinValue.toString()},{channel:"video:freecoin"}];L.Instance.HttpPostRequest(S.protocols.Fissionvd,t,e=>{Nt.AldEvent("升级界面看视屏获得钱"),h.event(c.Event.SetMonery,b.Instance.CurModel.GetUserAttr(v.money)),this.RefreshData(),this.RefreshCoinShow()},e=>{})}})}OnClose(){h.off(Laya.Event.RESIZE,this,this.resizeHander),this.tempPowerLevel==m.Instance.powerLevel&&this.tempRateLevel==m.Instance.rateLevel||m.Instance.SetArr(),st.Instance.ShowDuoHuiTui_main(),st.Instance.ShowBannerHuiTui_main(),se.Clear(),st.Instance.CreateMoreGame()}resizeHander(){this.height=Laya.stage.height}}class Mt extends Y.DefeatGradeUiUI{constructor(){super(),this.iscanShowVideoBtn=!0,this.isatkvideo=!1,this.isfirstatkvideo=!0,this.isfirstratevideo=!0,this.isratevideo=!1,this.atkShow=!1,this.resizeHander(),h.on(Laya.Event.RESIZE,this,this.resizeHander)}OnShow(e){this.InitDate(),this.InitHandler(),this.InitUi(),se.CheatBanner(null)}InitUi(){this.SetUi()}SetUi(){this.atkLv.text="LV"+this.tempPowerLevel;let e=d.Instance._atk.length,t=this.tempPowerLevel>e?e:this.tempPowerLevel;this.cost1=d.Instance.GetAtk(t).cost,this.atkValue.text=this.cost1.toString(),this.rateLv.text="LV"+this.tempRateLevel;let i=d.Instance._rate.length,s=this.tempRateLevel>i?i:this.tempRateLevel;this.cost2=d.Instance.GetRate(s).cost,this.rateValue.text=this.cost2.toString(),b.Instance.CurModel.GetUserAttr(v.money)<this.cost1?this.iscanShowVideoBtn&&this.isfirstatkvideo?(this.isatkvideo=!0,this._atk.visible=!1,this._atkVideo.visible=!0,this.atkBtn.mouseEnabled=!0,this.atkBtn.gray=!1,this.click1.visible=!0,this.atkShow=!0):(this.atkBtn.mouseEnabled=!1,this.atkBtn.gray=!0,this.isatkvideo=!1,this.click1.visible=!1,this.atkShow=!1):(this._atk.visible=!0,this._atkVideo.visible=!1,this.atkBtn.gray=!1,this.atkBtn.mouseEnabled=!0,this.isatkvideo=!1,this.click1.visible=!0,this.atkShow=!0),b.Instance.CurModel.GetUserAttr(v.money)<this.cost2?this.iscanShowVideoBtn&&this.isfirstratevideo?(this.isratevideo=!0,this._rate.visible=!1,this._rateVideo.visible=!0,this.rateBtn.mouseEnabled=!0,this.rateBtn.gray=!1,this.atkShow?this.click2.visible=!1:this.click2.visible=!0):(this.rateBtn.mouseEnabled=!1,this.rateBtn.gray=!0,this.isratevideo=!1,this.click2.visible=!1):(this._rate.visible=!0,this._rateVideo.visible=!1,this.rateBtn.gray=!1,this.rateBtn.mouseEnabled=!0,this.isratevideo=!1,this.atkShow?this.click2.visible=!1:this.click2.visible=!0)}InitDate(){this.tempPowerLevel=m.Instance.powerLevel,this.tempRateLevel=m.Instance.rateLevel;let e=b.Instance.CurModel.user_video.detail;if(e){let t=e.free;if(!t)return void(this.iscanShowVideoBtn=!0);if(t<p.freeUpdateVideotime)return void(this.iscanShowVideoBtn=!0);this.iscanShowVideoBtn=!1}else this.iscanShowVideoBtn=!0}InitHandler(){this.backBtn.CZ=(()=>{this.BackClickHandler()}),this.atkBtn.clickHandler=new Laya.Handler(this,this.AtkBtnHandler),this.rateBtn.clickHandler=new Laya.Handler(this,this.RateBtnHandler)}AtkBtnHandler(){this.isatkvideo?se.ShowVideo(e=>{e&&m.Instance.GradePower(this.tempPowerLevel+1,"video:free",this.cost1,e=>{e&&(Nt.AldEvent("失败界面看视屏升级攻击力"),this.tempPowerLevel++,this.isfirstatkvideo=!1,this.SetUi(),h.event(c.Event.SetMonery,b.Instance.CurModel.GetUserAttr(v.money)))})}):m.Instance.GradePower(this.tempPowerLevel+1,"money",this.cost1,e=>{e&&(Nt.AldEvent("失败界面花钱升级攻击力"),this.tempPowerLevel++,this.SetUi(),h.event(c.Event.SetMonery,b.Instance.CurModel.GetUserAttr(v.money)))})}RateBtnHandler(){this.isratevideo?se.ShowVideo(e=>{e&&m.Instance.GradeRate(this.tempRateLevel+1,"video:free",this.cost2,e=>{e&&(Nt.AldEvent("失败界面看视屏升级速度"),this.tempRateLevel++,this.isfirstratevideo=!1,this.SetUi())})}):m.Instance.GradeRate(this.tempRateLevel+1,"money",this.cost2,e=>{e&&(Nt.AldEvent("失败界面花钱升级速度"),this.tempRateLevel++,this.SetUi())})}BackClickHandler(){Ht.Instance.CloseView(Ut.DefeatGradeUi),at.Instance.ReStart()}OnClose(){h.off(Laya.Event.RESIZE,this,this.resizeHander),this.tempPowerLevel==m.Instance.powerLevel&&this.tempRateLevel==m.Instance.rateLevel||(m.Instance.SetArr(),h.event(c.Event.SetMonery,b.Instance.CurModel.GetUserAttr(v.money))),se.Clear()}resizeHander(){this.height=Laya.stage.height}}var Ut,Rt,At=Laya.Vector3;class Dt{static get Instance(){return Dt.instance||(Dt.instance=new Dt)}InitDis(e){if(!this._scene){this._scene=new Laya.Scene3D,this._camera=new Laya.Camera,this._camera.enableHDR=!1,this._scene.addChild(this._camera),this._light=new Laya.DirectionLight,this._light.transform.rotation=new Laya.Quaternion(-.24776,0,0,.9688215),this._light.intensity=.45,this._light.color=new At(1,1,1),this._scene.addChild(this._light);let t=1;this._camera.viewport=new Laya.Viewport(e.x*t,e.y*t,e.width*t,e.height*t),this._camera.orthographic=!1,this._camera.enableHDR=!1,this._camera.clearFlag=2,this._camera.fieldOfView=60,this._camera.transform.position=new At(0,1.52,3.12),this._camera.transform.rotation=new Laya.Quaternion(0,0,0,1)}this._camera.viewport=new Laya.Viewport(1*e.x,1*e.y,1*e.width,1*e.height),e.addChild(this._scene),this.CreatePlayer()}CreatePlayer(e){if(e||(e=m.Instance.equipId),this.player){M.Instance.SetDisableObject(this.player);let t=M.Instance.SetActiveObject(M.pooltype.player+e);t&&(this.player=t),this._scene.addChild(this.player),this.player.transform.localPosition=U.VecZero,this.player.transform.localRotationEuler=U.VecZero}else{let t=M.Instance.SetActiveObject(M.pooltype.player+e);t&&(this.player=t),this._scene.addChild(this.player),this.player.transform.localPosition=U.VecZero,this.player.transform.localRotationEuler=U.VecZero}let t=this.player.getChildAt(0).getComponent(Laya.Animator);t.play(A.animator.Dance),t.speed=1}Reset(){this._scene&&this._scene.removeSelf(),this.player&&(M.Instance.SetDisableObject(this.player),this.player=null)}}class zt extends Y.SkinUiUI{static get Instance(){return zt.instance}constructor(){super(),zt.instance=this,this.resizeHander(),h.on(Laya.Event.RESIZE,this,this.resizeHander)}resizeHander(){this.height=Laya.stage.height}OnShow(e){this.InitDate(),this.InitHandler(),this.InitUi(),Nt.AldEvent("打开皮肤界面")}InitDate(){this.oignPlayerid=m.Instance.equipId,this.operateIndex=this.oignPlayerid}InitUi(e){this.SetShowbtn(this.operateIndex),this.SetUseBtn(this.operateIndex),Dt.Instance.InitDis(this.viewPort)}InitHandler(){this.backBtn.CZ=(()=>{this.BackHandler()}),this.leftBtn.clickHandler=Laya.Handler.create(this,()=>{1!=this.operateIndex&&(this.operateIndex--,this.SetShowbtn(this.operateIndex),this.SetUseBtn(this.operateIndex),Dt.Instance.CreatePlayer(this.operateIndex))},null,!1),this.rightBtn.clickHandler=Laya.Handler.create(this,()=>{7!=this.operateIndex&&(this.operateIndex++,this.SetShowbtn(this.operateIndex),this.SetUseBtn(this.operateIndex),Dt.Instance.CreatePlayer(this.operateIndex))},null,!1),this.use.CZ=(()=>{this.NetEquip()}),this.coin.CZ=(()=>{b.Instance.CurModel.GetUserAttr(v.money)<this.coinValue?Ht.Instance.ShowTips("金币不足!",2):this.NetBuy()}),this.video.CZ=(()=>{this.VideoBtnHandler()})}SetShowbtn(e){return 1==e?(this.leftBtn.getChildByName("leftFalse").visible=!0,this.leftBtn.getChildByName("leftTrue").visible=!1,this.rightBtn.getChildByName("rightFalse").visible=!1,void(this.rightBtn.getChildByName("rightTrue").visible=!0)):7==e?(this.leftBtn.getChildByName("leftFalse").visible=!1,this.leftBtn.getChildByName("leftTrue").visible=!0,this.rightBtn.getChildByName("rightFalse").visible=!0,void(this.rightBtn.getChildByName("rightTrue").visible=!1)):(this.leftBtn.getChildByName("leftFalse").visible=!1,this.leftBtn.getChildByName("leftTrue").visible=!0,this.rightBtn.getChildByName("rightFalse").visible=!1,void(this.rightBtn.getChildByName("rightTrue").visible=!0))}SetUseBtn(e){if(m.Instance.equipId==e)return this.using.visible=!0,this.use.visible=!1,this.coin.visible=!1,void(this.video.visible=!1);if(b.Instance.CurModel.HasTheme(e))return this.using.visible=!1,this.use.visible=!0,this.coin.visible=!1,void(this.video.visible=!1);let t=d.Instance.GetTheme(e);return 2==t.require_type?(this.using.visible=!1,this.use.visible=!1,this.coin.visible=!0,this.video.visible=!1,this.coinValue=Number(t.require_num),void(this.coin.getChildAt(0).getChildAt(0).text=this.coinValue.toString())):3==t.require_type?(this.using.visible=!1,this.use.visible=!1,this.coin.visible=!1,this.video.visible=!0,void(this.video.getChildAt(0).getChildAt(0).text=b.Instance.CurModel.GetThemeProgress(t.id)+"/"+t.require_num)):void 0}VideoBtnHandler(){se.ShowVideo(e=>{e&&(Nt.AldEvent("商店中看视屏获得皮肤"),this.NetVideo())})}NetVideo(){var e=[{t:b.Instance.CurModel.ServerTime.toString()},{id:this.operateIndex},{channel:"video"}];L.Instance.HttpPostRequest(S.protocols.themefission,e,e=>{var t=b.Instance.CurModel;m.Instance.equipId=Number(t.GetUserAttr(v.equip_themes)[1]),this.SetUseBtn(this.operateIndex)},e=>{})}NetBuy(){var e=[{id:this.operateIndex}];L.Instance.HttpPostRequest(S.protocols.Buy,e,e=>{var t=b.Instance.CurModel;m.Instance.equipId=Number(t.GetUserAttr(v.equip_themes)[1]),h.event(c.Event.SetMonery,b.Instance.CurModel.GetUserAttr(v.money)),this.SetUseBtn(this.operateIndex)},e=>{})}NetEquip(){var e=[{id:this.operateIndex}];L.Instance.HttpPostRequest(S.protocols.Equip,e,e=>{var t=b.Instance.CurModel;m.Instance.equipId=Number(t.GetUserAttr(v.equip_themes)[1]),this.SetUseBtn(this.operateIndex)},e=>{})}BackHandler(){Dt.Instance.Reset(),this.oignPlayerid!=m.Instance.equipId&&It.Instance.ChangePlayer(),Ht.Instance.CloseView(Ut.SkinUi)}OnClose(){h.off(Laya.Event.RESIZE,this,this.resizeHander),zt.instance=null,Nt.AldEvent("关闭皮肤界面"),st.Instance.ShowDuoHuiTui_main(),st.Instance.ShowBannerHuiTui_main()}}class Gt extends Y.TryOutUiUI{constructor(){super(),this.resizeHander(),h.on(Laya.Event.RESIZE,this,this.resizeHander)}OnShow(e){this.InitHandler(),this.InitDate(),this.InitHandler(),this.InitUi(),se.CheatBanner(this.btnBox)}InitUi(){Dt.Instance.InitDis(this.viewPort)}InitDate(){}InitHandler(){this.videoBtn.CZ=(()=>{this.VideoHandler()}),this.backBtn.CZ=(()=>{Dt.Instance.Reset(),this.BackUi()})}VideoHandler(){se.ShowVideo(e=>{e&&(Nt.AldEvent("看视屏试用"),this.VideoCom())})}VideoCom(){Dt.Instance.Reset(),this.BackUi(),dt.Instance.CreateTryOut()}BackUi(){Ht.Instance.CloseView(Ut.TryOutUi),it.Instance&&it.Instance.TryClick()}OnClose(){h.off(Laya.Event.RESIZE,this,this.resizeHander),se.Clear()}resizeHander(){this.height=Laya.stage.height}}class Et extends Y.TryOutUiUI{constructor(){super(),this.resizeHander(),h.on(Laya.Event.RESIZE,this,this.resizeHander)}OnShow(e){}OnClose(){}resizeHander(){this.height=Laya.stage.height}}!function(e){e[e.GameUi=0]="GameUi",e[e.MaskUi=1]="MaskUi",e[e.ResultUi=2]="ResultUi",e[e.Loadui=3]="Loadui",e[e.MainUi=4]="MainUi",e[e.EasterUi=5]="EasterUi",e[e.SettingUi=6]="SettingUi",e[e.SkinUi=7]="SkinUi",e[e.TryOutUi=8]="TryOutUi",e[e.RewardBoxUi=9]="RewardBoxUi",e[e.FreeGetPifuUi=10]="FreeGetPifuUi",e[e.GradeUi=11]="GradeUi",e[e.DefeatGradeUi=12]="DefeatGradeUi",e[e.FullScreenExport=13]="FullScreenExport",e[e.HotExport=14]="HotExport",e[e.LikeWxExport=15]="LikeWxExport",e[e.MergeExport=16]="MergeExport"}(Ut||(Ut={}));class Ht{constructor(){this.viewDic=[],this.addViewDic=new l,this._maskCnt=0,this.init()}static get Instance(){return this.instance||(this.instance=new Ht)}init(){this._maskCnt=0,this.viewDic[Ut.GameUi]=Bt,this.viewDic[Ut.Loadui]=bt,this.viewDic[Ut.MainUi]=it,this.viewDic[Ut.MaskUi]=_t,this.viewDic[Ut.GradeUi]=Tt,this.viewDic[Ut.ResultUi]=kt,this.viewDic[Ut.SkinUi]=zt,this.viewDic[Ut.TryOutUi]=Gt,this.viewDic[Ut.DefeatGradeUi]=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),V.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),V.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[Ut.MaskUi],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=M.Instance.SetActiveForUi(k.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 s=Laya.Tween.to(i,{y:t},1e3,Laya.Ease.bounceOut,new Laya.Handler(this,()=>{s.clear(),M.Instance.SetDisableForUi(k.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);s=Laya.Tween.to(i,{alpha:0},1e3,Laya.Ease.bounceOut,new Laya.Handler(this,()=>{s.clear(),M.Instance.SetDisableForUi(k.WarnTips,i),i.alpha=1}))}}ShowTopTip(){this.toptips||(this.toptips=new Et,this.popNode.addChild(this.toptips)),this.toptips.OnShow()}CloseTopTip(){this.toptips&&this.toptips.OnClose()}ShowGuideUi(){this.guideui||(this.guideui=new j,this.popNode.addChild(this.guideui)),this.guideui.OnShow()}CloseGuideUi(){this.guideui&&(this.guideui.OnClose(),this.guideui.removeSelf(),this.guideui.destroy())}}class Ot{static GoShare(e){Ot.ShareTime=(new Date).getTime(),console.log("分享点击时间="+Ot.ShareTime),Ot.IsSharing=!0,Ot.callback=e}static OnShowHandle(){Laya.Browser.window.wx&&Laya.Browser.window.wx.onShow(function(e){if(a.Instance.SetSoundV(1),console.log("onshow share start"),console.log("进入微信"),Ot.IsSharing){Ot.IsSharing=!1;let e=(new Date).getTime();console.log("分享回到游戏时间"+e);let t=(e-Ot.ShareTime)/1e3;if(console.log("分享停留时间为:"+t),t>=2)if(Math.random()<=1){if(!Ot.callback)return;Ot.callback(!0,1)}else{if(!Ot.callback)return;Math.random()<=.5?Ht.Instance.ShowTips("分享失败!"):Ht.Instance.ShowTips("请分享到不同的群!"),Ot.callback(!1,1)}else{if(!Ot.callback)return;Math.random()<=.5?Ht.Instance.ShowTips("分享失败!"):Ht.Instance.ShowTips("请分享到不同的群!"),Ot.callback(!1,1)}}})}}Ot.IsSharing=!1;class Pt{static Reg(){}}!function(e){e[e["登录加载"]=0]="登录加载",e[e["界面开启"]=1]="界面开启"}(Rt||(Rt={}));class Nt{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||"",r.wxValue=e.scene;var i=Laya.LocalStorage.getItem("scene");i?(r.wxValue=i,console.log("读取配置场景值:"+i)):(console.log("第一次拉取场景值:"+r.wxValue),Laya.LocalStorage.setItem("scene",r.wxValue));var s=e.query.channel;this._chanel=s||"",Laya.Browser.window.wx.offShow(Nt.InitWx)}static ShareMessage(){if(r.isWx){var e,i,s=b.Instance.CurModel.ServerTime;if(e=p.sharetitle,i=p.shareimage,null==e)e="枪王之王...",i="res/share.png";else{let s=t.SpliteString(e),a=t.SpliteString(i);e=s[t.randomInt(0,s.length-1)],i=a[t.randomInt(0,a.length-1)]}console.log("_title:",e),console.log("_url:",i),Laya.Browser.window.wx.onShareAppMessage(()=>({title:e,imageUrl:i,query:"share_id="+b.Instance.CurModel.m_userid+"_other_"+s+"_"+Math.floor(9999*Math.random()).toString()}))}}static Login(e){Nt.Lodining||(Nt.Lodining=!0,Laya.Browser.window.wx.login({success:function(t){console.log("wx.login: success! res.code="+t.code),t.code?(Nt.Lodining=!1,console.log("将要传递的参数:"+t),e(t)):(console.log("获取用户登录态失败!"+t.errMsg),e("error"))},fail:function(t){console.log("wx.login: failed, res="+t),Nt.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}),Ht.Instance.OpenMask()):Ht.Instance.OpenMask()}static HideLoading(e=!0){Laya.Browser.window&&Laya.Browser.window.wx?(e&&Laya.Browser.window.wx.hideLoading(),Ht.Instance.CloseMask()):Ht.Instance.CloseMask()}static SystemInfo(){if(Laya.Browser.window.wx)return Nt.sysdata||(Nt.sysdata=Laya.Browser.window.wx.getSystemInfoSync()),Nt.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&&a.Instance.vibrate){if(Nt.vibrating)return;Nt.vibrating=!0,Laya.Browser.window.wx.vibrateShort({complete:function(e){Nt.vibrating=!1}})}}static LongVibrate(){if(Laya.Browser.window.wx&&a.Instance.vibrate){if(Nt.vibrating)return;Nt.vibrating=!0,Laya.Browser.window.wx.vibrateLong({complete:function(e){Nt.vibrating=!1}})}}static Success(e){r.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()<i.valueOf()?this.IsNew=0:this.IsNew=1}else this.IsNew=1,Laya.LocalStorage.setItem("uuidTimes",Laya.timer.currTimer.toString())}static Fail(e){r.isWx&&Laya.Browser.window.wx.aldStage.onEnd({stageId:e,stageName:"第"+e+"关",event:"fail",params:{desc:"关卡失败"}})}static Start(e){r.isWx&&Laya.Browser.window.wx.aldStage.onStart({stageId:e,stageName:"第"+e+"关"})}static Game_Share(e=null,i=""){if(r.isWx){var s,a;if(s=p.sharetitle,a=p.shareimage,null==s)s="枪王之王...",a="res/share.png";else{let e=t.SpliteString(s),i=t.SpliteString(a);s=e[t.randomInt(0,e.length-1)],a=i[t.randomInt(0,i.length-1)]}console.log("_title:",s),console.log("_url:",a);var n=b.Instance.CurModel.ServerTime;Laya.Browser.window.wx.shareAppMessage({title:s,imageUrl:a,query:"share_id="+b.Instance.CurModel.m_userid+"_other_"+n+"_"+Math.floor(9999*Math.random()).toString()}),Ot.GoShare(e)}}static LoadSubPackage(e,t){if(r.isWx){Laya.Browser.window.wx.loadSubpackage({name:e,success(e){console.log("分包下载成功:",e),t&&t(!0)},fail(e){console.log("分包下载失败:"+JSON.stringify(e)),t&&t(!1)}})}else t&&t(!0)}static IsNeedUpdate(){if(!r.isWx)return!1;const e=Laya.Browser.window.wx.getUpdateManager();e.onCheckForUpdate(function(e){console.log("最新版本:"+e.hasUpdate)}),e.onUpdateReady(function(){Laya.Browser.window.wx.showModal({showCancel:!1,title:"更新提示",content:"新版本已经准备好,是否重启应用?",success(t){e.applyUpdate()},fail(t){e.applyUpdate()}})})}static IsAuth(){Laya.Browser.window&&Laya.Browser.window.wx&&Laya.Browser.window.wx.getSetting({success:e=>{console.log("授权结果.."),console.log(e),1==e.authSetting["scope.userInfo"]&&(Nt.isAuth=!0,Laya.Browser.window.wx.getUserInfo({lang:"zh_CN",success:e=>{b.Instance.CurModel.m_nickname=e.userInfo.nickName,b.Instance.CurModel.m_avatar=e.userInfo.avatarUrl,console.log("已经受过权")},fail:()=>{console.log("调用getUserInfo fail")}}))}})}static RequestAuth(e){if(Nt.isAuth)null!=e&&e(!0);else if(r.isWx){console.log("-----授权"),(()=>{let t=Laya.stage.width,i=Laya.stage.height;console.log("准备授权");let s=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}}),a=t=>{if(console.log("res:"+JSON.stringify(t)),t.userInfo){s.hide(),s.offTap(a),s.destroy(),console.log("userinfo",t),b.Instance.CurModel.m_nickname=t.userInfo.nickName,b.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}];L.Instance.HttpPostRequest(S.protocols.Userauth,i,()=>{Nt.isAuth=!0,null!=e&&e(!0)},null)}else s.hide(),s.offTap(a),s.destroy(),null!=e&&e(!1)};s.show(),s.onTap(a)})()}else Nt.isAuth=!0,null!=e&&e(!0)}static showbjWxGameQuan(e){if(r.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,s=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:s,height:i}})}this.button.show()}else this.button&&this.button.hide()}}Nt.Lodining=!1,Nt.shareId="",Nt._chanel="",Nt.isAuth=!1,Nt.vibrating=!1,Nt.IsNew=0;new class{constructor(){window.Config3D&&(window.Config3D._config._defaultPhysicsMemory=128),window.Config3D&&(window.Config3D._config.isAntialias=!0),window.Laya3D?Laya3D.init(o.width,o.height):Laya.init(o.width,o.height,Laya.WebGL),Laya.Physics&&Laya.Physics.enable(),Laya.DebugPanel&&Laya.DebugPanel.enable(),Laya.stage.scaleMode=o.scaleMode,Laya.stage.screenMode=o.screenMode,Laya.stage.alignV=o.alignV,Laya.stage.alignH=o.alignH,Laya.URL.exportSceneToJson=o.exportSceneToJson,(o.debug||"true"==Laya.Utils.getQueryString("debug"))&&Laya.enableDebugPanel(),o.physicsDebug&&Laya.PhysicsDebugDraw&&Laya.PhysicsDebugDraw.enable(),o.stat&&Laya.Stat.show(),Laya.alertGlobalError=!0,r.isWx=Laya.Browser.onWeiXin,r.isWx&&(Nt.init(),vt.BIInit()),Laya.ResourceVersion.enable("version.json",Laya.Handler.create(this,this.onVersionLoaded),Laya.ResourceVersion.FILENAME_VERSION),Nt.IsNeedUpdate()}onVersionLoaded(){Laya.AtlasInfoManager.enable("fileconfig.json",Laya.Handler.create(this,this.onConfigLoaded)),Laya.MouseManager.multiTouchEnabled=!1}onConfigLoaded(){Ht.Instance.OpenView(Ut.Loadui),r.isX=Laya.Browser.clientHeight/Laya.Browser.clientWidth>2,vt.Init()}}}();