bundle.js 285 KB

1
  1. !function(){"use strict";var e,t,n,i,a,s,o,r,c,h,l,d,p,g;!function(e){e[e.Idle=0]="Idle",e[e.Walk=1]="Walk",e[e.Run=2]="Run",e[e.Shoot1=3]="Shoot1",e[e.Shoot2=4]="Shoot2",e[e.Seize1=5]="Seize1",e[e.Seize2=6]="Seize2",e[e.Seize3=7]="Seize3",e[e.Death=8]="Death"}(e||(e={})),function(e){e[e.Idle=0]="Idle",e[e.Death=1]="Death"}(t||(t={})),function(e){e[e.Idle1=0]="Idle1",e[e.Idle2=1]="Idle2",e[e.Reload=2]="Reload",e[e.Aim=3]="Aim"}(n||(n={})),function(e){e[e.Idle=0]="Idle",e[e.Fire=1]="Fire"}(i||(i={})),function(e){e[e.stand=0]="stand",e[e.move=1]="move",e[e.shootplayer=2]="shootplayer",e[e.shootnpc=3]="shootnpc",e[e.anim=4]="anim",e[e.continue=5]="continue"}(a||(a={})),function(e){e[e.pistol=0]="pistol",e[e.rifle=1]="rifle"}(s||(s={})),function(e){e[e.drop=0]="drop",e[e.explode=1]="explode"}(o||(o={})),function(e){e[e.protect=0]="protect",e[e.normal=1]="normal",e[e.target=2]="target"}(r||(r={})),c||(c={}),function(e){e[e.tililimit=0]="tililimit",e[e.tilirec=1]="tilirec",e[e.energy_init=2]="energy_init",e[e.player_hp=3]="player_hp",e[e.min_wpn_atk=4]="min_wpn_atk",e[e.max_wpn_atk=5]="max_wpn_atk",e[e.min_wpn_ammo=6]="min_wpn_ammo",e[e.max_wpn_ammo=7]="max_wpn_ammo",e[e.max_wpn_reload_speed=8]="max_wpn_reload_speed",e[e.lottery_cost_diamond=9]="lottery_cost_diamond",e[e.min_wpn_reload_speed=10]="min_wpn_reload_speed",e[e._offlineTimeUpLimit=11]="_offlineTimeUpLimit",e[e._offlineTimeDownLimit=12]="_offlineTimeDownLimit",e[e._offlineRevenueKey=13]="_offlineRevenueKey",e[e.buff_time=14]="buff_time"}(h||(h={})),function(e){e[e.button=0]="button",e[e.dial=1]="dial",e[e.diamond=2]="diamond",e[e.explode=3]="explode",e[e.fire=4]="fire",e[e.openview=5]="openview",e[e.reload=6]="reload",e[e.reward=7]="reward",e[e.hurt=8]="hurt",e[e.hit=9]="hit",e[e.upgrade=10]="upgrade",e[e.bgm1=11]="bgm1"}(l||(l={})),function(e){e[e.TargetEscape=0]="TargetEscape",e[e.ProtectDead=1]="ProtectDead",e[e.PlayerDead=2]="PlayerDead",e[e.Timeout=3]="Timeout"}(d||(d={})),function(e){e[e.money=0]="money",e[e.diamond=1]="diamond",e[e.energy=2]="energy",e[e.income_multiple=3]="income_multiple",e[e.income_speedup=4]="income_speedup",e[e.income_instant=5]="income_instant",e[e.gun=6]="gun"}(p||(p={})),function(e){e[e.Main=0]="Main",e[e.BuyGun=1]="BuyGun",e[e.Float=2]="Float"}(g||(g={}));const u="Setting_Sound",y="Setting_Vibration",m="1",_="0",I="res/u3d/sound/",w=".wav",f=".mp3";class x{static get Instance(){return null==this._Instance&&(this._Instance=new x),this._Instance}get isSoundOn(){let e=Laya.LocalStorage.getItem(u);return null==e||""==e||e===m}set isSoundOn(e){Laya.LocalStorage.setItem(u,e?m:_)}get isVibrationOn(){let e=Laya.LocalStorage.getItem(y);return null==e||""==e||e===m}set isVibrationOn(e){Laya.LocalStorage.setItem(y,e?m:_)}playSound(e){if(!this.isSoundOn)return;let t=I+l[e]+w;Laya.SoundManager.playSound(t,1)}playMusic(e){if(!this.isSoundOn)return;let t=I+l[e]+f;Laya.SoundManager.playMusic(t,0)}stopMusic(){Laya.SoundManager.stopMusic()}}class v extends Laya.Script{constructor(){super()}onAwake(){this._gameObject=this.owner,this._gameObject.on(Laya.Event.CLICK,this,this._click)}onDestroy(){this._gameObject.off(Laya.Event.CLICK,this,this._click)}_click(){x.Instance.playSound(l.button)}}class k{}k.Ver="1.0.0";class M{static initAd(){Laya.Browser.window.conch&&(M.Conch=Laya.Browser.window.conch,M.PlatformClass=Laya.Browser.window.PlatformClass,M.IsAndroid="Conch-android"==M.Conch.config.getOS(),M.IsAndroid&&(M.JavaClassAdHelper=M.PlatformClass.createClass("ad.AdHelper"),M.JavaClassEventHelper=M.PlatformClass.createClass("af.EventHelper"),M.JavaClassAdHelper.callWithBack(()=>{M.IsReady=!0,console.log("[LOG]Java_initAd ok")},"initAd")))}static showVideoAd(e){M.IsAndroid?M.JavaClassAdHelper.callWithBack(t=>{console.log("[LOG]Java_shwoVideoAd callback enter"),e&&e(t)},"showVideoAd"):e&&e(!0)}static showBanner(){M.IsAndroid&&(M.IsBannerVisible=!0,M.JavaClassAdHelper.callWithBack(()=>{M.IsBannerVisible||M.hideBanner()},"showBanner"))}static hideBanner(){M.IsAndroid&&(M.IsBannerVisible=!1,M.JavaClassAdHelper.call("hideBanner"))}static event(e){M.IsAndroid&&M.JavaClassEventHelper.call("Event",e)}}M.IsReady=!1,M.IsBannerVisible=!1;class L{static AldEvent(e){M.event(e)}static AldStart(e){M.event("第"+e+"关")}static AldEnd(e,t){let n=t?"关卡完成":"关卡失败";M.event("第"+e+"关"+n)}static ShareMessage(e){e(!0)}static FriendAssistShare(e){e(!0)}}class b{static GoShare(e){b.ShareTime=(new Date).getTime(),console.log("分享点击时间="+b.ShareTime),b.IsSharing=!0,b.callback=e}static OnShowHandle(){Laya.Browser.window.wx&&Laya.Browser.window.wx.onShow(function(e){if(console.log("onshow share start"),console.log("进入微信"),b.IsSharing){b.IsSharing=!1;let e=(new Date).getTime();console.log("分享回到游戏时间"+e);let t=(e-b.ShareTime)/1e3;if(console.log("分享停留时间为:"+t),t>=2)if(Math.random()<=.5){if(!b.callback)return;b.callback(!0),S.ShowToast("分享成功!")}else{if(!b.callback)return;Math.random()<=.5?Laya.Browser.window.wx.showToast({title:"分享失败!"}):S.ShowToast("请分享到不同群^-^",!1),b.callback(!1)}else{if(!b.callback)return;Math.random()<=.5?S.ShowToast("分享失败!"):S.ShowToast("请分享到不同群^-^",!1),b.callback(!1)}}})}}b.IsSharing=!1;class S{static Init(){Laya.Browser.onWeiXin&&(S._NeedUpdate(),Laya.Browser.window.wx.showShareMenu({withShareTicket:!0}),Laya.Browser.window.wx.onShow(S._OnWXFirstShow))}static _OnWXFirstShow(e){console.log(e);let t=e.query&&e.query.userId||"";null==t&&(t=""),S.ShareId=t,console.log(`[Log]邀请人:${t}`),S.CurSceneValue=e.scene;let n=Laya.LocalStorage.getItem("sceneValue");n?S.FirstSceneValue=n:(S.FirstSceneValue=S.CurSceneValue,Laya.LocalStorage.setItem("sceneValue",S.FirstSceneValue)),console.log("[LOG]首次登录场景值---\x3e"+S.FirstSceneValue),console.log("[LOG]当前场景值---\x3e"+S.CurSceneValue),Laya.Browser.window.wx.offShow(S._OnWXFirstShow)}static _NeedUpdate(){if(!Laya.Browser.onWeiXin)return;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 Login(e=null,t=null){Laya.Browser.onWeiXin&&Laya.Browser.window.wx.login({success:function(n){n.code?(console.log("[LOG]微信登录成功:",n),e&&e(n)):(console.log("[LOG]微信登录失败:",n),t&&t(n))},fail:function(e){console.log("[LOG]微信登录失败:",e),t&&t(e)}})}static ShowToast(e,t){if(!Laya.Browser.onWeiXin)return;let n=t?"success":"none";Laya.Browser.window.wx.showToast({title:e,icon:n})}static LoadSubPackage(e,t){if(Laya.Browser.onWeiXin){Laya.Browser.window.wx.loadSubpackage({name:e,success(e){console.log("[LOG]分包加载完成"),t&&t.runWith(!0)},fail(e){console.log("[LOG]分包下载失败:"+JSON.stringify(e)),t&&t.runWith(!1)}})}else t&&t.runWith(!0)}static VibrateShort(){Laya.Browser.onWeiXin&&Laya.Browser.window.wx.vibrateShort({})}static vibrateLong(){Laya.Browser.onWeiXin&&Laya.Browser.window.wx.vibrateLong({})}static ShowModel(e=""){Laya.Browser.onWeiXin&&Laya.Browser.window.wx.showModal({content:e})}static ShareMessage(e,t,n,i){if(!Laya.Browser.onWeiXin)return;Laya.Browser.window.wx.onShareAppMessage(()=>({title:e,imageUrl:t,query:"shareid="+n+"_1_"+i+"_"+Math.floor(9999*Math.random()).toString()}))}static ShareAppMessage(e){if(!Laya.Browser.onWeiXin)return void(e&&e(!0));if(!F.Instance.curAccountData.shareEnable)return void S.ShowToast("暂未开放");let t=F.Instance.ServerTime,n=F.Instance.curAccountData.shareTitle,i=F.Instance.curAccountData.shareImage,a=F.Instance.curAccountData.userId;Laya.Browser.window.wx.aldShareAppMessage({title:n,imageUrl:i,query:"userId="+a+"_1_"+t+"_"+Math.floor(9999*Math.random()).toString()}),e&&b.GoShare(e)}static ShowLoading(e="加载中...",t=0){S._IsLoading||(S._IsLoading=!0,S._Type=t,Laya.Browser.onMiniGame&&Laya.Browser.window.wx.showLoading({title:e,mask:!0}))}static HideLoading(e=0){S._Type==e&&(S._IsLoading=!1,Laya.Browser.onMiniGame&&Laya.Browser.window.wx.hideLoading())}}S._IsLoading=!1,S._Type=0;const A="https://sniperalkapi.xwxgame.com";class C{}C.Login="/user/login",C.Config="/config/table",C.Start="/game/start",C.Revival="/game/revival",C.Result="/game/play",C.Sign="/sign/sign",C.Fission="/fission/vd",C.Sync="/user/sync",C.Equip="/kun/equip",C.Lottery="/lottery/lottery",C.MoveGun="/kun/move",C.DiscardGun="/kun/discard",C.EquipGun="/kun/equip",C.BuyGun="/kun/buy",C.Achievement="/achievement/getRewards",C.Invite="/invite/getRewards",C.Heartbeat="/user/heartbeat";class D{static get Instance(){return null==D._Instance&&(D._Instance=new D),D._Instance}login(e,t,n){let i=F.Instance,a=k.Ver,s=`code=${i.code}&nickname=${i.nickName}&avatar=${i.avatar}&gender=${i.gender}&country=${i.country}&province=${i.province}&city=${i.city}& device=${i.device}$&share_id=${i.shareId}&scene=${i.scene}&v=${a}`,o=new Laya.HttpRequest;o.once(Laya.Event.PROGRESS,this,this._onHttpRequestProgress,[e,o]),o.once(Laya.Event.COMPLETE,this,this._onLoginRequestComplete,[t,o]),o.once(Laya.Event.ERROR,this,this.onHttpRequestError,[n,o]),o.send(A+C.Login,s,"post","text")}_onHttpRequestProgress(e,t){e&&(console.log("HttpRequestProgress:..."),e.run())}_onLoginRequestComplete(e,t){let n=JSON.parse(t.data);if("0"!=n.code)return void console.log("登录异常错误!错误信息:",t.data);F.ServerTime=n.t,L.AldEvent("登录正式成功"),console.log(n),F.Instance.SetAccountData(n,e);let i=F.Instance,a=i.curAccountData;S.ShareMessage(a.shareTitle,a.shareImage,a.userId,i.ServerTime)}onHttpRequestError(e,t){null!=e&&e.runWith(t),console.log("Error! Http request error...",t.data)}HttpPostRequest(e,t,n,i,a=!0,s=!0){let o="",r=A+e;var c=F.Instance.curAccountData;if(1==s&&(o=`token=${c.token}&`),a){let e="abcdefghijkimnopqrstuvwxyz0123456789",n="{",i="";for(let t=0;t<4;t++)i+=e[Math.floor(100*Math.random())%e.length];for(let e=0;e<t.length;e++){for(let i in t[e])n+=`"${i}":"${t[e][i]}"`;e<t.length-1?n+=",":n+="}"}o+="_r="+i+this._base64Encode(n)}else if(null!=t)for(let e=0;e<t.length;e++)for(let n in t[e]){o+=`${n}=${t[e][n]}`,e<t.length-1&&(o+="&")}let h=new Laya.HttpRequest;h.once(Laya.Event.COMPLETE,this,this.onHttpRequestComplete,[n,i,h]),h.once(Laya.Event.ERROR,this,this.onHttpRequestError,[i,h]),h.send(r,o,"post","text")}onHttpRequestComplete(e,t,n){let i=JSON.parse(n.data);0==i.code?(F.Instance.SetAccountData(i,null),null!=e&&e.runWith(i)):(null!=t&&t.runWith(i),console.log("Error! Http request complete error, code: "+i.code+" message: "+i.message))}_base64Encode(e){for(var t,n,i,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,o=e.length,r="";s<o;){if(t=255&e.charCodeAt(s++),s==o){r+=a.charAt(t>>2),r+=a.charAt((3&t)<<4),r+="==";break}if(n=e.charCodeAt(s++),s==o){r+=a.charAt(t>>2),r+=a.charAt((3&t)<<4|(240&n)>>4),r+=a.charAt((15&n)<<2),r+="=";break}i=e.charCodeAt(s++),r+=a.charAt(t>>2),r+=a.charAt((3&t)<<4|(240&n)>>4),r+=a.charAt((15&n)<<2|(192&i)>>6),r+=a.charAt(63&i)}return r}}class T{constructor(){this._items={},this.length=0}get container(){return this._items}has(e){return this._items.hasOwnProperty(e)}set(e,t){this.has(e)||this.length++,this._items[e]=t}delete(e){let t=null;return this.has(e)&&(t=this._items[e],delete this._items[e],this.length--),t}get(e){return this.has(e)?this._items[e]:null}values(){let e=[];for(let t in this._items)this.has(t)&&e.push(this._items[t]);return e}keys(){let e=[];for(let t in this._items)this.has(t)&&e.push(t);return e}clear(){this._items={},this.length=0}}class B{static IsStrNullOrEmpty(e){return null===e||""===e}static Str2Num(e){return B.IsStrNullOrEmpty(e)?0:Number(e)}static Str2NumArr(e,t=";"){let n=[];if(B.IsStrNullOrEmpty(e))return n;return e.split(t).forEach(e=>{n.push(Number(e))},this),n}static Str2Vec3(e,t=";"){let n=B.Str2NumArr(e,t);return n.length>=3?new Laya.Vector3(n[0],n[1],n[2]):new Laya.Vector3(0,0,0)}static Str2Vec4(e,t=";"){let n=B.Str2NumArr(e,t);return n.length>=3?new Laya.Vector4(n[0],n[1],n[2],n[3]):new Laya.Vector4(0,0,0,0)}static Str2Boolean(e){return"1"===e}}class N{constructor(e){this.actorDic=new T,this.levelDic=new T,this.storyDic=new T,this.storynodeDic=new T,this.actionDic=new T,this.effectDic=new T,this.globalDic=new T,this.gunDic=new T,this.msgDic=new T,e.actor.forEach(e=>{let t=new G(e);this.actorDic.set(t.actorId,t)},this),e.level.forEach(e=>{let t=new E(e);this.levelDic.set(t.levelId,t)},this),e.story.forEach(e=>{let t=new H(e);this.storyDic.set(t.storyId,t)},this),e.storynode.forEach(e=>{let t=new P(e);this.storynodeDic.set(t.nodeId,t)},this),e.action.forEach(e=>{let t=new R(e);this.actionDic.set(t.actionId,t)},this),e.effect&&e.effect.forEach(e=>{let t=new U(e);this.effectDic.set(t.effectType,t)},this),e.global.forEach(e=>{this.globalDic.set(e.key,e.value)},this),e.gun.forEach(e=>{this.gunDic.set(e.id,e)},this),e.message.forEach(e=>{this.msgDic.set(e.id,e)},this)}}class G{constructor(e){this.actorId=e.actor_id,this.prefab=e.prefab,this.response=e.response;let t=B.Str2Vec3(e.spawn_pos,",");this.spawnPos=new Laya.Vector3(-t.x,t.y,t.z);let n=B.Str2Vec3(e.spawn_rota,",");this.spawnRota=new Laya.Vector3(n.x,-n.y,n.z),this.movePosArr=[],e.move_pos.split(";").forEach(e=>{let t=B.Str2Vec3(e,",");this.movePosArr.push(new Laya.Vector3(-t.x,t.y,t.z))}),this.moveSpeed=e.move_speed;let i=B.Str2Vec3(e.drop_pos,",");this.dropPos=new Laya.Vector3(-i.x,i.y,i.z),this.dropAccel=e.drop_accel,this.detectArea=B.Str2Vec3(e.detect_area),this.atkSpeed=e.atk_speed,this.atkTarget=B.Str2NumArr(e.atk_target),this.hp=e.hp,this.atk=e.atk,this.npcType=e.npc_type,this.arrow=B.Str2Boolean(e.arrow),this.arrowColor=B.Str2Vec4(e.arrow_color),0==this.arrowColor.x&&0==this.arrowColor.y&&0==this.arrowColor.z&&0==this.arrowColor.w&&(this.arrowColor=new Laya.Vector4(1,0,0,1)),this.isHuman=B.Str2Boolean(e.is_human),this.weapon=e.weapon,this.anim=e.anim,this.loop=B.Str2Boolean(e.loop)}}class E{constructor(e){this.levelId=e.level_id,this.stories=B.Str2NumArr(e.stories),this.actors=B.Str2NumArr(e.actors);let t=B.Str2Vec3(e.player_pos,",");this.playerPos=new Laya.Vector3(-t.x,t.y,t.z);let n=B.Str2Vec3(e.player_rota,",");this.playerRota=new Laya.Vector3(n.x,-n.y,n.z),this.normalFov=e.normal_fov,this.scopeFov=e.scope_fov,this.playerRange=B.Str2NumArr(e.player_range),this.horizShakeRange=e.horiz_shake_range,this.verticShakeRange=e.vertic_shake_range,this.goal=e.goal,this.desc=e.desc,this.recommend=e.recommend||"推荐枪等级:lv1及以上",this.limitTime=e.limit_time,this.msgId=e.msg_id,this.preMsgId=e.pre_msg_id,this.gold=e.gold,this.diamond=e.diamond,this.horizSensitivity=e.horizSensitivity,this.verticSensitivity=e.verticSensitivity,this.hint=e.hint}}class H{constructor(e){this.storyId=e.story_id,this.nodes=B.Str2NumArr(e.nodes)}}class P{constructor(e){this.nodeId=e.node_id,this.actions=B.Str2NumArr(e.actions)}}class R{constructor(t){this.actionId=t.action_id,this.actorId=t.actor_id,this.action=t.action,this.sub=B.Str2NumArr(t.sub);let n=B.Str2Vec3(t.pos,",");this.pos=new Laya.Vector3(-n.x,n.y,n.z);let i=B.Str2Vec3(t.rota,",");this.rota=new Laya.Vector3(i.x,-i.y,i.z),this.delay=t.delay,this.dura=t.dura,this.anim=""==t.anim?e[e.Walk]:t.anim,this.loop=B.Str2Boolean(t.loop),this.speed=0==t.speed?1:t.speed,this.atkTarget=B.Str2NumArr(t.atk_target)}}class U{constructor(e){this.id=e.id,this.effectType=e.effect_type,this.effectValue=e.effect_value}}class z{static Clamp(e,t,n){return e>n?n:e<t?t:e}static ClampRange(e,t,n,i,a){return(z.Clamp(e,t,n)-t)/(n-t)*(a-i)+i}static ToPercentage(e,t,n){return(e-t)/(n-t)}static ToRad(){return Math.PI/180}static ToDeg(){return 180/Math.PI}static Rand(e,t){return Math.random()*(t-e)+e}static RandInt(e,t){return Math.floor(Math.random()*(t-e+1)+e)}static Lerp(e,t,n){return e*(1-n)+t*n}static PrefixNum(e,t,n="0"){return(Array(t).join(n)+e).slice(-t)}static ClampEuler(e){for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}}var V,O,X,q;!function(e){e[e.global=0]="global",e[e.entity=1]="entity",e[e.sign=2]="sign",e[e.rewards=3]="rewards",e[e.achievement=4]="achievement",e[e.invite=5]="invite",e[e.level=6]="level",e[e.treasure_click=7]="treasure_click",e[e.gun=8]="gun",e[e.lottery=9]="lottery",e[e.find_help=10]="find_help"}(V||(V={})),function(e){e[e.money=0]="money",e[e.diamond=1]="diamond",e[e.user_id=2]="user_id",e[e.game_times=3]="game_times",e[e.get_themes=4]="get_themes",e[e.video_times=5]="video_times",e[e.equip_themes=6]="equip_themes",e[e.equip_car=7]="equip_car",e[e.last_action_time=8]="last_action_time",e[e.last_favorite_time=9]="last_favorite_time",e[e.progress_themes=10]="progress_themes",e[e.revival=11]="revival",e[e.stage=12]="stage",e[e.energy=13]="energy",e[e.energy_recovery_time=14]="energy_recovery_time",e[e.vmoney=15]="vmoney",e[e.equip_kun=16]="equip_kun",e[e.list_kun=17]="list_kun",e[e.unlock_kun=18]="unlock_kun",e[e.buyed_kun=19]="buyed_kun"}(O||(O={})),function(e){e[e.sign_days=0]="sign_days",e[e.sign_time=1]="sign_time"}(X||(X={})),function(e){e[e.id=0]="id",e[e.name=1]="name",e[e.entity_id=2]="entity_id",e[e.icon=3]="icon"}(q||(q={}));class Y{constructor(e,t,n,i,a,s=null,o=null,r,c,h,l){this.openid="",this.token=e,this.app_setting=n,this.user=i,this.user_base=a,this.sign=r,this.task=c,this.lottery=h,this.userId=this.user.user_id,this.openid=this.user_base.openid,this.user_invite=l}get tiaoguotime(){return Number(this.app_setting.tiaoguotime)}get backtime(){return Number(this.app_setting.backtime)}get sanbeitime(){return Number(this.app_setting.sanbeitime)}get shareEnable(){return"1"==this.app_setting.shareEnable}get shareTitle(){return this.app_setting.shareTitle}get shareImage(){return this.app_setting.shareImage}get horizSensitivityNoscope(){return Number(this.app_setting.horizSensitivityNoscope)}get verticSensitivityNoscope(){return Number(this.app_setting.verticSensitivityNoscope)}get isAimAssistOn(){return"1"==this.app_setting.isAimAssistOn}get aimAssistDelayFrame(){return Number(this.app_setting.aimAssistDelayFrame)}get bulletConfig(){return B.Str2NumArr(this.app_setting.bulletConfig,",")}get CNDFolder(){return this.app_setting.CNDFolder}get videoDiamondReward(){return this.app_setting.videoDiamondReward}get energyRecoverAmount(){return this.app_setting.energyRecoverAmount}get isShareThenVideo(){return"1"==this.app_setting.isShareThenVideo}get video(){return"1"==this.app_setting.video}get videoModelNum(){return Number(this.app_setting.videoModelNum)}get IsVideoModel(){return"1"==this.app_setting.IsVideoModel}get checkscence(){return"1"==this.app_setting.checkscence}get MoveTime(){return Number(this.app_setting.MoveTime)}get banner_dis(){return Number(this.app_setting.banner_dis)}get HaveBanner(){return"1"==this.app_setting.HaveBanner}get BtnCanMove(){return"1"==this.app_setting.BtnCanMove}get bannerMoveTime(){return Number(this.app_setting.bannerMoveTime)}get tryOutTimes(){return Number(this.app_setting.tryOutTimes)}get isDebugOn(){return"1"==this.app_setting.isDebugOn}get dailyGiftDiamondReward(){return Number(this.app_setting.dailyGiftDiamondReward)}get dailyGiftMaxCnt(){return Number(this.app_setting.dailyGiftMaxCnt)}getConfig(e){return this.configs[V[e]]}getUser(e){return this.user[O[e]]}getSign(e){var t=X[e];return this.sign[t]}getThemeById(e){var t=this.getConfig(V.gun);if(t)for(let n=0;n<t.length;n++){const i=t[n];if(i.id==e)return i}}setSeverConfig(e){this.configs=e}initConfigs(e){this.cfg=new N(e)}get isGuideLv1Ended(){return"1"==Laya.LocalStorage.getItem("GuideLv1Ended")}set isGuideLv1Ended(e){e&&Laya.LocalStorage.setItem("GuideLv1Ended","1")}get isGuideLv2Ended(){return"1"==Laya.LocalStorage.getItem("GuideLv2Ended")}set isGuideLv2Ended(e){e&&Laya.LocalStorage.setItem("GuideLv2Ended","1")}get isGuideLv4Ended(){return"1"==Laya.LocalStorage.getItem("GuideLv4Ended")}set isGuideLv4Ended(e){e&&Laya.LocalStorage.setItem("GuideLv4Ended","1")}get isGuideEnergyEnded(){return"1"==Laya.LocalStorage.getItem("GuideEnergyEnded")}set isGuideEnergyEnded(e){e&&Laya.LocalStorage.setItem("GuideEnergyEnded","1")}get isFirstLogin(){return"1"!=Laya.LocalStorage.getItem("loginFlag")&&(Laya.LocalStorage.setItem("loginFlag","1"),!0)}get lastQuitTime(){let e=Laya.LocalStorage.getItem("lastQuitTime");return e?Number(e):F.Instance.ServerTime}set lastQuitTime(e){Laya.LocalStorage.setItem("lastQuitTime",e.toString())}get lastDailyGiftTime(){let e=Laya.LocalStorage.getItem("lastDailyGiftTime");return e?Number(e):0}set lastDailyGiftTime(e){Laya.LocalStorage.setItem("lastDailyGiftTime",e.toString())}get leftDailyGiftCnt(){let e=Laya.LocalStorage.getItem("leftDailyGiftCnt");return e?Number(e):0}set leftDailyGiftCnt(e){Laya.LocalStorage.setItem("leftDailyGiftCnt",e.toString())}get levelId(){return Number(this.getUser(O.stage))+1}get vmoney(){return Number(this.getUser(O.vmoney))}get diamond(){return Number(this.getUser(O.diamond))}get energy(){return Number(this.getUser(O.energy))}get energyRecTime(){let e=F.Instance.ServerTime;return this.getGlobal(h.tilirec)-(e-Number(this.getUser(O.energy_recovery_time)))}refreshLevel(){let e=this.levelId,t=this.configs.level.length;if(e>t){let n=Math.floor(.6*t);n=z.Clamp(n,1,t),e=z.RandInt(n,t)}this._level=this.cfg.levelDic.get(e)}get level(){return this._level}getEffect(e){return this.cfg.effectDic.get(c[e]).effectValue}getGlobal(e){return Number(this.cfg.globalDic.get(h[e]))}get equipGunId(){return Number(this.getUser(O.equip_kun))}get equipGun(){return this.getThemeById(this.equipGunId)}}class F{constructor(e,t,n,i,a,s,o,r,c,h,l){this.isTest=!1,this._localTime=Laya.timer.currTimer,this.code=e,this.nickName=t,this.avatar=n,this.gender=i,this.country=a,this.province=s,this.city=o,this.device=r,this.shareId=c,this.scene=h,this.ver=l,this.isTest=!1,F._Instance=this}static get Instance(){return null==F._Instance?(console.log("生成本地测试账号..."),F.TestAccount):F._Instance}static get TestAccount(){let e=new F("11","","",1,"","","","","","",k.Ver);return e.isTest=!0,e}SetAccountData(e,t){var n=e.token,i=e.configs,a=e.app_setting,s=e.user,o=e.user_base,r=e.user_sign,c=e.user_achievement,h=e.user_lottery,l=e.user_invite;null==this.curAccountData?(L.AldEvent("开始获取config数据"),this.curAccountData=new Y(n,i,a,s,o,null,null,r,c,h,l),this._checkLocalConfig(e.table_version,n=>{this.curAccountData.setSeverConfig(n),this.curAccountData.initConfigs(n),null!=t&&t.runWith(e)})):(i&&(this.curAccountData.configs=i,this.curAccountData.initConfigs(i)),a&&(this.curAccountData.app_setting=a),s&&(this.curAccountData.user=s),o&&(this.curAccountData.user_base=o),r&&(this.curAccountData.sign=r),c&&(this.curAccountData.task=c),h&&(this.curAccountData.lottery=h))}_checkLocalConfig(e,t){let n=Laya.LocalStorage.getJSON(F._Localcofigkey);n?n.ver==e?(console.log("[LOG]本地配置是最新的",e),t(n),L.AldEvent("配置获取成功")):D.Instance.HttpPostRequest(C.Config,null,Laya.Handler.create(this,n=>{n.configs.ver=e,Laya.LocalStorage.setJSON(F._Localcofigkey,n.configs),console.log("[LOG]配置更新完成",n),t(n.configs),L.AldEvent("配置获取成功")}),Laya.Handler.create(this,e=>{console.log("[LOG]配置获取失败",e),L.AldEvent("配置获取失败")}),!1):D.Instance.HttpPostRequest(C.Config,null,Laya.Handler.create(this,n=>{n.configs.ver=e,Laya.LocalStorage.setJSON(F._Localcofigkey,n.configs),console.log("sever保存配置完成...",e),L.AldEvent("config接口获取成功"),t(n.configs)}),Laya.Handler.create(this,e=>{console.log("配置获取失败"+e),L.AldEvent("config接口获取失败")}),!1)}get ServerTime(){let e=Laya.timer.currTimer;return F.ServerTime+Math.ceil((e-this._localTime)/1e3)}}F._Localcofigkey="mconfig";class W{static Find(e,t){for(let n=0;n<e.length;n++){let i=e[n];if(t(i))return i}return null}}const j=5;class $ extends Laya.Script{constructor(){super()}onAwake(){this._list=this.owner,this._list.vScrollBarSkin="",this._list.renderHandler=new Laya.Handler(this,this._updateItem),this.refresh()}_updateItem(e,t){e.getComponent(ae).refreshData()}refresh(){this._list.array=K.GetAchievementDataArr(),this._list.refresh()}}class K{constructor(e,t,n){this.data=e,this.progress=t,this.isFinished=n}static GetAchievementDataArr(){let e=F.Instance.curAccountData.task||{},t=F.Instance.curAccountData.getConfig(V.achievement),n=[];for(let i=1;i<=t.length/j;i++){let a=i,s=1,o=0,r=!1,c=e[i];c&&(a=Number(c.type),s=Number(c.level)+1,o=Number(c.progress),s>j&&(r=!0,s=j));let h=W.Find(t,e=>e.type==a&&e.level==s);n.push(new K(h,o,r))}return n}}class Z{static Reg(e){Z._CreateDic=null!=e?e:new T}static Create(e){let t=Z._CreateDic.get(e);return t&&new t}}class J{static get Instance(){return null==J._Instance&&(J._Instance=new J),J._Instance}constructor(){this._viewDic=new T,this._viewList=[]}open(e,t){if(!this._viewDic.has(e)){this.curView&&this.curView.onInactive&&this.curView.onInactive();let n=Z.Create(e);this.curView=n,this._viewList.push(n),this._viewDic.set(e,n),Laya.stage.addChild(n),n.on(Laya.Event.RESIZE,n,n.onResize),n.onResize&&n.onResize(),n.onOpen&&n.onOpen(t),n.onActive&&n.onActive()}return console.log("打开界面---"),this}close(e){if(this._viewDic.has(e)){let t=this._viewDic.delete(e),n=this._viewList.indexOf(t);this._viewList.splice(n,1),this.curView==t&&(t.onInactive&&t.onInactive(),this.curView=this._viewList.slice(-1)[0],this.curView&&this.curView.onActive&&this.curView.onActive()),t.onClose&&t.onClose(),t.off(Laya.Event.RESIZE,t,t.onResize),t.destroy&&t.destroy()}return this}moveToTop(e){if(this._viewDic.has(e)){let t=this._viewDic.get(e);if(this.curView==t)return;let n=this._viewList.indexOf(t);this._viewList.splice(n,1),this.curView&&this.curView.onInactive&&this.curView.onInactive(),this.curView=t,Laya.stage.removeChild(t),Laya.stage.addChild(t),this._viewList.push(t),t.onActive&&t.onActive()}}}var Q;!function(e){e[e.Loading=0]="Loading",e[e.Main=1]="Main",e[e.Game=2]="Game",e[e.Guide=3]="Guide",e[e.Result=4]="Result",e[e.Sign=5]="Sign",e[e.Rank=6]="Rank",e[e.Achievement=7]="Achievement",e[e.Setting=8]="Setting",e[e.Lottery=9]="Lottery",e[e.Skin=10]="Skin",e[e.Shop=11]="Shop",e[e.Reward=12]="Reward",e[e.OfflineIncome=13]="OfflineIncome",e[e.IncomeBoost=14]="IncomeBoost",e[e.GunUpgrade=15]="GunUpgrade",e[e.ExtraGuide=16]="ExtraGuide",e[e.DiamondEffect=17]="DiamondEffect",e[e.Desc=18]="Desc",e[e.Conversation=19]="Conversation",e[e.NewWeapon=20]="NewWeapon",e[e.GetEnergy=21]="GetEnergy",e[e.NewReward=22]="NewReward",e[e.AirDrop=23]="AirDrop",e[e.ExtraUpgrade=24]="ExtraUpgrade",e[e.TryOut=25]="TryOut",e[e.DailyGift=26]="DailyGift",e[e.Hint=27]="Hint",e[e.FriendAssist=28]="FriendAssist"}(Q||(Q={}));class ee{static get Instance(){return null==ee._Instance&&(ee._Instance=new ee),ee._Instance}constructor(){this._dispatcher=new Laya.EventDispatcher}on(e,t,n,i){this._dispatcher.on(e,t,n,i)}off(e,t,n){this._dispatcher.off(e,t,n)}trigger(e,t){return this._dispatcher.event(e,t)}}class te{}te.StoryCtrl={StoryEnd:"StoryCtrl.StoryEnd",PartEnd:"StoryCtrl.PartEnd",NodeEnd:"StoryCtrl.NodeEnd",ActionEnd:"StoryCtrl.ActionEnd"},te.GameCtrl={Start:"GameCtrl.Start",Pause:"GameCtrl.Pause",Resume:"GameCtrl.Resume",Lose:"GameCtrl.Lose",Win:"GameCtrl.Win",BackToMain:"GameCtrl.BackToMain"},te.MoneyMgr={RefreshMoney:"MoneyMgr.RefreshMoney"},te.IncomeMgr={GetIncome:"IncomeMgr.GetIncome",BoostTikTok:"IncomeMgr.BoostTikTok",RefreshRate:"IncomeMgr.RefreshRate"},te.PlayerBehav={Fire:"PlayerBehav.Fire",Reload:"PlayerBehav.Reload",CloseScope:"PlayerBehav.CloseScope",HideCursor:"PlayerBehav.HideCursor",ShowCursor:"PlayerBehav.ShowCursor",GuideAim:"PlayerBehav.GuideAim",GuideFire:"PlayerBehav.GuideFire",HideQuit:"PlayerBehav.HideQuit"},te.MainUIGuide={Upgrade:"MainUIGuide.Upgrade",BuyGun:"MainUIGuide.BuyGun",Start:"MainUIGuide.Start",Boost:"MainUIGuide.Boost",Share:"MainUIGuide.Share",Lottery:"MainUIGuide.Lottery",GetEnergy:"MainUIGuide.GetEnergy"},te.MainUIInfo={RedDotRefresh:"MainUIInfo.RedDotRefresh",GunListRefresh:"MainUIInfo.GunListRefresh",AirDropRefresh:"MainUIInfo.AirDropRefresh",FloatAirDropRefresh:"MainUIInfo.FloatAirDropRefresh"},te.PlayerCtrl={Dead:"PlayerCtrl.Dead"},te.GameGuide={OpenScope:"GameGuide.OpenScope",CloseScope:"GameGuide.CloseScope",RotateNoscope:"GameGuide.RotateNoscope",EnableClickScope:"GameGuide.EnableClickScope"},te.FriendAssistCtrl={Tiktok:"FriendAssistCtrl.Tiktok",RefreshData:"FriendAssistCtrl.RefreshData"};const ne=10;class ie{static get Instance(){return null==this._Instance&&(this._Instance=new ie),this._Instance}constructor(){this.vmoney=F.Instance.curAccountData.vmoney,Laya.timer.loop(1e3*ne,this,this._autoSync)}get diamond(){return F.Instance.curAccountData.diamond}updateMoney(e){this.vmoney+=e,ee.Instance.trigger(te.MoneyMgr.RefreshMoney)}refreshMoney(){ee.Instance.trigger(te.MoneyMgr.RefreshMoney)}syncData(){let e=[{t:F.Instance.ServerTime.toString()},{vmoney:Math.floor(this.vmoney).toString()}];D.Instance.HttpPostRequest(C.Sync,e,Laya.Handler.create(this,e=>{F.Instance.curAccountData.lastQuitTime=F.Instance.ServerTime,this.vmoney=F.Instance.curAccountData.vmoney,ee.Instance.trigger(te.MoneyMgr.RefreshMoney)}),Laya.Handler.create(this,()=>{}))}_autoSync(){this.syncData()}}class ae extends Laya.Script{constructor(){super()}onAwake(){this._renderBox=this.owner,this._txtTitle=this._renderBox.getChildByName("title"),this._progress=this._renderBox.getChildByName("progress"),this._txtProgress=this._renderBox.getChildByName("progressText"),this._fcMoney=this._renderBox.getChildByName("coinAmount"),this._btnDraw=this._renderBox.getChildByName("draw"),this._btnUndone=this._renderBox.getChildByName("undone"),this._imgDone=this._renderBox.getChildByName("done"),this._imgCoin=this._renderBox.getChildByName("coin"),this._imgDiamond=this._renderBox.getChildByName("diamond")}refreshData(){this._achData=this._renderBox.dataSource,this._txtTitle.text=this._achData.data.desc;let e=this._achData.progress/this._achData.data.require_num,t=this._achData.progress>=this._achData.data.require_num;this._progress.value=e,2==this._achData.data.rewards?(this._imgCoin.visible=!1,this._imgDiamond.visible=!0):(this._imgCoin.visible=!0,this._imgDiamond.visible=!1),this._fcMoney.value=this._achData.data.amount;let n=`${this._achData.progress}/${this._achData.data.require_num}`;this._txtProgress.text=n,this._imgDone.visible=this._achData.isFinished,this._btnUndone.visible=!t,this._btnDraw.visible=t&&!this._achData.isFinished,this._btnDraw.clickHandler=new Laya.Handler(this,this._getReward)}_getReward(){let e=[{type:this._achData.data.type.toString()}];D.Instance.HttpPostRequest(C.Achievement,e,Laya.Handler.create(this,e=>{let t=e.rewards;if(ee.Instance.trigger(te.MainUIInfo.RedDotRefresh),t)for(let e in t){let n;switch(e){case"1000":n=p.money;break;case"2000":n=p.diamond;break;case"4000":n=p.energy}n==p.diamond?J.Instance.open(Q.DiamondEffect,Laya.Handler.create(this,()=>{J.Instance.open(Q.Reward,[n,t[e],Laya.Handler.create(this,this._refresh)])})):J.Instance.open(Q.Reward,[n,t[e],Laya.Handler.create(this,this._refresh)])}}),Laya.Handler.create(this,e=>{}),!1,!0)}_refresh(){this._renderBox.parent.parent.getComponent($).refresh(),ie.Instance.refreshMoney()}}class se{static get Instance(){return null==this._Instance&&(this._Instance=new se),this._Instance}constructor(){this._slots=[];let e=F.Instance.curAccountData.getUser(O.list_kun);for(let t=0;t<e.length;t++){let n=new oe(t,e[t]);this._slots.push(n)}this._boost=new re}init(){let e=0;this._slots.forEach(t=>{e+=t.offlineIncome},this);let t=F.Instance.ServerTime-F.Instance.curAccountData.lastQuitTime,n=F.Instance.curAccountData.getGlobal(h._offlineTimeUpLimit),i=F.Instance.curAccountData.getGlobal(h._offlineTimeDownLimit),a=F.Instance.curAccountData.getGlobal(h._offlineRevenueKey);t>n&&(t=n),t<i&&(t=0),this._offlineIncome=t*e/a}start(){1!=F.Instance.curAccountData.levelId&&(this._slots.forEach(e=>e.start(),this),this._boost.start())}stop(){this._slots.forEach(e=>e.stop(),this),this._boost.stop()}refreshList(){let e=F.Instance.curAccountData.getUser(O.list_kun);for(let t=0;t<e.length;t++)this._slots[t].refresh(e[t]);1==F.Instance.curAccountData.levelId&&this.stop()}get offlineIncome(){return this._offlineIncome}get totalOutPerSeconed(){let e=0;return this._slots.forEach(t=>{e+=t.offlineIncome},this),e}get totalAmount(){return this._boost.totalAmount}get totalTime(){return this._boost.totalTime}}class oe{constructor(e,t){this.isRunning=!1,this.index=e,this.gunId=t;let n=F.Instance.curAccountData.cfg.gunDic.get(this.gunId);n&&(this.out=Number(n.out),this.second=n.second)}start(){if(0==this.gunId)return;let e=he.Instance.getIncomeBuffArr(),t=100;e.forEach(e=>{e.bufftype==le.Time&&e.time>0&&(t+=e.effect)},this),Laya.timer.once(1e3*this.second/(t/100),this,this._getIncome)}stop(){Laya.timer.clear(this,this._getIncome)}refresh(e){if(this.gunId==e)return;this.stop(),this.gunId=e;let t=F.Instance.curAccountData.cfg.gunDic.get(this.gunId);t&&(this.out=Number(t.out),this.second=t.second),this.start()}_getIncome(){let e=100;he.Instance.getIncomeBuffArr().forEach(t=>{t.bufftype==le.Amount&&t.time>0&&(e+=t.effect)},this);let t=this.out*e/100;ie.Instance.updateMoney(this.out),ee.Instance.trigger(te.IncomeMgr.GetIncome,[this.index,t,e>100]),this.start()}get offlineIncome(){return 0==this.gunId?0:this.out/this.second}}class re{constructor(){let e=100,t=100;he.Instance.getIncomeBuffArr().forEach(n=>{n.time>0&&(n.bufftype==le.Amount?e+=n.effect:n.bufftype==le.Time&&(t+=n.effect))},this),this.totalAmount=e,this.totalTime=t}start(){Laya.timer.loop(1e3,this,this._tikTok)}stop(){Laya.timer.clear(this,this._tikTok)}_tikTok(){let e=he.Instance.getIncomeBuffArr(),t=100,n=100;for(let i=e.length-1;i>=0;i--){let a=e[i];a.time>0?(a.time--,a.bufftype==le.Amount&&400==a.effect&&ee.Instance.trigger(te.IncomeMgr.BoostTikTok),a.bufftype==le.Amount?t+=a.effect:a.bufftype==le.Time&&(n+=a.effect)):e.splice(i,1)}he.Instance.setIncomeBuffArr(e),this.totalAmount=t,this.totalTime=n,ee.Instance.trigger(te.IncomeMgr.RefreshRate)}}const ce="IncomeBuff";class he{static get Instance(){null==this._Instance&&(this._Instance=new he);let e=this._Instance.getIncomeBuffArr();for(let t=e.length-1;t>=0;t--){let n=e[t];null==n.buffid&&(e.splice(t,1),console.log("清理无效buff",n))}return this._Instance.setIncomeBuffArr(e),this._Instance}getIncomeBuffArr(){return Laya.LocalStorage.getJSON(ce)||[]}setIncomeBuffArr(e){Laya.LocalStorage.setJSON(ce,e)}getIncomeBuff(e,t){let n=this.getIncomeBuffArr();return W.Find(n,t=>t.buffid==e)||new pe(e,t,0,0)}setIncomeBuff(e){let t=this.getIncomeBuffArr(),n=W.Find(t,t=>t.buffid==e.buffid);null==n?t.push(e):(n.effect=e.effect,n.time=e.time),Laya.LocalStorage.setJSON(ce,t)}}var le,de;!function(e){e[e.Time=0]="Time",e[e.Amount=1]="Amount"}(le||(le={})),function(e){e[e.ShareBoost=100]="ShareBoost",e[e.FriendAssistAmount=101]="FriendAssistAmount",e[e.FriendAssistTime=102]="FriendAssistTime"}(de||(de={}));class pe{constructor(e,t,n,i){this.buffid=e,this.bufftype=t,this.effect=n,this.time=i}}const ge=1e4,ue="FriendAssistCount",ye="FriendAssistLeftTime",me="LastFriendAssistTime";class _e{static get Instance(){return null==_e._Instance&&(_e._Instance=new _e),_e._Instance}init(){let e=this.lastHelpTime,t=new Date(1e3*e),n=F.Instance.ServerTime,i=new Date(1e3*n);i.setHours(0,0,0,0),t.valueOf()<i.valueOf()?(this.helpLeftTime=0,this.helpCnt=0):this._updateLeftTime(n),this._updateBuff(),Laya.timer.loop(ge,this,this._heartbeat),Laya.timer.loop(1e3,this,this._tiktok)}_heartbeat(){D.Instance.HttpPostRequest(C.Heartbeat,[],Laya.Handler.create(this,e=>{if(e&&e.help_cnt){let t=F.Instance.ServerTime;0==this.helpLeftTime&&(this.lastHelpTime=t),this.helpCnt+=e.help_cnt,this._updateLeftTime(t),this._updateBuff(),ee.Instance.trigger(te.FriendAssistCtrl.RefreshData)}}),null,!1,!0)}_updateLeftTime(e){let t=new Date(1e3*e);t.setHours(24,0,0,0);let n=new Date(1e3*e);this.helpLeftTime=Math.floor((t.valueOf()-n.valueOf())/1e3)}_updateBuff(){let e=0,t=0;if(F.Instance.curAccountData.getConfig(V.find_help).forEach(n=>{Number(F.Instance.curAccountData.getUser(O.unlock_kun))>=n.unlock_lv&&this.helpCnt>=n.id&&("up"==n.reward_type?e+=n.reward_num:"time"==n.reward_type&&(t+=n.reward_num))},this),e>0){let t=he.Instance.getIncomeBuff(de.FriendAssistAmount,le.Amount);t.effect=e,t.time=this.helpLeftTime,he.Instance.setIncomeBuff(t)}if(t>0){let e=he.Instance.getIncomeBuff(de.FriendAssistTime,le.Time);e.effect=t,e.time=this.helpLeftTime,he.Instance.setIncomeBuff(e)}}get helpCnt(){let e=Laya.LocalStorage.getItem(ue);return e?Number(e):0}set helpCnt(e){Laya.LocalStorage.setItem(ue,e.toString())}get helpLeftTime(){let e=Laya.LocalStorage.getItem(ye);return e?Number(e):0}set helpLeftTime(e){Laya.LocalStorage.setItem(ye,e.toString())}get lastHelpTime(){let e=Laya.LocalStorage.getItem(me);return e?Number(e):0}set lastHelpTime(e){Laya.LocalStorage.setItem(me,e.toString())}_tiktok(){this.helpLeftTime>0&&(this.helpLeftTime--,ee.Instance.trigger(te.FriendAssistCtrl.Tiktok))}}class Ie{static ToKMB(e,t){let n=["K","M","B","T","P"],i="";for(;e>1e3&&n.length>0;)e/=1e3,i=n.shift();return e.toFixed(""!=i?t:0)+i}static ToTimeMS(e){let t=Math.floor(e/60),n=e%60;return`${z.PrefixNum(t,2)}:${z.PrefixNum(n,2)}`}static ToTimeHMS(e){let t=Math.floor(e/3600);e-=3600*t;let n=Math.floor(e/60),i=e%60;return`${z.PrefixNum(t,2)}:${z.PrefixNum(n,2)}:${z.PrefixNum(i,2)}`}}class we extends Laya.Script{constructor(){super()}onAwake(){this._renderBox=this.owner,this._imgMask=this._renderBox.getChildByName("bgmask"),this._imgUp=this._renderBox.getChildByName("up"),this._imgTime=this._renderBox.getChildByName("time"),this._imgLock=this._renderBox.getChildByName("lock"),this._imgAvatar=this._renderBox.getChildByName("avatar"),this._btnInvite=this._renderBox.getChildByName("invite"),this._txtInvite=this._renderBox.getChildByName("invitetext"),this._txtUnlock=this._renderBox.getChildByName("unlocktext"),this._progressbg=this._renderBox.getChildByName("progressbg"),this._progressfg=this._renderBox.getChildByName("progressfg"),this._timeleft=this._renderBox.getChildByName("timeleft"),this._btnInvite.clickHandler=new Laya.Handler(this,this._inviteClick)}refreshData(){let e=this._renderBox.dataSource;this._txtInvite.text=e.desc,this._imgUp.visible="up"==e.type,this._imgTime.visible="time"==e.type,this._imgMask.visible=!e.isUnlock,this._imgLock.visible=!e.isUnlock,this._txtUnlock.text=`开启${e.unlockLevel}级枪支解锁该收益加成`,this._txtUnlock.visible=!e.isUnlock,this._btnInvite.visible=e.isUnlock&&!e.isInvited,this._imgAvatar.visible=e.isInvited,this._progressbg.visible=e.isInvited,this._progressfg.visible=e.isInvited,this._timeleft.visible=e.isInvited;let t=_e.Instance.helpLeftTime;this._progressfg.width=t/86400*this._progressbg.width,this._timeleft.text=Ie.ToTimeHMS(t),ee.Instance.off(te.FriendAssistCtrl.Tiktok,this,this._tiktok),ee.Instance.on(te.FriendAssistCtrl.Tiktok,this,this._tiktok)}onDestroy(){ee.Instance.off(te.FriendAssistCtrl.Tiktok,this,this._tiktok)}_tiktok(){let e=_e.Instance.helpLeftTime;this._progressfg.width=e/86400*this._progressbg.width,this._timeleft.text=Ie.ToTimeHMS(e)}_inviteClick(){this._btnInvite.mouseEnabled=!1,L.FriendAssistShare(e=>{this._btnInvite.mouseEnabled=!0})}}var fe,xe=Laya.ClassUtils.regClass;!function(e){class t extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(t.uiView)}}t.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/bga.png",right:0,name:"bga",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:158,width:575,skin:"Main/qiandao-1-1.png",name:"dialog",height:864,centerX:0},compId:5,child:[{type:"Image",props:{y:93,x:241,skin:"Main/chengjiu-1-1.png",name:"title",centerX:0},compId:6},{type:"List",props:{y:186,width:575,var:"achievementList",spaceY:20,repeatX:1,height:678,elasticEnabled:!0,centerX:0},compId:8,child:[{type:"Box",props:{x:30,width:515,name:"render",height:90},compId:10,child:[{type:"Image",props:{top:4,skin:"Main/paihang-1-5-1.png",right:0,left:21,bottom:4,sizeGrid:"5,5,5,5"},compId:15},{type:"Image",props:{y:0,x:0,width:27,top:0,skin:"Main/paihang-1-5.png",left:0,bottom:0,sizeGrid:"10,10,10,10"},compId:14},{type:"Text",props:{y:23.5,x:45,text:"玩十局游戏",name:"title",fontSize:20,font:"SimHei",color:"#ffffff",bold:!1,runtime:"laya.display.Text"},compId:17},{type:"ProgressBar",props:{y:59,x:45,width:327,skin:"Main/chengjiu-1-3.png",name:"progress",height:14},compId:18},{type:"Button",props:{x:384,stateNum:1,skin:"Main/chengjiu-1-5.png",scaleY:.8,scaleX:.8,name:"draw",centerY:0},compId:19,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:29}]},{type:"Button",props:{x:384,stateNum:1,skin:"Main/chengjiu-1-6.png",scaleY:.8,scaleX:.8,name:"undone",centerY:0},compId:20},{type:"Image",props:{top:4,skin:"Main/chengjiu-1-7.png",right:0,name:"done"},compId:21},{type:"Image",props:{y:14,x:268,skin:"Main/shouye-1-3.png",name:"coin"},compId:22},{type:"Image",props:{y:14,x:268,skin:"Main/zs.png",name:"diamond"},compId:31},{type:"FontClip",props:{y:23,x:317,width:60,value:"100",skin:"Main/shibai-1-3.png",sheet:"0123456789",name:"coinAmount",height:22,align:"left"},compId:23},{type:"Text",props:{y:59,x:178,width:60,valign:"middle",text:"0/1",name:"progressText",fontSize:16,color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:28},{type:"Script",props:{y:0,x:0,runtime:"views/comp/AchievementItem.ts"},compId:27}]},{type:"Sprite",props:{y:0,x:0,width:575,renderType:"mask",name:"mask",height:677},compId:24,child:[{type:"Poly",props:{y:0,x:0,points:"0,0,0,678,515,678,575,618,575,0",lineWidth:1,lineColor:"#ff0000",fillColor:"#00ffff"},compId:25}]},{type:"Script",props:{runtime:"views/comp/AchievementItemList.ts"},compId:26}]}]},{type:"Box",props:{y:1039,x:310,width:100,var:"moveBox",height:50},compId:32,child:[{type:"Button",props:{y:6,x:4,width:92,var:"btnClose",stateNum:1,skin:"Main/fanhui-1.png",height:37},compId:7,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:30}]}]}],loadList:["Main/bga.png","Main/qiandao-1-1.png","Main/chengjiu-1-1.png","Main/paihang-1-5-1.png","Main/paihang-1-5.png","Main/chengjiu-1-3.png","Main/chengjiu-1-5.png","Main/chengjiu-1-6.png","Main/chengjiu-1-7.png","Main/shouye-1-3.png","Main/zs.png","Main/shibai-1-3.png","Main/fanhui-1.png"],loadList3D:[]},e.AchievementUI=t,xe("ui.AchievementUI",t);class n extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(n.uiView)}}n.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:10,x:10,top:0,skin:"Main/bga.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:276,x:74.5,width:571,skin:"Main/huodetili-1-1.png",rotation:0,name:"dialog",height:386},compId:4,child:[{type:"Image",props:{y:-56,x:0,skin:"Main/huodetili-1-3.png"},compId:16},{type:"Image",props:{y:29,x:34,width:502,skin:"Main/huodetili-1-2.png",height:329},compId:15},{type:"Image",props:{y:-45,x:34,skin:"Main/bugi-1-0.png",name:"title"},compId:5},{type:"Box",props:{y:86,x:205.5,width:160,height:160},compId:8,child:[{type:"Image",props:{var:"icon",skin:"Main/kongtou.png",scaleY:.95,scaleX:.95,centerY:0,centerX:0},compId:9},{type:"Text",props:{y:177,x:-120,width:400,var:"desc",valign:"middle",text:"打开补给箱可获得大量武器",height:30,fontSize:30,color:"#F5C148",bold:!0,align:"center",runtime:"laya.display.Text"},compId:10}]}]},{type:"Box",props:{y:799,x:230,width:260,var:"moveBox",height:160},compId:13,child:[{type:"Button",props:{y:47,x:130,width:252,var:"btnOpen",stateNum:1,skin:"Main/buji-1-1.png",height:94,anchorY:.5,anchorX:.5},compId:11,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:14}]},{type:"Button",props:{y:107,x:84,width:92,var:"btnClose",stateNum:1,skin:"Main/qiandao-1-5-1.png",height:37},compId:6,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:7}]}]}],loadList:["Main/bga.png","Main/huodetili-1-1.png","Main/huodetili-1-3.png","Main/huodetili-1-2.png","Main/bugi-1-0.png","Main/kongtou.png","Main/buji-1-1.png","Main/qiandao-1-5-1.png"],loadList3D:[]},e.AirDropUI=n,xe("ui.AirDropUI",n);class i extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(i.uiView)}}i.uiView={type:"Scene",props:{width:720,height:1280},loadList:[],loadList3D:[]},e.BuyGunGuideUI=i,xe("ui.BuyGunGuideUI",i);class a extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(a.uiView)}}a.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/beijing.png",right:0,name:"bg",left:0,bottom:0},compId:14},{type:"Image",props:{y:398,x:60,width:600,var:"sceneContainer",height:500},compId:3},{type:"Button",props:{y:1080,x:492,var:"btnSkip",stateNum:1,skin:"Main/tiaoguo.png",scaleY:.8,scaleX:.8},compId:13}],loadList:["Main/beijing.png","Main/tiaoguo.png"],loadList3D:[]},e.ConverstaionUI=a,xe("ui.ConverstaionUI",a);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:{y:20,x:20,top:0,skin:"Main/bga.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:156,x:72.5,skin:"Main/qiandao-1-1.png",rotation:0,name:"dialog"},compId:4,child:[{type:"Image",props:{y:98,x:187,skin:"Main/libao-1-1.png",name:"title"},compId:6},{type:"Image",props:{y:220,x:146,skin:"Main/libao-1-2.png"},compId:14,child:[{type:"Text",props:{y:7.5,x:233,width:40,var:"txtAmount",valign:"middle",text:"3",fontSize:35,font:"Arial",color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:18}]},{type:"Image",props:{y:350,x:133,skin:"Main/libao-1-3.png"},compId:15},{type:"Button",props:{y:697,x:287,var:"btnOpen",stateNum:1,skin:"Main/libao-1-4.png",anchorY:.5,anchorX:.5},compId:16,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:19}]},{type:"Image",props:{y:800,x:157,skin:"Main/libao-1-5.png"},compId:17},{type:"Sprite",props:{y:592,x:197,texture:"Main/shouye-1-4.png"},compId:21},{type:"Text",props:{y:594,x:265,width:120,var:"txtDiamond",valign:"middle",text:"1",fontSize:35,color:"#ffffff",align:"left",runtime:"laya.display.Text"},compId:24}]},{type:"Box",props:{y:1036,x:294,width:100,var:"moveBox",height:50},compId:5,child:[{type:"Button",props:{y:6,x:4,width:92,var:"btnClose",stateNum:1,skin:"Main/fanhui-1.png",height:37},compId:12,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:13}]}]}],loadList:["Main/bga.png","Main/qiandao-1-1.png","Main/libao-1-1.png","Main/libao-1-2.png","Main/libao-1-3.png","Main/libao-1-4.png","Main/libao-1-5.png","Main/shouye-1-4.png","Main/fanhui-1.png"],loadList3D:[]},e.DailyGiftUI=s,xe("ui.DailyGiftUI",s);class o extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(o.uiView)}}o.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/shouye-1-21.png",right:0,name:"bg",left:0,bottom:0},compId:3},{type:"Image",props:{y:176,x:73.5,width:573,var:"dialog",skin:"Main/huodetili-1-1.png",sizeGrid:"11,14,14,11",height:798},compId:4,child:[{type:"Image",props:{y:34,x:10,width:555,skin:"Main/huodetili-1-2.png",sizeGrid:"14,13,12,13",height:731},compId:29},{type:"Image",props:{y:-56,x:2,skin:"Main/huodetili-1-3.png"},compId:31},{type:"Sprite",props:{y:389,x:47,width:480,height:60},compId:27,child:[{type:"Rect",props:{y:0,x:0,width:480,lineWidth:0,height:60,fillColor:"#d99e40"},compId:26}]},{type:"Text",props:{y:50,x:186.5,width:200,var:"txtLevel",valign:"middle",text:"第0关",fontSize:50,font:"Microsoft YaHei",bold:!0,align:"center",runtime:"laya.display.Text"},compId:5},{type:"Text",props:{y:399,x:57,width:460,var:"txtGoal",valign:"middle",text:"目标:一二三四五六",overflow:"hidden",height:40,fontSize:35,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:6},{type:"Text",props:{y:464,x:12,wordWrap:!0,width:550,visible:!0,var:"txtDesc",text:"一二三四五六七八九十",overflow:"hidden",height:240,fontSize:45,font:"Microsoft YaHei",color:"#ffffff",bold:!0,runtime:"laya.display.Text"},compId:7,child:[{type:"Sprite",props:{y:-292,x:-12,renderType:"mask",name:"mask"},compId:12,child:[{type:"Poly",props:{points:"2,69,573,70,572,807,518,861,2,861",lineWidth:1,lineColor:"#ff0000",fillColor:"#00ffff"},compId:13}]}]},{type:"Text",props:{y:729,x:37,width:500,var:"txtRecommend",valign:"middle",text:"推荐枪等级:lv19及以上",height:35,fontSize:35,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:15},{type:"Button",props:{y:812,x:162,width:251,var:"btnStart",stateNum:1,skin:"Main/youhua-1-11.png",height:87},compId:8,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:11}]},{type:"Button",props:{y:812,x:22,width:87,var:"btnClose",stateNum:1,skin:"Main/anniu-8.png",scaleY:1,scaleX:1,height:87},compId:9,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:10}]},{type:"ProgressBar",props:{y:854,x:290,var:"progressBar",skin:"Load/jiazai-1-5.png",anchorY:.5,anchorX:.5},compId:16,child:[{type:"Text",props:{y:-44,x:188,width:160,var:"progressVal",valign:"middle",text:"100%",height:40,fontSize:40,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:17}]},{type:"Image",props:{y:119,x:22,width:530,var:"screenPos",height:260},compId:24}]},{type:"Image",props:{y:295,x:96,width:530,var:"imgScene",height:260},compId:18},{type:"Image",props:{y:295,x:97,var:"imgSnowFlake",skin:"Main/snowflake.png"},compId:19}],loadList:["Main/shouye-1-21.png","Main/huodetili-1-1.png","Main/huodetili-1-2.png","Main/huodetili-1-3.png","Main/youhua-1-11.png","Main/anniu-8.png","Load/jiazai-1-5.png","Main/snowflake.png"],loadList3D:[]},e.DescUI=o,xe("ui.DescUI",o);class r extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(r.uiView)}}r.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Sprite",props:{y:473,x:362},compId:19,child:[{type:"Sprite",props:{y:7,x:7,texture:"Main/zs.png",scaleY:.5,scaleX:.5,rotation:0},compId:3},{type:"Sprite",props:{y:7,x:7,texture:"Main/zs.png",scaleY:.5,scaleX:.5,rotation:0},compId:4},{type:"Sprite",props:{y:4,x:5,texture:"Main/zs.png",scaleY:.6,scaleX:.6,rotation:0},compId:6},{type:"Sprite",props:{y:4,x:5,texture:"Main/zs.png",scaleY:.6,scaleX:.6,rotation:0},compId:7},{type:"Sprite",props:{y:4,x:5,texture:"Main/zs.png",scaleY:.6,scaleX:.6,rotation:0},compId:8},{type:"Sprite",props:{y:4,x:5,texture:"Main/zs.png",scaleY:.6,scaleX:.6,rotation:0},compId:9},{type:"Sprite",props:{y:2,x:2,texture:"Main/zs.png",scaleY:.7,scaleX:.7,rotation:0},compId:10},{type:"Sprite",props:{y:2,x:2,texture:"Main/zs.png",scaleY:.7,scaleX:.7,rotation:0},compId:11},{type:"Sprite",props:{texture:"Main/zs.png",scaleY:.8,scaleX:.8,rotation:0},compId:12},{type:"Sprite",props:{y:7,x:7,texture:"Main/zs.png",scaleY:.5,scaleX:.5,height:44},compId:13},{type:"Sprite",props:{y:4,x:5,texture:"Main/zs.png",scaleY:.6,scaleX:.6,rotation:0},compId:14},{type:"Sprite",props:{y:4,x:5,texture:"Main/zs.png",scaleY:.6,scaleX:.6,rotation:0},compId:15},{type:"Sprite",props:{y:2,x:2,texture:"Main/zs.png",scaleY:.7,scaleX:.7,rotation:0},compId:16}]}],animations:[{nodes:[{target:3,keyframes:{y:[{value:7,tweenMethod:"linearNone",tween:!0,target:3,key:"y",index:0},{value:-40,tweenMethod:"linearNone",tween:!0,target:3,key:"y",index:10}],x:[{value:7,tweenMethod:"linearNone",tween:!0,target:3,key:"x",index:0},{value:178,tweenMethod:"linearNone",tween:!0,target:3,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:3,key:"rotation",index:0},{value:-492,tweenMethod:"linearNone",tween:!0,target:3,key:"rotation",index:10}]}},{target:4,keyframes:{y:[{value:7,tweenMethod:"linearNone",tween:!0,target:4,key:"y",index:0},{value:46,tweenMethod:"linearNone",tween:!0,target:4,key:"y",index:10}],x:[{value:7,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:0},{value:-158,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:4,key:"rotation",index:0},{value:280,tweenMethod:"linearNone",tween:!0,target:4,key:"rotation",index:10}]}},{target:6,keyframes:{y:[{value:4,tweenMethod:"linearNone",tween:!0,target:6,key:"y",index:0},{value:-96,tweenMethod:"linearNone",tween:!0,target:6,key:"y",index:10}],x:[{value:5,tweenMethod:"linearNone",tween:!0,target:6,key:"x",index:0},{value:108,tweenMethod:"linearNone",tween:!0,target:6,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:6,key:"rotation",index:0},{value:240,tweenMethod:"linearNone",tween:!0,target:6,key:"rotation",index:10}]}},{target:7,keyframes:{y:[{value:4,tweenMethod:"linearNone",tween:!0,target:7,key:"y",index:0},{value:-128,tweenMethod:"linearNone",tween:!0,target:7,key:"y",index:10}],x:[{value:5,tweenMethod:"linearNone",tween:!0,target:7,key:"x",index:0},{value:-5,tweenMethod:"linearNone",tween:!0,target:7,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:7,key:"rotation",index:0},{value:-124,tweenMethod:"linearNone",tween:!0,target:7,key:"rotation",index:10}]}},{target:8,keyframes:{y:[{value:4,tweenMethod:"linearNone",tween:!0,target:8,key:"y",index:0},{value:184,tweenMethod:"linearNone",tween:!0,target:8,key:"y",index:10}],x:[{value:5,tweenMethod:"linearNone",tween:!0,target:8,key:"x",index:0},{value:2,tweenMethod:"linearNone",tween:!0,target:8,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:8,key:"rotation",index:0},{value:-60,tweenMethod:"linearNone",tween:!0,target:8,key:"rotation",index:10}]}},{target:9,keyframes:{y:[{value:4,tweenMethod:"linearNone",tween:!0,target:9,key:"y",index:0},{value:-52,tweenMethod:"linearNone",tween:!0,target:9,key:"y",index:10}],x:[{value:5,tweenMethod:"linearNone",tween:!0,target:9,key:"x",index:0},{value:-80,tweenMethod:"linearNone",tween:!0,target:9,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:9,key:"rotation",index:0},{value:159,tweenMethod:"linearNone",tween:!0,target:9,key:"rotation",index:10}]}},{target:10,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:10,key:"y",index:0},{value:129,tweenMethod:"linearNone",tween:!0,target:10,key:"y",index:10}],x:[{value:2,tweenMethod:"linearNone",tween:!0,target:10,key:"x",index:0},{value:-80,tweenMethod:"linearNone",tween:!0,target:10,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:10,key:"rotation",index:0},{value:140,tweenMethod:"linearNone",tween:!0,target:10,key:"rotation",index:10}]}},{target:11,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:11,key:"y",index:0},{value:162,tweenMethod:"linearNone",tween:!0,target:11,key:"y",index:10}],x:[{value:2,tweenMethod:"linearNone",tween:!0,target:11,key:"x",index:0},{value:83,tweenMethod:"linearNone",tween:!0,target:11,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:11,key:"rotation",index:0},{value:-40,tweenMethod:"linearNone",tween:!0,target:11,key:"rotation",index:10}]}},{target:12,keyframes:{y:[{value:0,tweenMethod:"linearNone",tween:!0,target:12,key:"y",index:0},{value:73,tweenMethod:"linearNone",tween:!0,target:12,key:"y",index:10}],x:[{value:0,tweenMethod:"linearNone",tween:!0,target:12,key:"x",index:0},{value:178,tweenMethod:"linearNone",tween:!0,target:12,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:12,key:"rotation",index:0},{value:-210,tweenMethod:"linearNone",tween:!0,target:12,key:"rotation",index:10}]}},{target:13,keyframes:{y:[{value:7,tweenMethod:"linearNone",tween:!0,target:13,key:"y",index:0},{value:26,tweenMethod:"linearNone",tween:!0,target:13,key:"y",index:10}],x:[{value:7,tweenMethod:"linearNone",tween:!0,target:13,key:"x",index:0},{value:-80,tweenMethod:"linearNone",tween:!0,target:13,key:"x",index:10}],height:[{value:44,tweenMethod:"linearNone",tween:!0,target:13,key:"height",index:0},{value:54,tweenMethod:"linearNone",tween:!0,target:13,key:"height",index:10}]}},{target:14,keyframes:{y:[{value:4,tweenMethod:"linearNone",tween:!0,target:14,key:"y",index:0},{value:73,tweenMethod:"linearNone",tween:!0,target:14,key:"y",index:10}],x:[{value:5,tweenMethod:"linearNone",tween:!0,target:14,key:"x",index:0},{value:70,tweenMethod:"linearNone",tween:!0,target:14,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:14,key:"rotation",index:0},{value:34,tweenMethod:"linearNone",tween:!0,target:14,key:"rotation",index:10}]}},{target:15,keyframes:{y:[{value:4,tweenMethod:"linearNone",tween:!0,target:15,key:"y",index:0},{value:-18,tweenMethod:"linearNone",tween:!0,target:15,key:"y",index:10}],x:[{value:5,tweenMethod:"linearNone",tween:!0,target:15,key:"x",index:0},{value:70,tweenMethod:"linearNone",tween:!0,target:15,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:15,key:"rotation",index:0},{value:-65,tweenMethod:"linearNone",tween:!0,target:15,key:"rotation",index:10}]}},{target:16,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:16,key:"y",index:0},{value:95,tweenMethod:"linearNone",tween:!0,target:16,key:"y",index:10}],x:[{value:2,tweenMethod:"linearNone",tween:!0,target:16,key:"x",index:0},{value:-5,tweenMethod:"linearNone",tween:!0,target:16,key:"x",index:10}],rotation:[{value:0,tweenMethod:"linearNone",tween:!0,target:16,key:"rotation",index:0},{value:75,tweenMethod:"linearNone",tween:!0,target:16,key:"rotation",index:10}]}}],name:"ani1",id:1,frameRate:24,action:0}],loadList:["Main/zs.png"],loadList3D:[]},e.DiamondEffectUI=r,xe("ui.DiamondEffectUI",r);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:"Sprite",props:{y:588,x:377,visible:!1,var:"guideHand",mouseThrough:!0},compId:3,child:[{type:"Image",props:{y:8,x:5,skin:"Main/zhiyin-1-1.png",scaleY:.5,scaleX:.5,rotation:-30,mouseThrough:!0,anchorY:.5,anchorX:.5},compId:4}]},{type:"Image",props:{y:921,x:558,visible:!1,var:"arrowWhite",skin:"Main/arrow-white.png",rotation:180,anchorY:.5,anchorX:.5},compId:5},{type:"Box",props:{y:582,x:303,width:165,visible:!1,var:"guideCross",height:136},compId:8,child:[{type:"Image",props:{skin:"Main/cross.png",scaleY:.5,scaleX:.5,name:"cross"},compId:9},{type:"Image",props:{y:82,x:43,skin:"Main/zhiyin-1-1.png",skewX:1,scaleY:1,scaleX:1,rotation:-45,name:"hand"},compId:10}]}],animations:[{nodes:[{target:4,keyframes:{x:[{value:5,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:0},{value:5,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:10},{value:5,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:20}],scaleY:[{value:.5,tweenMethod:"linearNone",tween:!0,target:4,key:"scaleY",index:0},{value:.6,tweenMethod:"linearNone",tween:!0,target:4,key:"scaleY",index:10},{value:.5,tweenMethod:"linearNone",tween:!0,target:4,key:"scaleY",index:20}],scaleX:[{value:.5,tweenMethod:"linearNone",tween:!0,target:4,key:"scaleX",index:0},{value:.6,tweenMethod:"linearNone",tween:!0,target:4,key:"scaleX",index:10},{value:.5,tweenMethod:"linearNone",tween:!0,target:4,key:"scaleX",index:20}]}}],name:"ani1",id:1,frameRate:24,action:0},{nodes:[{target:4,keyframes:{x:[{value:5,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:0},{value:-166,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:15},{value:-166,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:25}]}}],name:"ani2",id:2,frameRate:24,action:0},{nodes:[{target:5,keyframes:{x:[{value:558,tweenMethod:"linearNone",tween:!0,target:5,key:"x",index:0},{value:558,tweenMethod:"linearNone",tween:!0,target:5,key:"x",index:10},{value:558,tweenMethod:"linearNone",tween:!0,target:5,key:"x",index:20},{value:558,tweenMethod:"linearNone",tween:!0,target:5,key:"x",index:25}],scaleY:[{value:1,tweenMethod:"linearNone",tween:!0,target:5,key:"scaleY",index:0},{value:.8,tweenMethod:"linearNone",tween:!0,target:5,key:"scaleY",index:10},{value:1,tweenMethod:"linearNone",tween:!0,target:5,key:"scaleY",index:20}],scaleX:[{value:1,tweenMethod:"linearNone",tween:!0,target:5,key:"scaleX",index:0},{value:.8,tweenMethod:"linearNone",tween:!0,target:5,key:"scaleX",index:10},{value:1,tweenMethod:"linearNone",tween:!0,target:5,key:"scaleX",index:20}]}}],name:"ani3",id:3,frameRate:24,action:0},{nodes:[{target:8,keyframes:{y:[{value:582,tweenMethod:"linearNone",tween:!0,target:8,key:"y",index:0},{value:582,tweenMethod:"linearNone",tween:!0,target:8,key:"y",index:10},{value:582,tweenMethod:"linearNone",tween:!0,target:8,key:"y",index:20}],x:[{value:303,tweenMethod:"linearNone",tween:!0,target:8,key:"x",index:0},{value:273,tweenMethod:"linearNone",tween:!0,target:8,key:"x",index:10},{value:303,tweenMethod:"linearNone",tween:!0,target:8,key:"x",index:20},{value:303,tweenMethod:"linearNone",tween:!0,target:8,key:"x",index:25}]}}],name:"ani4",id:4,frameRate:24,action:0}],loadList:["Main/zhiyin-1-1.png","Main/arrow-white.png","Main/cross.png"],loadList3D:[]},e.ExtraGuideUI=c,xe("ui.ExtraGuideUI",c);class h extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(h.uiView)}}h.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:0,x:0,top:0,skin:"Main/bga.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:218,x:70,skin:"Main/shezhi-1-2.png",rotation:0,name:"dialog"},compId:4,child:[{type:"Image",props:{y:98,x:187,skin:"Main/shengjiqiangzhi.png",name:"title"},compId:5},{type:"Button",props:{y:0,x:0,var:"btnClose",top:20,stateNum:1,skin:"Main/qiandao-1-2.png",right:15},compId:6,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:7}]},{type:"Box",props:{y:189,x:9,width:560,height:150},compId:8,child:[{type:"Image",props:{y:75,x:100,var:"imgLeft",anchorY:.5,anchorX:.5},compId:12},{type:"Image",props:{y:75,x:460,var:"imgRight",anchorY:.5,anchorX:.5},compId:13},{type:"Image",props:{y:75,x:281,skin:"Main/shengji-1-2.png",scaleY:.7,scaleX:.7,centerY:0,centerX:0,anchorY:.5,anchorX:.5},compId:9}]},{type:"Text",props:{y:350,x:65,width:450,var:"desc",valign:"middle",text:"获得了一次免费升级枪的机会",height:30,fontSize:30,color:"#F5C148",bold:!0,align:"center",runtime:"laya.display.Text"},compId:10},{type:"Button",props:{y:475,x:289,var:"btnUpgrade",stateNum:1,skin:"Main/shengji-1-3.png",anchorY:.5,anchorX:.5},compId:11,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:14}]}]}],loadList:["Main/bga.png","Main/shezhi-1-2.png","Main/shengjiqiangzhi.png","Main/qiandao-1-2.png","Main/shengji-1-2.png","Main/shengji-1-3.png"],loadList3D:[]},e.ExtraUpgradeUI=h,xe("ui.ExtraUpgradeUI",h);class l extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(l.uiView)}}l.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:0,x:0,top:0,skin:"Main/bga.png",right:0,name:"bga",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:142,width:575,skin:"Main/qiandao-1-1.png",name:"dialog",height:864,centerX:0},compId:4,child:[{type:"Image",props:{y:93,x:185,skin:"Main/zhuli-1-1.png",name:"title",centerX:0},compId:6},{type:"Image",props:{y:190,x:57,width:460,skin:"Main/zhuli-1-2.png",name:"topPanel",height:80,sizeGrid:"10,10,10,10"},compId:36,child:[{type:"Button",props:{y:39,x:365,var:"btnInvite",stateNum:1,skin:"Main/zhuli-1-7.png",anchorY:.5,anchorX:.5},compId:37},{type:"Text",props:{y:15,x:15,wordWrap:!0,width:258,valign:"middle",text:"邀请好友助力,收益奖励翻倍!",name:"desc",leading:5,height:55,fontSize:25,font:"Microsoft YaHei",color:"#ffffff",align:"left",runtime:"laya.display.Text"},compId:38}]},{type:"List",props:{y:280,x:57,width:460,var:"friendAssistList",spaceY:20,repeatX:1,height:544,elasticEnabled:!0},compId:27,child:[{type:"Box",props:{width:460,name:"render",height:130},compId:28,child:[{type:"Image",props:{top:0,skin:"Main/zhuli-1-2.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"10,10,10,10"},compId:29},{type:"Image",props:{top:0,skin:"Main/zhuli-1-6.png",right:0,name:"bgmask",left:0,bottom:0,sizeGrid:"10,10,10,10"},compId:30},{type:"Image",props:{y:11,x:10,skin:"Main/up.png",scaleY:.55,scaleX:.55,name:"up"},compId:39},{type:"Image",props:{y:16.5,x:10,skin:"Main/time.png",scaleY:.4,scaleX:.4,name:"time"},compId:40},{type:"Image",props:{y:75,x:38,skin:"Main/zhuli-1-5.png",name:"lock"},compId:33},{type:"Button",props:{y:60,x:30,stateNum:1,skin:"Main/zhuli-1-4.png",name:"invite"},compId:32},{type:"Image",props:{y:60,x:30,skin:"Main/avatar.png",name:"avatar"},compId:44},{type:"Text",props:{y:30,x:50,text:"每秒收益增长至110%",name:"invitetext",fontSize:18,font:"Microsoft YaHei",color:"#ffffff",runtime:"laya.display.Text"},compId:34},{type:"Text",props:{y:93,x:100,text:"开启23级枪支解锁该收益加成",name:"unlocktext",fontSize:20,font:"SimHei",color:"#ffffff",bold:!1,runtime:"laya.display.Text"},compId:35},{type:"Image",props:{y:81,x:195,skin:"Main/haoyouzhulijindu.png",name:"progressbg",sizeGrid:"0,20,0,20"},compId:48},{type:"Image",props:{y:81,x:195,skin:"Main/haoyouzhulijindu$bar.png",name:"progressfg"},compId:49},{type:"Text",props:{y:89,x:259,width:120,valign:"middle",text:"12:00:00",name:"timeleft",italic:!0,fontSize:20,color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:45},{type:"Script",props:{runtime:"views/comp/FriendAssistItem.ts"},compId:47}]},{type:"Script",props:{runtime:"views/comp/FriendAssistList.ts"},compId:46}]}]},{type:"Box",props:{y:1022,x:310,width:100,var:"moveBox",height:50},compId:5,child:[{type:"Button",props:{y:6,x:4,width:92,var:"btnClose",stateNum:1,skin:"Main/fanhui-1.png",height:37},compId:25,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:26}]}]}],loadList:["Main/bga.png","Main/qiandao-1-1.png","Main/zhuli-1-1.png","Main/zhuli-1-2.png","Main/zhuli-1-7.png","Main/zhuli-1-6.png","Main/up.png","Main/time.png","Main/zhuli-1-5.png","Main/zhuli-1-4.png","Main/avatar.png","Main/haoyouzhulijindu.png","Main/haoyouzhulijindu$bar.png","Main/fanhui-1.png"],loadList3D:[]},e.FriendAssistUI=l,xe("ui.FriendAssistUI",l);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:{y:0,x:0,visible:!1,var:"bg",top:0,skin:"Main/bga.png",right:0,left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:17},{type:"Image",props:{y:504,x:229,var:"cursor",skin:"Main/zhunxin.png",scaleY:.8,scaleX:.8},compId:34},{type:"Image",props:{y:302,x:22,width:677,visible:!1,var:"scope",skin:"Main/jujijing-1.png",height:676,centerY:0,centerX:0},compId:18},{type:"Image",props:{var:"cartridge",skin:"Main/danjia-1-1.png",left:0,bottom:1170,sizeGrid:"0,23,0,23"},compId:7,child:[{type:"Image",props:{x:20,width:13,skin:"Main/danjia-1-2.png",height:62,centerY:0},compId:8}]},{type:"Button",props:{y:110,var:"btnGoal",stateNum:1,skin:"Main/ingame-1.png",right:0,mouseEnabled:!1,left:0,labelSize:40,labelFont:"SimHei",labelColors:"#ffffff",labelAlign:"center",label:"目标:一二三四五六七八九十",height:70},compId:21},{type:"Button",props:{y:34,x:640,var:"btnQuit",stateNum:1,skin:"Main/tuichu-1-3.png"},compId:24},{type:"Button",props:{y:240,x:662,var:"btnHint",stateNum:1,skin:"Main/hint.png",anchorY:.5,anchorX:.5},compId:25,child:[{type:"Script",props:{runtime:"views/comp/ScaleScript.ts"},compId:35},{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:36}]},{type:"Image",props:{y:1021,x:269,visible:!1,var:"imgScopeBg",skin:"Main/caokong-1-1.png"},compId:28,child:[{type:"Image",props:{y:32,x:32,var:"imgCursor1",skin:"Main/caokong-1-2.png"},compId:29},{type:"Image",props:{y:91,x:91,width:93,var:"imgCursor2",height:93,anchorY:.5,anchorX:.5},compId:30,child:[{type:"Image",props:{y:46,x:46,width:93,skin:"Main/caokong-1-3.png",rotation:45,height:93,anchorY:.5,anchorX:.5},compId:31}]}]},{type:"Button",props:{y:830,x:269,width:182,var:"btnScope",stateNum:1,skin:"Main/caokong-1-1.png",height:182},compId:32,child:[{type:"Sprite",props:{y:32,x:32,texture:"Main/caokong-1-2.png"},compId:33}]}],loadList:["Main/bga.png","Main/zhunxin.png","Main/jujijing-1.png","Main/danjia-1-1.png","Main/danjia-1-2.png","Main/ingame-1.png","Main/tuichu-1-3.png","Main/hint.png","Main/caokong-1-1.png","Main/caokong-1-2.png","Main/caokong-1-3.png"],loadList3D:[]},e.GameUI=d,xe("ui.GameUI",d);class p extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(p.uiView)}}p.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:0,x:0,top:0,skin:"Main/bga.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:382,x:77,width:570,skin:"Main/huodetili-1-1.png",sizeGrid:"10,11,16,12",rotation:0,name:"dialog",height:335},compId:4,child:[{type:"Image",props:{y:-56,x:-1,skin:"Main/huodetili-1-3.png"},compId:16},{type:"Button",props:{y:335,x:285,width:297,var:"btnShare",stateNum:1,skin:"Main/huodetili-1-4.png",pivotY:52,pivotX:149,height:103},compId:11,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:12}]},{type:"Image",props:{y:11,x:9,width:549,skin:"Main/huodetili-1-2.png",sizeGrid:"11,12,15,12",height:254},compId:15},{type:"Box",props:{y:59,x:205,width:160,height:160},compId:8,child:[{type:"Image",props:{var:"icon",skin:"Main/huodetili-1-5.png",centerY:0,centerX:0},compId:9},{type:"Text",props:{y:169,x:-2,width:160,var:"desc",valign:"middle",text:"+2",height:30,fontSize:30,color:"#F5C148",bold:!0,align:"center",runtime:"laya.display.Text"},compId:10}]},{type:"Image",props:{y:-45,x:18,skin:"Main/huodetili0.png",name:"title"},compId:5},{type:"Button",props:{width:57,var:"btnClose",top:-56,stateNum:1,skin:"Main/shangcheng-1-2.png",right:0,height:56},compId:6,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:7}]}]}],loadList:["Main/bga.png","Main/huodetili-1-1.png","Main/huodetili-1-3.png","Main/huodetili-1-4.png","Main/huodetili-1-2.png","Main/huodetili-1-5.png","Main/huodetili0.png","Main/shangcheng-1-2.png"],loadList3D:[]},e.GetEnergyUI=p,xe("ui.GetEnergyUI",p);class g extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(g.uiView)}}g.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:190,var:"guide1",skin:"Main/yindao-1-18.png",right:0,left:0,height:68,sizeGrid:"5,5,5,5"},compId:16,child:[{type:"Image",props:{y:10,x:270,skin:"Main/yindao-1-1.png",centerY:0,centerX:0},compId:3}]},{type:"Image",props:{y:190,var:"guide2",skin:"Main/chunhei.png",right:0,left:0,height:68,sizeGrid:"2,2,2,2"},compId:15,child:[{type:"Image",props:{y:12,x:225,skin:"Main/yindao-1-4.png",centerY:0,centerX:0},compId:4}]},{type:"Image",props:{y:190,var:"guide3",skin:"Main/yindao-1-18.png",right:0,left:0,height:68,sizeGrid:"5,5,5,5"},compId:14,child:[{type:"Image",props:{skin:"Main/yindao-1-3.png",centerY:0,centerX:0},compId:5}]},{type:"Image",props:{y:190,var:"guide4",skin:"Main/yindao-1-18.png",right:0,left:0,height:68,sizeGrid:"5,5,5,5"},compId:13,child:[{type:"Image",props:{skin:"Main/yindao-1-2.png",centerY:0,centerX:0},compId:6}]},{type:"Image",props:{y:190,var:"guide5",skin:"Main/yindao-1-18.png",right:0,left:0,height:68,sizeGrid:"5,5,5,5"},compId:12,child:[{type:"Image",props:{skin:"Main/yindao-1-9.png",centerY:0,centerX:0},compId:7}]},{type:"Image",props:{y:190,var:"guide6",skin:"Main/yindao-1-18.png",right:0,left:0,height:135,sizeGrid:"5,5,5,5"},compId:10,child:[{type:"Image",props:{skin:"Main/yindao-1-8.png",centerY:0,centerX:0},compId:8}]},{type:"Image",props:{y:190,var:"guide7",skin:"Main/yindao-1-18.png",right:0,left:0,height:135,sizeGrid:"5,5,5,5"},compId:11,child:[{type:"Image",props:{skin:"Main/yindao-1-7.png",centerY:0,centerX:0},compId:9}]},{type:"Image",props:{y:190,x:0,var:"guide8",skin:"Main/chunhei.png",right:0,left:0,height:68,sizeGrid:"2,2,2,2"},compId:19,child:[{type:"Image",props:{y:426,x:270,skin:"Main/yindao-4.png",centerY:0,centerX:0},compId:20}]}],loadList:["Main/yindao-1-18.png","Main/yindao-1-1.png","Main/chunhei.png","Main/yindao-1-4.png","Main/yindao-1-3.png","Main/yindao-1-2.png","Main/yindao-1-9.png","Main/yindao-1-8.png","Main/yindao-1-7.png","Main/yindao-4.png"],loadList3D:[]},e.GuideUI=g,xe("ui.GuideUI",g);class u extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(u.uiView)}}u.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/bga.png",right:0,name:"bga",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:590,x:310,width:100,var:"lgun",height:100,alpha:0},compId:6},{type:"Image",props:{y:590,x:310,width:100,var:"rgun",height:100,alpha:0},compId:5},{type:"Image",props:{y:590,x:310,width:100,var:"mgun",height:100,alpha:1},compId:4},{type:"Image",props:{y:623,x:354,skin:"Main/caidai-1-1.png"},compId:23},{type:"Image",props:{y:631,x:350,skin:"Main/caidai-1-10.png"},compId:24},{type:"Image",props:{y:624,x:349,skin:"Main/caidai-1-2.png"},compId:25},{type:"Image",props:{y:636,x:357,skin:"Main/caidai-1-3.png"},compId:26},{type:"Image",props:{y:636,x:356,skin:"Main/caidai-1-4.png"},compId:28},{type:"Image",props:{y:638,x:355,skin:"Main/caidai-1-5.png"},compId:29},{type:"Image",props:{y:634,x:351,skin:"Main/caidai-1-6.png"},compId:30},{type:"Image",props:{y:639,x:355,skin:"Main/caidai-1-7.png"},compId:31},{type:"Image",props:{y:623,x:351,skin:"Main/caidai-1-8.png"},compId:32},{type:"Image",props:{y:623,x:351,skin:"Main/caidai-1-9.png"},compId:33}],animations:[{nodes:[{target:6,keyframes:{x:[{value:100,tweenMethod:"linearNone",tween:!0,target:6,key:"x",index:0},{value:257.5,tweenMethod:"linearNone",tween:!0,target:6,key:"x",index:15},{value:310,tweenMethod:"linearNone",tween:!0,target:6,key:"x",index:20}],alpha:[{value:1,tweenMethod:"linearNone",tween:!0,target:6,key:"alpha",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:6,key:"alpha",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:6,key:"alpha",index:20}]}},{target:5,keyframes:{x:[{value:520,tweenMethod:"linearNone",tween:!0,target:5,key:"x",index:0},{value:362.5,tweenMethod:"linearNone",tween:!0,target:5,key:"x",index:15},{value:310,tweenMethod:"linearNone",tween:!0,target:5,key:"x",index:20}],alpha:[{value:1,tweenMethod:"linearNone",tween:!0,target:5,key:"alpha",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:5,key:"alpha",index:15},{value:0,tweenMethod:"linearNone",tween:!0,target:5,key:"alpha",index:20}]}},{target:4,keyframes:{x:[{value:310,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:0},{value:310,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:15},{value:310,tweenMethod:"linearNone",tween:!0,target:4,key:"x",index:20}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:4,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:4,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:4,key:"alpha",index:20}]}}],name:"ani1",id:1,frameRate:24,action:0},{nodes:[{target:23,keyframes:{y:[{value:623,tweenMethod:"linearNone",tween:!0,target:23,key:"y",index:0},{value:623,tweenMethod:"linearNone",tween:!0,target:23,key:"y",index:15},{value:690,tweenMethod:"linearNone",tween:!0,target:23,key:"y",index:20}],x:[{value:354,tweenMethod:"linearNone",tween:!0,target:23,key:"x",index:0},{value:354,tweenMethod:"linearNone",tween:!0,target:23,key:"x",index:15},{value:424,tweenMethod:"linearNone",tween:!0,target:23,key:"x",index:20},{value:424,tweenMethod:"linearNone",tween:!0,target:23,key:"x",index:21}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:23,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:23,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:23,key:"alpha",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:23,key:"alpha",index:21}]}},{target:24,keyframes:{y:[{value:631,tweenMethod:"linearNone",tween:!0,target:24,key:"y",index:0},{value:631,tweenMethod:"linearNone",tween:!0,target:24,key:"y",index:15},{value:657,tweenMethod:"linearNone",tween:!0,target:24,key:"y",index:20}],x:[{value:350,tweenMethod:"linearNone",tween:!0,target:24,key:"x",index:0},{value:350,tweenMethod:"linearNone",tween:!0,target:24,key:"x",index:15},{value:460,tweenMethod:"linearNone",tween:!0,target:24,key:"x",index:20},{value:460,tweenMethod:"linearNone",tween:!0,target:24,key:"x",index:21}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:24,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:24,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:24,key:"alpha",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:24,key:"alpha",index:21}]}},{target:25,keyframes:{y:[{value:624,tweenMethod:"linearNone",tween:!0,target:25,key:"y",index:0},{value:624,tweenMethod:"linearNone",tween:!0,target:25,key:"y",index:15},{value:534,tweenMethod:"linearNone",tween:!0,target:25,key:"y",index:20}],x:[{value:349,tweenMethod:"linearNone",tween:!0,target:25,key:"x",index:0},{value:349,tweenMethod:"linearNone",tween:!0,target:25,key:"x",index:15},{value:353,tweenMethod:"linearNone",tween:!0,target:25,key:"x",index:20},{value:353,tweenMethod:"linearNone",tween:!0,target:25,key:"x",index:21}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:25,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:25,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:25,key:"alpha",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:25,key:"alpha",index:21}]}},{target:26,keyframes:{y:[{value:636,tweenMethod:"linearNone",tween:!0,target:26,key:"y",index:0},{value:636,tweenMethod:"linearNone",tween:!0,target:26,key:"y",index:15},{value:648,tweenMethod:"linearNone",tween:!0,target:26,key:"y",index:20}],x:[{value:357,tweenMethod:"linearNone",tween:!0,target:26,key:"x",index:0},{value:357,tweenMethod:"linearNone",tween:!0,target:26,key:"x",index:15},{value:250,tweenMethod:"linearNone",tween:!0,target:26,key:"x",index:20},{value:250,tweenMethod:"linearNone",tween:!0,target:26,key:"x",index:21}],scaleY:[{value:1,tweenMethod:"linearNone",tween:!0,target:26,key:"scaleY",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:26,key:"scaleY",index:20}],scaleX:[{value:1,tweenMethod:"linearNone",tween:!0,target:26,key:"scaleX",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:26,key:"scaleX",index:20}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:26,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:26,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:26,key:"alpha",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:26,key:"alpha",index:21}]}},{target:28,keyframes:{y:[{value:636,tweenMethod:"linearNone",tween:!0,target:28,key:"y",index:0},{value:636,tweenMethod:"linearNone",tween:!0,target:28,key:"y",index:15},{value:580.5,tweenMethod:"linearNone",tween:!0,target:28,key:"y",index:20}],x:[{value:356,tweenMethod:"linearNone",tween:!0,target:28,key:"x",index:0},{value:356,tweenMethod:"linearNone",tween:!0,target:28,key:"x",index:15},{value:417,tweenMethod:"linearNone",tween:!0,target:28,key:"x",index:20},{value:417,tweenMethod:"linearNone",tween:!0,target:28,key:"x",index:21}],scaleY:[{value:1,tweenMethod:"linearNone",tween:!0,target:28,key:"scaleY",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:28,key:"scaleY",index:20}],scaleX:[{value:1,tweenMethod:"linearNone",tween:!0,target:28,key:"scaleX",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:28,key:"scaleX",index:20}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:28,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:28,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:28,key:"alpha",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:28,key:"alpha",index:21}]}},{target:29,keyframes:{y:[{value:638,tweenMethod:"linearNone",tween:!0,target:29,key:"y",index:0},{value:638,tweenMethod:"linearNone",tween:!0,target:29,key:"y",index:15},{value:690,tweenMethod:"linearNone",tween:!0,target:29,key:"y",index:20}],x:[{value:355,tweenMethod:"linearNone",tween:!0,target:29,key:"x",index:0},{value:355,tweenMethod:"linearNone",tween:!0,target:29,key:"x",index:15},{value:299,tweenMethod:"linearNone",tween:!0,target:29,key:"x",index:20},{value:299,tweenMethod:"linearNone",tween:!0,target:29,key:"x",index:21}],scaleX:[{value:1,tweenMethod:"linearNone",tween:!0,target:29,key:"scaleX",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:29,key:"scaleX",index:20}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:29,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:29,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:29,key:"alpha",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:29,key:"alpha",index:21}]}},{target:30,keyframes:{y:[{value:634,tweenMethod:"linearNone",tween:!0,target:30,key:"y",index:0},{value:634,tweenMethod:"linearNone",tween:!0,target:30,key:"y",index:15},{value:642,tweenMethod:"linearNone",tween:!0,target:30,key:"y",index:20}],x:[{value:351,tweenMethod:"linearNone",tween:!0,target:30,key:"x",index:0},{value:351,tweenMethod:"linearNone",tween:!0,target:30,key:"x",index:15},{value:421,tweenMethod:"linearNone",tween:!0,target:30,key:"x",index:20},{value:421,tweenMethod:"linearNone",tween:!0,target:30,key:"x",index:21}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:30,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:30,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:30,key:"alpha",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:30,key:"alpha",index:21}]}},{target:31,keyframes:{y:[{value:639,tweenMethod:"linearNone",tween:!0,target:31,key:"y",index:0},{value:639,tweenMethod:"linearNone",tween:!0,target:31,key:"y",index:15},{value:579,tweenMethod:"linearNone",tween:!0,target:31,key:"y",index:20}],x:[{value:355,tweenMethod:"linearNone",tween:!0,target:31,key:"x",index:0},{value:355,tweenMethod:"linearNone",tween:!0,target:31,key:"x",index:15},{value:282.5,tweenMethod:"linearNone",tween:!0,target:31,key:"x",index:20},{value:282.5,tweenMethod:"linearNone",tween:!0,target:31,key:"x",index:21}],scaleY:[{value:1,tweenMethod:"linearNone",tween:!0,target:31,key:"scaleY",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:31,key:"scaleY",index:20}],scaleX:[{value:1,tweenMethod:"linearNone",tween:!0,target:31,key:"scaleX",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:31,key:"scaleX",index:20}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:31,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:31,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:31,key:"alpha",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:31,key:"alpha",index:21}]}},{target:32,keyframes:{y:[{value:623,tweenMethod:"linearNone",tween:!0,target:32,key:"y",index:0},{value:623,tweenMethod:"linearNone",tween:!0,target:32,key:"y",index:15},{value:707.5,tweenMethod:"linearNone",tween:!0,target:32,key:"y",index:20}],x:[{value:351,tweenMethod:"linearNone",tween:!0,target:32,key:"x",index:0},{value:351,tweenMethod:"linearNone",tween:!0,target:32,key:"x",index:15},{value:345,tweenMethod:"linearNone",tween:!0,target:32,key:"x",index:20},{value:345,tweenMethod:"linearNone",tween:!0,target:32,key:"x",index:21}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:32,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:32,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:32,key:"alpha",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:32,key:"alpha",index:21}]}},{target:33,keyframes:{y:[{value:623,tweenMethod:"linearNone",tween:!0,target:33,key:"y",index:0},{value:623,tweenMethod:"linearNone",tween:!0,target:33,key:"y",index:15},{value:690,tweenMethod:"linearNone",tween:!0,target:33,key:"y",index:20}],x:[{value:351,tweenMethod:"linearNone",tween:!0,target:33,key:"x",index:0},{value:351,tweenMethod:"linearNone",tween:!0,target:33,key:"x",index:15},{value:257,tweenMethod:"linearNone",tween:!0,target:33,key:"x",index:20},{value:257,tweenMethod:"linearNone",tween:!0,target:33,key:"x",index:21}],alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:33,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:33,key:"alpha",index:15},{value:1,tweenMethod:"linearNone",tween:!0,target:33,key:"alpha",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:33,key:"alpha",index:21}]}}],name:"ani2",id:2,frameRate:24,action:0}],loadList:["Main/bga.png","Main/caidai-1-1.png","Main/caidai-1-10.png","Main/caidai-1-2.png","Main/caidai-1-3.png","Main/caidai-1-4.png","Main/caidai-1-5.png","Main/caidai-1-6.png","Main/caidai-1-7.png","Main/caidai-1-8.png","Main/caidai-1-9.png"],loadList3D:[]},e.GunUpgradeUI=u,xe("ui.GunUpgradeUI",u);class y extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(y.uiView)}}y.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:0,x:0,top:0,skin:"Main/bga.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:218,x:70,skin:"Main/shezhi-1-2.png",name:"dialog"},compId:4,child:[{type:"Image",props:{y:95,x:187,skin:"Main/renwugonglue.png",name:"title"},compId:6},{type:"Button",props:{y:21,x:524,var:"btnClose",stateNum:1,skin:"Main/qiandao-1-2.png"},compId:18,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:19}]},{type:"Text",props:{y:190,x:59,wordWrap:!0,width:460,var:"txtDesc",valign:"top",text:"123",overflow:"scroll",leading:5,height:187,fontSize:35,font:"SimHei",color:"#ffffff",align:"left",runtime:"laya.display.Text"},compId:20}]}],loadList:["Main/bga.png","Main/shezhi-1-2.png","Main/renwugonglue.png","Main/qiandao-1-2.png"],loadList3D:[]},e.HintUI=y,xe("ui.HintUI",y);class m extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(m.uiView)}}m.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/bga.png",right:0,name:"bga",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:218,x:70,width:571,skin:"Main/huodetili-1-1.png",sizeGrid:"14,15,15,14",name:"dialog",height:409},compId:4,child:[{type:"Image",props:{y:-56,x:0,skin:"Main/huodetili-1-3.png"},compId:37},{type:"Image",props:{y:19.5,x:8.5,width:554,skin:"Main/huodetili-1-2.png",sizeGrid:"11,15,12,11",height:370},compId:38},{type:"Image",props:{y:-45,x:30,skin:"Main/wubeishouyi.png",name:"title"},compId:6},{type:"Image",props:{y:328,x:186,skin:"Main/wubeishouyi-1-5.png",scaleY:1,scaleX:1,name:"clock"},compId:12},{type:"Text",props:{y:336,x:232,width:160,var:"txtTime",valign:"middle",text:"03:20",fontSize:30,color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:13},{type:"Text",props:{y:198,x:89,width:400,var:"desc",valign:"middle",text:"获得200秒加速时间",fontSize:30,color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:14},{type:"Box",props:{y:268,x:50,width:479,var:"barList",height:16},compId:31,child:[{type:"ProgressBar",props:{value:1,skin:"Main/wubeishouyi-1-1.png"},compId:30},{type:"ProgressBar",props:{x:49,value:1,skin:"Main/wubeishouyi-1-1.png"},compId:15},{type:"ProgressBar",props:{y:1,x:99,value:1,skin:"Main/wubeishouyi-1-1.png"},compId:18},{type:"ProgressBar",props:{y:1,x:148,value:1,skin:"Main/wubeishouyi-1-1.png"},compId:11},{type:"ProgressBar",props:{y:1,x:197,skin:"Main/wubeishouyi-1-1.png"},compId:23},{type:"ProgressBar",props:{y:1,x:247,value:0,skin:"Main/wubeishouyi-1-1.png"},compId:25},{type:"ProgressBar",props:{y:1,x:296,value:0,skin:"Main/wubeishouyi-1-1.png"},compId:26},{type:"ProgressBar",props:{y:1,x:345,value:0,skin:"Main/wubeishouyi-1-1.png"},compId:27},{type:"ProgressBar",props:{y:1,x:395,value:0,skin:"Main/wubeishouyi-1-1.png"},compId:28},{type:"ProgressBar",props:{y:1,x:444,value:0,skin:"Main/wubeishouyi-1-1.png"},compId:29}]}]},{type:"Box",props:{y:840,x:239,width:242,var:"moveBox",height:140},compId:35,child:[{type:"Button",props:{y:52,width:297,var:"btnOk",stateNum:1,skin:"Main/wubeishouyi-1.png",scaleY:.8,scaleX:.8,pivotY:52,pivotX:149,height:103,centerX:-1},compId:10,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:33}]},{type:"Button",props:{y:103,x:74,width:92,var:"btnClose",stateNum:1,skin:"Main/fanhui-1.png",height:37},compId:5,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:34}]}]}],loadList:["Main/bga.png","Main/huodetili-1-1.png","Main/huodetili-1-3.png","Main/huodetili-1-2.png","Main/wubeishouyi.png","Main/wubeishouyi-1-5.png","Main/wubeishouyi-1-1.png","Main/wubeishouyi-1.png","Main/fanhui-1.png"],loadList3D:[]},e.IncomeBoostUI=m,xe("ui.IncomeBoostUI",m);class _ extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(_.uiView)}}_.uiView={type:"Scene",props:{y:0,width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Load/-1.png",right:0,name:"bg",left:0,bottom:0},compId:8},{type:"Image",props:{y:212,x:115,skin:"Load/logo.png",name:"logo"},compId:7},{type:"ProgressBar",props:{y:950,x:360,var:"progressBar",skin:"Load/jiazai-1-5.png",anchorY:.5,anchorX:.5},compId:5,child:[{type:"Text",props:{y:-60,x:188,width:160,var:"progressVal",valign:"middle",text:"100%",height:40,fontSize:40,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:6}]}],loadList:["Load/-1.png","Load/logo.png","Load/jiazai-1-5.png"],loadList3D:[]},e.LoadingUI=_,xe("ui.LoadingUI",_);class I extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(I.uiView)}}I.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/bga.png",right:0,name:"bga",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:11},{type:"Box",props:{y:90,x:0,width:720,height:720},compId:13,child:[{type:"Image",props:{y:360,x:360,var:"dial",skin:"Main/choujiang-1-1.png",rotation:0,height:780,centerX:0,bottom:-30,anchorY:.5,anchorX:.5},compId:3,child:[{type:"Box",props:{y:390,x:360,width:100,pivotY:193,pivotX:50,name:"reward1",height:100},compId:19,child:[{type:"Image",props:{name:"skin",centerY:10,centerX:0},compId:28},{type:"Text",props:{y:4,x:-16,wordWrap:!0,width:133,valign:"top",text:"100",name:"name",height:22,fontSize:22,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:43}]},{type:"Box",props:{y:390,x:360,width:100,rotation:60,pivotY:193,pivotX:50,name:"reward2",height:100},compId:23,child:[{type:"Image",props:{x:0,name:"skin",centerY:25,centerX:0},compId:63},{type:"Text",props:{y:4,x:-16,wordWrap:!0,width:133,valign:"top",text:"100",name:"name",height:22,fontSize:22,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:68}]},{type:"Box",props:{y:390,x:360,width:100,rotation:120,pivotY:193,pivotX:50,name:"reward3",height:100},compId:24,child:[{type:"Image",props:{x:0,name:"skin",centerY:25,centerX:0},compId:64},{type:"Text",props:{y:4,x:-16,wordWrap:!0,width:133,valign:"top",text:"100",name:"name",height:22,fontSize:22,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:69}]},{type:"Box",props:{y:390,x:360,width:100,rotation:180,pivotY:193,pivotX:50,name:"reward4",height:100},compId:25,child:[{type:"Image",props:{x:0,name:"skin",centerY:25,centerX:0},compId:65},{type:"Text",props:{y:4,x:-16,wordWrap:!0,width:133,valign:"top",text:"100",name:"name",height:22,fontSize:22,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:70}]},{type:"Box",props:{y:390,x:360,width:100,rotation:240,pivotY:193,pivotX:50,name:"reward5",height:100},compId:26,child:[{type:"Image",props:{x:0,name:"skin",centerY:25,centerX:0},compId:66},{type:"Text",props:{y:4,x:-16,wordWrap:!0,width:133,valign:"top",text:"100",name:"name",height:22,fontSize:22,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:71}]},{type:"Box",props:{y:390,x:360,width:100,rotation:300,pivotY:193,pivotX:50,name:"reward6",height:100},compId:27,child:[{type:"Image",props:{x:0,name:"skin",centerY:25,centerX:0},compId:67},{type:"Text",props:{y:4,x:-16,wordWrap:!0,width:133,valign:"top",text:"100",name:"name",height:22,fontSize:22,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:72}]}]},{type:"Image",props:{x:313,skin:"Main/choujiang-1-6.png",name:"pointer",centerY:-25,centerX:0},compId:10},{type:"Image",props:{y:38,skin:"Main/choujiang-1-2.png",left:0,centerY:0},compId:12},{type:"Image",props:{skin:"Main/choujiang-1-3.png",right:0,centerY:0},compId:14}]},{type:"Box",props:{y:823,x:82,width:555,var:"moveBox",height:157},compId:54,child:[{type:"Button",props:{y:47,x:126,width:252,var:"btnVideo",stateNum:1,skin:"Main/choujiang-1-4.png",height:94,anchorY:.5,anchorX:.5},compId:15,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:52}]},{type:"Button",props:{x:303,width:252,var:"btnUseDiamond",stateNum:1,skin:"Main/choujiang-1-5.png",height:94},compId:16,child:[{type:"Text",props:{y:35,x:101,width:100,var:"txtDiamond",valign:"middle",text:"0",fontSize:40,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:49},{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:51}]},{type:"Button",props:{y:110,x:231,width:92,var:"btnClose",stateNum:1,skin:"Main/fanhui-1.png",height:37},compId:17,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:53}]}]}],loadList:["Main/bga.png","Main/choujiang-1-1.png","Main/choujiang-1-6.png","Main/choujiang-1-2.png","Main/choujiang-1-3.png","Main/choujiang-1-4.png","Main/choujiang-1-5.png","Main/fanhui-1.png"],loadList3D:[]},e.LotteryUI=I,xe("ui.LotteryUI",I);class w extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(w.uiView)}}w.uiView={type:"Scene",props:{width:720,visible:!0,height:1280},compId:2,child:[{type:"Image",props:{y:640,x:360,top:0,skin:"Main/shouye-1-21.png",skewX:180,right:0,name:"bg",left:0,bottom:0,anchorY:.5,anchorX:.5},compId:58},{type:"Button",props:{y:0,x:0,var:"btnTouchArea",top:0,stateNum:1,right:0,left:0,bottom:0},compId:60},{type:"Image",props:{y:610,x:0,var:"panelCmb",skin:"Main/qiangshou-1-8.png",height:532,bottom:138},compId:54,child:[{type:"List",props:{y:0,x:0,width:722,var:"gunList",spaceY:0,spaceX:0,repeatY:4,repeatX:3,height:531},compId:65,child:[{type:"Box",props:{y:0,x:0,width:240,name:"render",height:135},compId:66,child:[{type:"Image",props:{y:100,x:200,width:40,visible:!0,skin:"Main/qiangshou-1-7.png",name:"polygon",height:35},compId:144},{type:"FontClip",props:{y:106,x:205,width:30,value:"19",skin:"Main/43.png",sheet:"0123456789",name:"level",height:23,align:"center"},compId:149},{type:"Box",props:{y:3,x:1,width:240,name:"container",height:129},compId:158,child:[{type:"Image",props:{y:77,x:79,name:"skinBg",centerY:0,centerX:0},compId:67},{type:"Image",props:{y:77,x:79,name:"skin",centerY:0,centerX:0},compId:73}]},{type:"Script",props:{runtime:"views/comp/GunDragItem.ts"},compId:70}]},{type:"Script",props:{runtime:"views/comp/GunDragList.ts"},compId:141}]}]},{type:"Box",props:{y:1152,x:0,width:720,var:"bottomPanel",right:0,left:0,height:128,bottom:0},compId:53,child:[{type:"Button",props:{x:512,var:"btnShop",stateNum:1,skin:"Main/youhua-1-17.png",bottom:2},compId:30,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:125},{type:"Image",props:{y:1,x:50,skin:"Main/tag.png",name:"tag",anchorY:.5,anchorX:.5},compId:139}]},{type:"Button",props:{x:124,var:"btnSpeedup",stateNum:1,skin:"Main/youhua-1-14.png",bottom:2},compId:34,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:126}]},{type:"Button",props:{x:235,var:"btnBuy",stateNum:1,skin:"Main/youhua-1-13.png",bottom:2},compId:46,child:[{type:"Text",props:{y:77,x:90,width:120,var:"txtGunPrice",valign:"middle",text:"100",height:30,fontSize:30,color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:153},{type:"Image",props:{y:44,x:116,var:"imgGun",anchorY:.5,anchorX:.5},compId:154},{type:"Script",props:{y:0,x:0,runtime:"views/comp/ButtonScript.ts"},compId:120},{type:"Image",props:{y:9,x:213,width:40,var:"imgPolygon",skin:"Main/qiangshou-1-7.png",height:35},compId:179},{type:"FontClip",props:{y:14,x:218,width:30,var:"fcGunLevel",value:"19",skin:"Main/43.png",sheet:"0123456789",height:23,align:"center"},compId:181}]},{type:"Button",props:{x:633,var:"btnRecycle",stateNum:1,skin:"Main/youhua-1-15.png",bottom:15},compId:50,child:[{type:"Script",props:{runtime:"views/comp/RecycleItem.ts"},compId:74}]},{type:"Button",props:{x:14,var:"btnFree",stateNum:1,skin:"Main/youhua-1-16.png",bottom:2},compId:151,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:152}]}]},{type:"Image",props:{y:0,var:"gunModel",right:0,left:0,height:1280},compId:137},{type:"Box",props:{y:40,x:40,name:"topPanel"},compId:56,child:[{type:"Image",props:{skin:"Main/shouye-1-1.png",name:"power",sizeGrid:"0,40,0,119"},compId:5,child:[{type:"Image",props:{y:12,x:18,skin:"Main/shouye-1-2.png",name:"icon"},compId:6},{type:"Text",props:{y:15,x:50,width:115,var:"txtEnergy",valign:"middle",text:"0",height:30,fontSize:30,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:79},{type:"Text",props:{y:54,x:15,width:74,var:"txtPowerRecTime",valign:"middle",text:"00:00",height:31,fontSize:30,color:"#03fb7a",align:"right",runtime:"laya.display.Text"},compId:61,child:[{type:"Image",props:{y:5.5,x:79,skin:"Main/tili-1-4.png"},compId:63}]}]},{type:"Image",props:{x:455,skin:"Main/shouye-1-1.png",name:"coin",sizeGrid:"0,40,0,119"},compId:8,child:[{type:"Image",props:{y:12,x:10,skin:"Main/shouye-1-3.png",name:"icon"},compId:9},{type:"Text",props:{y:15,x:56,width:115,var:"txtCoin",valign:"middle",text:"0",height:30,fontSize:30,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:76},{type:"Text",props:{y:57,x:25,width:160,var:"txtMoneySpeed",valign:"middle",text:"+1.5K/秒",height:31,fontSize:25,font:"Microsoft YaHei",color:"#ddcd47",align:"left",runtime:"laya.display.Text"},compId:185}]},{type:"Image",props:{x:216,width:200,skin:"Main/shouye-1-1.png",name:"diamond",sizeGrid:"0,40,0,119"},compId:11,child:[{type:"Image",props:{y:12,x:10,skin:"Main/shouye-1-4.png",name:"icon"},compId:12},{type:"Text",props:{y:15,x:56,width:115,var:"txtDiamond",valign:"middle",text:"0",height:30,fontSize:30,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:77},{type:"Button",props:{y:8,x:172,var:"btnDiamond",stateNum:1,skin:"Main/shouye-1-5.png"},compId:14,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:132}]}]}]},{type:"Button",props:{y:143.5,var:"btnSign",stateNum:1,skin:"Main/zhujiemian-1-3.png",name:"",left:20},compId:20,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:127},{type:"Image",props:{y:-4.5,x:36.5,skin:"Main/red-dot.png",name:"dot"},compId:134}]},{type:"Button",props:{y:250,visible:!1,var:"btnRank",stateNum:1,skin:"Main/shouye-1-9-2.png",centerX:-333},compId:21,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:128}]},{type:"Button",props:{y:260,var:"btnAchievement",stateNum:1,skin:"Main/zhujiemian-1-2.png",name:"",left:20},compId:22,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:129},{type:"Image",props:{y:-4,x:36,skin:"Main/red-dot.png",name:"dot"},compId:136}]},{type:"Button",props:{y:371.5,var:"btnSetting",stateNum:1,skin:"Main/zhujiemian-1-1.png",left:20},compId:23,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:130}]},{type:"Button",props:{y:134,x:-263,var:"btnMenu",stateNum:1,skin:"Main/qiangshou-1-6.png"},compId:24,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:131},{type:"Image",props:{y:-4,x:36,skin:"Main/red-dot.png",name:"dot"},compId:135}]},{type:"Image",props:{y:140,x:0,width:70,visible:!1,var:"menu",skin:"Main/shouye-1-9.png",height:333,sizeGrid:"5,5,5,5"},compId:19},{type:"Button",props:{y:153.5,var:"btnDaily",stateNum:1,skin:"Main/qiangshou-1-1.png",scaleY:.8,scaleX:.8,right:20},compId:159,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:175}]},{type:"Button",props:{y:390,x:508,visible:!1,var:"btnFriendHelp",stateNum:1,skin:"Main/youhua-1-4.png",right:0},compId:172,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:173}]},{type:"Button",props:{y:285,var:"btnLottery",stateNum:1,skin:"Main/qiangshou-1-2.png",right:26},compId:25,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:122}]},{type:"Button",props:{y:415.5,var:"btnGetEnergy",stateNum:1,skin:"Main/qiangshou-1-3.png",right:26},compId:171,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:174}]},{type:"Button",props:{x:154,var:"btnSkin",stateNum:1,skin:"Main/qiangshou-1-4.png",bottom:795},compId:26,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:123}]},{type:"Button",props:{x:213,var:"btnStart",stateNum:1,skin:"Main/qiangshou-1-5.png",labelSize:50,labelColors:"#ffffff",bottom:670},compId:3,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:121},{type:"Text",props:{y:14,x:107,width:100,visible:!1,var:"txtLevel",valign:"middle",text:"第1关",fontSize:25,color:"#46f4c9",align:"right",runtime:"laya.display.Text"},compId:170}]},{type:"Sprite",props:{y:684,x:261,visible:!1,var:"starEffect"},compId:110,child:[{type:"Image",props:{skin:"Main/yindao-1-10.png"},compId:111},{type:"Image",props:{y:0,x:0,skin:"Main/yindao-1-11.png"},compId:113},{type:"Image",props:{y:0,x:0,skin:"Main/yindao-1-12.png"},compId:114},{type:"Image",props:{y:0,x:0,skin:"Main/yindao-1-13.png"},compId:115},{type:"Image",props:{y:0,x:0,skin:"Main/yindao-1-14.png"},compId:116},{type:"Image",props:{y:0,x:0,skin:"Main/yindao-1-15.png"},compId:117},{type:"Image",props:{y:0,x:0,skin:"Main/yindao-1-16.png"},compId:118}]},{type:"Image",props:{y:120,x:164,visible:!1,skin:"Load/logo.png",scaleY:.8,scaleX:.8,name:"logol"},compId:138},{type:"Box",props:{y:0,x:-150,width:150,var:"floatBox",height:202},compId:166,child:[{type:"Button",props:{y:101,x:75,width:150,var:"btnFloatAirDrop",stateNum:1,skin:"Main/kongtou-2.png",height:202,anchorY:.5,anchorX:.5},compId:163},{type:"Script",props:{runtime:"views/comp/FloatScript.ts"},compId:167}]},{type:"Box",props:{x:280,width:160,bottom:798},compId:178,child:[{type:"Image",props:{y:45,x:6,skin:"Main/up.png",scaleY:.5,scaleX:.5,name:"up"},compId:176},{type:"Image",props:{y:1.5,x:5,skin:"Main/time.png",scaleY:.4,scaleX:.4,name:"time"},compId:177},{type:"Text",props:{y:13,x:49,var:"txtIncomeSpeedUp",text:"加速x100%",strokeColor:"#000000",stroke:2,fontSize:20,font:"Microsoft YaHei",color:"#ffffff",runtime:"laya.display.Text"},compId:183},{type:"Text",props:{y:57,x:49,var:"txtIncomeAmountUp",text:"收益x100%",strokeColor:"#000000",stroke:2,fontSize:20,font:"Microsoft YaHei",color:"#ffffff",runtime:"laya.display.Text"},compId:182}]}],animations:[{nodes:[{target:111,keyframes:{y:[{value:0,tweenMethod:"linearNone",tween:!0,target:111,key:"y",index:0},{value:-53.5,tweenMethod:"linearNone",tween:!0,target:111,key:"y",index:7}],x:[{value:0,tweenMethod:"linearNone",tween:!0,target:111,key:"x",index:0},{value:-37,tweenMethod:"linearNone",tween:!0,target:111,key:"x",index:7}]}},{target:113,keyframes:{y:[{value:0,tweenMethod:"linearNone",tween:!0,target:113,key:"y",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:113,key:"y",index:7}],x:[{value:0,tweenMethod:"linearNone",tween:!0,target:113,key:"x",index:0},{value:-66,tweenMethod:"linearNone",tween:!0,target:113,key:"x",index:7}]}},{target:114,keyframes:{y:[{value:0,tweenMethod:"linearNone",tween:!0,target:114,key:"y",index:0},{value:52,tweenMethod:"linearNone",tween:!0,target:114,key:"y",index:7}],x:[{value:0,tweenMethod:"linearNone",tween:!0,target:114,key:"x",index:0},{value:-51.5,tweenMethod:"linearNone",tween:!0,target:114,key:"x",index:7}]}},{target:115,keyframes:{y:[{value:0,tweenMethod:"linearNone",tween:!0,target:115,key:"y",index:0},{value:66.5,tweenMethod:"linearNone",tween:!0,target:115,key:"y",index:7}],x:[{value:0,tweenMethod:"linearNone",tween:!0,target:115,key:"x",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:115,key:"x",index:7}]}},{target:116,keyframes:{y:[{value:0,tweenMethod:"linearNone",tween:!0,target:116,key:"y",index:0},{value:37.5,tweenMethod:"linearNone",tween:!0,target:116,key:"y",index:7}],x:[{value:0,tweenMethod:"linearNone",tween:!0,target:116,key:"x",index:0},{value:61.5,tweenMethod:"linearNone",tween:!0,target:116,key:"x",index:7}]}},{target:117,keyframes:{y:[{value:0,tweenMethod:"linearNone",tween:!0,target:117,key:"y",index:0},{value:-24.5,tweenMethod:"linearNone",tween:!0,target:117,key:"y",index:7}],x:[{value:0,tweenMethod:"linearNone",tween:!0,target:117,key:"x",index:0},{value:66,tweenMethod:"linearNone",tween:!0,target:117,key:"x",index:7}]}},{target:118,keyframes:{y:[{value:0,tweenMethod:"linearNone",tween:!0,target:118,key:"y",index:0},{value:-68,tweenMethod:"linearNone",tween:!0,target:118,key:"y",index:7}],x:[{value:0,tweenMethod:"linearNone",tween:!0,target:118,key:"x",index:0},{value:18.5,tweenMethod:"linearNone",tween:!0,target:118,key:"x",index:7}]}}],name:"ani3",id:3,frameRate:24,action:0},{nodes:[{target:139,keyframes:{x:[{value:50,tweenMethod:"linearNone",tween:!0,target:139,key:"x",index:0},{value:50,tweenMethod:"linearNone",tween:!0,target:139,key:"x",index:10},{value:50,tweenMethod:"linearNone",tween:!0,target:139,key:"x",index:20},{value:50,tweenMethod:"linearNone",tween:!0,target:139,key:"x",index:26}],scaleY:[{value:1,tweenMethod:"linearNone",tween:!0,target:139,key:"scaleY",index:0},{value:.8,tweenMethod:"linearNone",tween:!0,target:139,key:"scaleY",index:10},{value:1,tweenMethod:"linearNone",tween:!0,target:139,key:"scaleY",index:20}],scaleX:[{value:1,tweenMethod:"linearNone",tween:!0,target:139,key:"scaleX",index:0},{value:.8,tweenMethod:"linearNone",tween:!0,target:139,key:"scaleX",index:10},{value:1,tweenMethod:"linearNone",tween:!0,target:139,key:"scaleX",index:20}]}}],name:"ani4",id:4,frameRate:24,action:0},{nodes:[{target:163,keyframes:{x:[{value:75,tweenMethod:"linearNone",tween:!0,target:163,key:"x",index:0},{value:75,tweenMethod:"linearNone",tween:!0,target:163,key:"x",index:24},{value:75,tweenMethod:"linearNone",tween:!0,target:163,key:"x",index:48}],rotation:[{value:-15,tweenMethod:"linearNone",tween:!0,target:163,key:"rotation",index:0},{value:15,tweenMethod:"linearNone",tween:!0,target:163,key:"rotation",index:24},{value:-15,tweenMethod:"linearNone",tween:!0,target:163,key:"rotation",index:48}]}}],name:"ani5",id:5,frameRate:24,action:0}],loadList:["Main/shouye-1-21.png","Main/qiangshou-1-8.png","Main/qiangshou-1-7.png","Main/43.png","Main/youhua-1-17.png","Main/tag.png","Main/youhua-1-14.png","Main/youhua-1-13.png","Main/youhua-1-15.png","Main/youhua-1-16.png","Main/shouye-1-1.png","Main/shouye-1-2.png","Main/tili-1-4.png","Main/shouye-1-3.png","Main/shouye-1-4.png","Main/shouye-1-5.png","Main/zhujiemian-1-3.png","Main/red-dot.png","Main/shouye-1-9-2.png","Main/zhujiemian-1-2.png","Main/zhujiemian-1-1.png","Main/qiangshou-1-6.png","Main/shouye-1-9.png","Main/qiangshou-1-1.png","Main/youhua-1-4.png","Main/qiangshou-1-2.png","Main/qiangshou-1-3.png","Main/qiangshou-1-4.png","Main/qiangshou-1-5.png","Main/yindao-1-10.png","Main/yindao-1-11.png","Main/yindao-1-12.png","Main/yindao-1-13.png","Main/yindao-1-14.png","Main/yindao-1-15.png","Main/yindao-1-16.png","Load/logo.png","Main/kongtou-2.png","Main/up.png","Main/time.png"],loadList3D:[]},e.MainUI=w,xe("ui.MainUI",w);class f extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(f.uiView)}}f.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:0,x:0,top:0,skin:"Main/bga.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:200,x:70,skin:"Main/qiandao-1-1.png",rotation:0,name:"dialog"},compId:4,child:[{type:"Image",props:{y:98,x:187,skin:"Main/lijishiyong-1.png",name:"title"},compId:5},{type:"Button",props:{y:0,x:0,var:"btnClose",top:20,stateNum:1,skin:"Main/qiandao-1-2.png",right:15},compId:6,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:7}]},{type:"List",props:{y:210,x:0,width:575,var:"gunList",spaceY:40,repeatX:1,height:678,elasticEnabled:!0,centerX:0},compId:11,child:[{type:"Box",props:{y:0,x:7,width:560,name:"render",height:165},compId:12,child:[{type:"Image",props:{y:0,x:0,width:649,skin:"Main/shangdian-1-2.png",scaleY:.86,scaleX:.86,name:"bg",height:191},compId:33},{type:"Box",props:{y:41,width:590,scaleY:.86,scaleX:.86,name:"skinFrame",height:140,centerX:0},compId:34,child:[{type:"Image",props:{y:73,x:210,pivotX:0,name:"skin",centerY:0,centerX:0},compId:40}]},{type:"Text",props:{y:11,x:15,valign:"middle",text:"巴雷特冲锋枪",scaleY:.86,scaleX:.86,name:"name",fontSize:25,font:"Microsoft YaHei",color:"#304453",bold:!0,align:"center",runtime:"laya.display.Text"},compId:38},{type:"FontClip",props:{y:56,x:48,width:27,value:"1",skin:"Main/shangdian-1-6.png",sheet:"0123456789",scaleY:.86,scaleX:.86,name:"level",height:17},compId:39}]},{type:"Sprite",props:{y:0,x:0,width:575,renderType:"mask",name:"mask",height:677},compId:26,child:[{type:"Poly",props:{y:0,x:0,points:"0,0,0,649,515,649,575,591,575,0",lineWidth:1,lineColor:"#ff0000",fillColor:"#00ffff"},compId:27}]}]},{type:"Button",props:{y:932,x:287,var:"btnShowoff",stateNum:1,skin:"Main/huode-1-2.png",anchorY:.5,anchorX:.5},compId:45,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:46}]}]}],loadList:["Main/bga.png","Main/qiandao-1-1.png","Main/lijishiyong-1.png","Main/qiandao-1-2.png","Main/shangdian-1-2.png","Main/shangdian-1-6.png","Main/huode-1-2.png"],loadList3D:[]},e.NewRewardUI=f,xe("ui.NewRewardUI",f);class x extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(x.uiView)}}x.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:0,x:0,top:0,skin:"Main/bga.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:218,x:70,skin:"Main/qiandao-1-1.png",rotation:0,name:"dialog"},compId:4,child:[{type:"Image",props:{y:98,x:157,skin:"Main/huode-1-1.png",name:"title"},compId:5},{type:"Button",props:{y:0,x:0,var:"btnClose",top:20,stateNum:1,skin:"Main/qiandao-1-2.png",right:15},compId:6,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:7}]},{type:"Box",props:{y:200,x:210,width:160,height:160},compId:8,child:[{type:"Image",props:{var:"icon",centerY:0,centerX:0},compId:9}]},{type:"Box",props:{y:420,x:30},compId:23,child:[{type:"Image",props:{x:2,skin:"Main/qieqiang-1-5.png"},compId:13},{type:"Image",props:{y:57,skin:"Main/qieqiang-1-7.png"},compId:14},{type:"Image",props:{y:114,x:1,skin:"Main/qieqiang-1-8.png"},compId:15},{type:"ProgressBar",props:{y:7,x:167,width:300,var:"barAtk",skin:"Main/qieqiang-1-9.png"},compId:16},{type:"ProgressBar",props:{y:64,x:167,width:300,var:"barAmmo",skin:"Main/qieqiang-1-9.png"},compId:17},{type:"ProgressBar",props:{y:121,x:167,width:300,var:"barReloadTime",skin:"Main/qieqiang-1-9.png"},compId:18},{type:"Text",props:{x:474,width:50,var:"txtAtk",valign:"middle",text:"10",fontSize:30,font:"Arial",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:19},{type:"Text",props:{y:57,x:474,width:50,var:"txtAmmo",valign:"middle",text:"10",fontSize:30,font:"Arial",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:20},{type:"Text",props:{y:114,x:474,width:50,var:"txtReloadTime",valign:"middle",text:"10",fontSize:30,font:"Arial",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:21}]},{type:"Button",props:{y:754,x:287.5,width:327,var:"btnShare",stateNum:1,skin:"Main/xuanyao.png",pivotY:55,pivotX:164,height:110},compId:11,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:38},{type:"Text",props:{y:55,x:157,width:161,var:"txtPrize",valign:"middle",text:"分享获得90",pivotY:20,pivotX:81,height:40,fontSize:40,font:"Microsoft YaHei",color:"#ffffff",align:"right",runtime:"laya.display.Text"},compId:25},{type:"Image",props:{y:31,x:237,width:56,skin:"Main/zs1.png",scaleY:1,scaleX:1,height:48},compId:24}]}]}],loadList:["Main/bga.png","Main/qiandao-1-1.png","Main/huode-1-1.png","Main/qiandao-1-2.png","Main/qieqiang-1-5.png","Main/qieqiang-1-7.png","Main/qieqiang-1-8.png","Main/qieqiang-1-9.png","Main/xuanyao.png","Main/zs1.png"],loadList3D:[]},e.NewWeaponUI=x,xe("ui.NewWeaponUI",x);class v extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(v.uiView)}}v.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/bga.png",right:0,name:"bga",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:381,x:77,width:568,visible:!0,skin:"Main/huodetili-1-1.png",sizeGrid:"14,15,14,14",name:"dialog",height:336},compId:6,child:[{type:"Image",props:{y:11,x:11,width:545,skin:"Main/huodetili-1-2.png",sizeGrid:"12,14,16,14",height:254},compId:28},{type:"Image",props:{y:-56,x:-2,skin:"Main/huodetili-1-3.png"},compId:30},{type:"Image",props:{y:-28,x:284,width:150,skin:"Main/lixianshouyi-1-1-1.png",pivotY:17,pivotX:75,name:"title",height:34},compId:8},{type:"Image",props:{y:118,x:237,width:394,skin:"Main/lixianjiangli-1-3.png",scaleY:1,scaleX:1,pivotY:191,pivotX:197,name:"icon",height:382},compId:18},{type:"Text",props:{y:118,x:312,width:160,var:"txtIncome",valign:"middle",text:"3.29B",height:30,fontSize:30,color:"#Fed947",bold:!0,align:"center",runtime:"laya.display.Text"},compId:21},{type:"Button",props:{y:429,x:269,width:154,var:"btnClose",stateNum:1,skin:"Main/lixianshouyi-1-4-1.png",pivotY:18,pivotX:77,height:35},compId:7,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:24}]},{type:"Text",props:{y:193,x:109,width:350,valign:"middle",text:"离线收益最多累计4小时",name:"desc",height:55,fontSize:30,color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:22}]},{type:"Box",props:{y:727,x:360,width:260,var:"moveBox",pivotY:53,pivotX:130,height:106},compId:25,child:[{type:"Button",props:{y:47,x:130,width:252,var:"btnOk",stateNum:1,skin:"Main/lixianshouyi-1-3-1.png",height:94,anchorY:.5,anchorX:.5},compId:20,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:23}]}]}],loadList:["Main/bga.png","Main/huodetili-1-1.png","Main/huodetili-1-2.png","Main/huodetili-1-3.png","Main/lixianshouyi-1-1-1.png","Main/lixianjiangli-1-3.png","Main/lixianshouyi-1-4-1.png","Main/lixianshouyi-1-3-1.png"],loadList3D:[]},e.OfflineIncomeUI=v,xe("ui.OfflineIncomeUI",v);class k extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(k.uiView)}}k.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/bga.png",right:0,name:"bga",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:34},{type:"Image",props:{y:142,x:72.5,skin:"Main/qiandao-1-1.png",name:"dialog"},compId:3,child:[{type:"Image",props:{y:95,skin:"Main/paihang-1-1.png",name:"title",centerX:0},compId:5},{type:"Box",props:{y:190,centerX:-9},compId:10,child:[{type:"Image",props:{y:4,x:21,width:503,skin:"Main/paihang-1-5-1.png",height:70,sizeGrid:"5,5,5,5"},compId:7},{type:"Image",props:{skin:"Main/paihang-1-5.png",sizeGrid:"10,10,10,10"},compId:6}]},{type:"Box",props:{y:276,centerX:-9},compId:11,child:[{type:"Image",props:{y:4,x:21,width:503,skin:"Main/paihang-1-5-1.png",height:70,sizeGrid:"5,5,5,5"},compId:12},{type:"Image",props:{skin:"Main/paihang-1-5.png",sizeGrid:"10,10,10,10"},compId:13}]},{type:"Box",props:{y:362,centerX:-9},compId:14,child:[{type:"Image",props:{y:4,x:21,width:503,skin:"Main/paihang-1-5-1.png",height:70,sizeGrid:"5,5,5,5"},compId:15},{type:"Image",props:{skin:"Main/paihang-1-5.png",sizeGrid:"10,10,10,10"},compId:16}]},{type:"Box",props:{y:448,centerX:-9},compId:17,child:[{type:"Image",props:{y:4,x:21,width:503,skin:"Main/paihang-1-5-1.png",height:70,sizeGrid:"5,5,5,5"},compId:18},{type:"Image",props:{skin:"Main/paihang-1-5.png",sizeGrid:"10,10,10,10"},compId:19}]},{type:"Box",props:{y:534,centerX:-9},compId:20,child:[{type:"Image",props:{y:4,x:21,width:503,skin:"Main/paihang-1-5-1.png",height:70,sizeGrid:"5,5,5,5"},compId:21},{type:"Image",props:{skin:"Main/paihang-1-5.png",sizeGrid:"10,10,10,10"},compId:22}]},{type:"Box",props:{y:620,centerX:-9},compId:23,child:[{type:"Image",props:{y:4,x:21,width:503,skin:"Main/paihang-1-5-1.png",height:70,sizeGrid:"5,5,5,5"},compId:24},{type:"Image",props:{skin:"Main/paihang-1-5.png",sizeGrid:"10,10,10,10"},compId:25}]},{type:"Box",props:{y:754,centerX:-9},compId:26,child:[{type:"Image",props:{y:4,x:21,width:503,skin:"Main/paihang-1-5-1.png",height:70,sizeGrid:"5,5,5,5"},compId:27},{type:"Image",props:{skin:"Main/paihang-1-5.png",sizeGrid:"10,10,10,10"},compId:28}]},{type:"Button",props:{y:706,x:125,var:"btnLeft",stateNum:1,skin:"Main/qieqiang-1-1.png"},compId:32,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:45}]},{type:"Button",props:{y:746,x:441,var:"btnRight",stateNum:1,skin:"Main/qieqiang-1-1.png",rotation:180,anchorY:0,anchorX:0},compId:33,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:46}]}]},{type:"Box",props:{y:1022,x:311,width:100,var:"moveBox",height:50},compId:48,child:[{type:"Button",props:{y:3,x:4,width:92,var:"btnClose",stateNum:1,skin:"Main/fanhui-1.png",height:37},compId:4,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:47}]}]}],loadList:["Main/bga.png","Main/qiandao-1-1.png","Main/paihang-1-1.png","Main/paihang-1-5-1.png","Main/paihang-1-5.png","Main/qieqiang-1-1.png","Main/fanhui-1.png"],loadList3D:[]},e.RankUI=k,xe("ui.RankUI",k);class M extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(M.uiView)}}M.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{top:0,skin:"Main/bg.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:15},{type:"Box",props:{y:140,x:287.5,width:145,name:"title",height:260},compId:8,child:[{type:"Image",props:{y:61,width:111,var:"imgLose",skin:"Main/shibai-1-1.png",scaleY:1.1,scaleX:1.1,height:160,centerX:0},compId:5},{type:"Image",props:{y:-29,var:"imgWin",skin:"Main/shengli.png",centerX:0},compId:6},{type:"FontClip",props:{y:111,width:100,var:"fcLevel",value:"22",skin:"Main/shibai-1-6.png",sheet:"0123456789",direction:"horizontal",centerX:0,align:"center"},compId:7}]},{type:"Image",props:{y:434,x:181,var:"imgCoins",skin:"Main/shibai-1-2.png"},compId:10,child:[{type:"FontClip",props:{x:265,width:85,var:"fcCoins",value:"1000",skin:"Main/shibai-1-3.png",sheet:"0123456789",centerY:1,align:"left"},compId:11}]},{type:"Image",props:{y:517,x:310,var:"imgReasonBg",skin:"Main/shibaiyuanyin-3.png"},compId:20},{type:"Image",props:{y:544,x:150,var:"imgProtectedDead",skin:"Main/shibaiyuanyin-1.png"},compId:21},{type:"Image",props:{y:544,x:245,var:"imgTargetEscape",skin:"Main/shibaiyuanyin-2.png"},compId:22},{type:"Image",props:{y:544,x:173,var:"imgPlayerDead",skin:"Main/shibaiyuanyin-4.png"},compId:23},{type:"Box",props:{y:820,x:205,width:310,var:"moveCom",height:160},compId:14,child:[{type:"Button",props:{y:65,x:160,width:316,var:"btnSkipLevel",stateNum:1,skin:"Main/jiesuan-2.png",scaleY:1,scaleX:1,pivotY:55,pivotX:158,height:110},compId:45,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:46}]},{type:"Button",props:{y:69,x:167,width:327,var:"btnDiamond",stateNum:1,skin:"Main/xuanyao.png",pivotY:55,pivotX:164,height:110},compId:40,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:41},{type:"Text",props:{y:55,x:159,width:110,var:"txtDiamond",valign:"middle",text:"100",pivotY:20,pivotX:55,height:40,fontSize:40,color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:43},{type:"Image",props:{y:57,x:269,width:93,skin:"Main/qiandao-0-3.png",pivotY:40,pivotX:47,height:80},compId:51}]},{type:"Button",props:{y:120,x:118,var:"btnNext",stateNum:1,skin:"Main/shibai-1-5.png"},compId:13,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:19}]},{type:"Button",props:{y:133,x:108.5,var:"btnBack",stateNum:1,skin:"Main/jiesuan-0.png"},compId:24,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:26}]},{type:"Button",props:{y:-30,x:154.5,width:218,var:"btnTriple",stateNum:1,skin:"Main/jiesuan-1.png",pivotY:41,pivotX:109,height:81},compId:48,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:49}]}]},{type:"Box",props:{y:577,x:0,width:720,var:"tipBox"},compId:39,child:[{type:"Image",props:{x:-25,skin:"Main/shengli-1-2.png"},compId:30,child:[{type:"Image",props:{y:0,x:700,skin:"Main/shengli-1-2.png"},compId:34}]},{type:"Text",props:{y:43,x:130,wordWrap:!0,width:460,var:"tips",valign:"top",text:"提示:没体力了?去抽奖放松休息可以获得体力哦!",overflow:"hidden",height:70,fontSize:35,color:"#ffffff",align:"left",runtime:"laya.display.Text"},compId:25},{type:"Image",props:{y:130,x:25,skin:"Main/shengli-1-2.png"},compId:31,child:[{type:"Image",props:{y:0,x:-700,skin:"Main/shengli-1-2.png"},compId:38}]}]}],animations:[{nodes:[{target:30,keyframes:{x:[{value:0,tweenMethod:"linearNone",tween:!0,target:30,key:"x",index:0},{value:-50,tweenMethod:"linearNone",tween:!0,target:30,key:"x",index:24}]}},{target:31,keyframes:{x:[{value:0,tweenMethod:"linearNone",tween:!0,target:31,key:"x",index:0},{value:50,tweenMethod:"linearNone",tween:!0,target:31,key:"x",index:24}]}}],name:"ani1",id:1,frameRate:24,action:0}],loadList:["Main/bg.png","Main/shibai-1-1.png","Main/shengli.png","Main/shibai-1-6.png","Main/shibai-1-2.png","Main/shibai-1-3.png","Main/shibaiyuanyin-3.png","Main/shibaiyuanyin-1.png","Main/shibaiyuanyin-2.png","Main/shibaiyuanyin-4.png","Main/jiesuan-2.png","Main/xuanyao.png","Main/qiandao-0-3.png","Main/shibai-1-5.png","Main/jiesuan-0.png","Main/jiesuan-1.png","Main/shengli-1-2.png"],loadList3D:[]},e.ResultUI=M,xe("ui.ResultUI",M);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:{y:0,x:0,top:0,skin:"Main/bga.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:5},{type:"Image",props:{y:218,x:70,skin:"Main/shezhi-1-2.png",rotation:0,name:"dialog"},compId:3,child:[{type:"Image",props:{y:98,x:187,skin:"Main/lijishiyong-1.png",name:"title"},compId:4},{type:"Box",props:{y:175,x:210,width:160,height:160},compId:12,child:[{type:"Image",props:{var:"icon",centerY:0,centerX:0},compId:10},{type:"Text",props:{y:175,width:160,var:"desc",valign:"middle",text:"火麒麟",height:30,fontSize:30,color:"#F5C148",bold:!0,align:"center",runtime:"laya.display.Text"},compId:11}]}]},{type:"Button",props:{y:943,x:314,var:"btnClose",stateNum:1,skin:"Main/fanhui-1.png"},compId:6,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:14}]}],loadList:["Main/bga.png","Main/shezhi-1-2.png","Main/lijishiyong-1.png","Main/fanhui-1.png"],loadList3D:[]},e.RewardUI=L,xe("ui.RewardUI",L);class b extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(b.uiView)}}b.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:0,x:0,var:"bg",top:0,skin:"Main/bga.png",right:0,left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:8},{type:"Image",props:{y:302,x:22,width:677,var:"scope",skin:"Main/jujijing-1.png",height:676,centerY:0,centerX:0},compId:3}],loadList:["Main/bga.png","Main/jujijing-1.png"],loadList3D:[]},e.ScopeUI=b,xe("ui.ScopeUI",b);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:"Main/bga.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:14,child:[{type:"Button",props:{y:0,x:0,width:50,var:"btnDebug",stateNum:1,skin:"Main/bga.png",height:50,sizeGrid:"5,5,5,5"},compId:21}]},{type:"Image",props:{y:296,x:75,width:570,skin:"Main/huodetili-1-1.png",sizeGrid:"11,11,14,14",name:"dialog",height:429},compId:3,child:[{type:"Image",props:{y:33,x:17,width:535,skin:"Main/huodetili-1-2.png",sizeGrid:"12,11,14,11",height:364},compId:22},{type:"Image",props:{y:-40,x:-.5,width:570,skin:"Main/huodetili-1-3.png",height:59},compId:23},{type:"Image",props:{y:70,x:100,skin:"Main/shezhi-1-3.png",name:"sound"},compId:5,child:[{type:"Image",props:{y:7,x:144,var:"imgSoundon",skin:"Main/shezhi-1-6.png"},compId:7},{type:"Image",props:{y:7,x:144,var:"imgSoundoff",skin:"Main/shezhi-1-5.png"},compId:9},{type:"Button",props:{y:7,x:144,width:151,var:"btnSound",stateNum:1,height:57},compId:10,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:17}]}]},{type:"Image",props:{y:174,x:98,skin:"Main/shezhi-1-4.png",name:"shake"},compId:6,child:[{type:"Image",props:{y:7,x:144,var:"imgShakeon",skin:"Main/shezhi-1-6.png"},compId:11},{type:"Image",props:{y:7,x:144,var:"imgShakeoff",skin:"Main/shezhi-1-5.png"},compId:12},{type:"Button",props:{y:7,x:144,width:151,var:"btnShake",stateNum:1,height:57},compId:13,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:18}]}]},{type:"Text",props:{y:298,x:17.5,width:535,var:"UID",valign:"middle",text:"UID:1",height:50,fontSize:50,color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:16}]},{type:"Box",props:{x:302,width:100,var:"moveBox",height:50,bottom:409},compId:20,child:[{type:"Button",props:{y:7,x:8,width:92,var:"btnClose",stateNum:1,skin:"Main/qiandao-1-5-1.png",height:37},compId:15,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:19}]}]},{type:"Image",props:{y:270,x:107,skin:"Main/shezhi.png",name:"title"},compId:4}],loadList:["Main/bga.png","Main/huodetili-1-1.png","Main/huodetili-1-2.png","Main/huodetili-1-3.png","Main/shezhi-1-3.png","Main/shezhi-1-6.png","Main/shezhi-1-5.png","Main/shezhi-1-4.png","Main/qiandao-1-5-1.png","Main/shezhi.png"],loadList3D:[]},e.SettingUI=S,xe("ui.SettingUI",S);class A extends Laya.Scene{constructor(){super()}createChildren(){super.createChildren(),this.createView(A.uiView)}}A.uiView={type:"Scene",props:{width:720,height:1280},compId:2,child:[{type:"Image",props:{y:0,x:0,top:0,skin:"Main/huodetili-1-1.png",sizeGrid:"12,15,11,11",right:0,name:"bg",left:0,bottom:0},compId:55,child:[{type:"Image",props:{y:88,x:10,width:702,skin:"Main/huodetili-1-2.png",sizeGrid:"10,12,16,12",height:1110},compId:56}]},{type:"Box",props:{x:36,width:649,height:1037,centerY:0},compId:31,child:[{type:"List",props:{y:0,x:0,width:655,var:"itemList",spaceY:30,repeatX:1,height:1029,elasticEnabled:!0},compId:5,child:[{type:"Box",props:{y:-2,x:0,width:649,name:"render",height:193},compId:6,child:[{type:"Image",props:{x:0,width:649,skin:"Main/shangcheng-1.png",sizeGrid:"19,58,18,62",name:"bg",height:191},compId:7},{type:"Box",props:{y:50,x:1,width:420,name:"skinFrame",height:140},compId:24,child:[{type:"Image",props:{y:73,x:210,pivotX:0,name:"skin",centerY:0,centerX:0},compId:20},{type:"Image",props:{y:94,x:64,skin:"Main/shangcheng-1-7.png"},compId:59}]},{type:"Button",props:{y:115,x:528,stateNum:1,skin:"Main/shangcheng-1-9.png",scaleX:1,name:"free",anchorY:.5,anchorX:.5},compId:8,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:29},{type:"Script",props:{runtime:"views/comp/ScaleScript.ts"},compId:30}]},{type:"Button",props:{y:76.5,x:430.5,stateNum:1,skin:"Main/shangcheng-1-4.png",name:"buy"},compId:9,child:[{type:"Image",props:{y:25,x:27,skin:"Main/shouye-1-3.png",name:"iconMoney"},compId:12},{type:"Image",props:{y:25,x:27,skin:"Main/shouye-1-4.png",name:"iconDiamond"},compId:25},{type:"Text",props:{y:22,x:86,width:128,valign:"middle",text:"55.5K",name:"price",height:30,fontSize:25,font:"Arial",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:11},{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:26}]},{type:"Image",props:{y:98.5,x:459,skin:"Main/shangdian-1-5.png",name:"special"},compId:13},{type:"Text",props:{y:30,x:525,width:250,valign:"middle",text:"巴雷特冲锋枪",pivotY:20,pivotX:125,name:"name",height:39,fontSize:30,font:"Microsoft YaHei",color:"#26407b",bold:!0,align:"center",runtime:"laya.display.Text"},compId:10},{type:"Script",props:{runtime:"views/comp/ShopGunItem.ts"},compId:22},{type:"Image",props:{y:50,x:401,skin:"Main/shangcheng-1-8.png"},compId:57},{type:"Image",props:{skin:"Main/qiangshou-1-7.png",sizeGrid:"12,14,14,19"},compId:58},{type:"FontClip",props:{y:17.5,x:24,width:27,value:"1",skin:"Main/shangdian-1-6.png",sheet:"0123456789",pivotY:9,pivotX:14,name:"level",height:17,align:"center"},compId:15}]},{type:"Script",props:{runtime:"views/comp/ShopGunList.ts"},compId:21}]},{type:"Image",props:{y:-81.5,width:111,skin:"Main/shangcheng-2.png",pivotY:26,pivotX:56,name:"title",height:52,centerX:-1},compId:4},{type:"Button",props:{y:-122.5,x:608,var:"btnClose",stateNum:1,skin:"Main/shangcheng-1-2.png"},compId:19,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:27}]}]}],loadList:["Main/huodetili-1-1.png","Main/huodetili-1-2.png","Main/shangcheng-1.png","Main/shangcheng-1-7.png","Main/shangcheng-1-9.png","Main/shangcheng-1-4.png","Main/shouye-1-3.png","Main/shouye-1-4.png","Main/shangdian-1-5.png","Main/shangcheng-1-8.png","Main/qiangshou-1-7.png","Main/shangdian-1-6.png","Main/shangcheng-2.png","Main/shangcheng-1-2.png"],loadList3D:[]},e.ShopUI=A,xe("ui.ShopUI",A);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:{top:0,skin:"Main/bga.png",right:0,name:"bga",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:249,width:568,skin:"Main/huodetili-1-1.png",sizeGrid:"30,28,26,27",name:"dialog",height:766,centerX:0},compId:4,child:[{type:"Image",props:{y:355,x:287,width:541,skin:"Main/huodetili-1-2.png",pivotY:342,pivotX:271,height:684},compId:106},{type:"Image",props:{y:-56,x:0,skin:"Main/huodetili-1-3.png"},compId:107},{type:"Image",props:{y:-28,width:82,skin:"Main/qiandao-1-3-1.png",pivotY:20,pivotX:41,name:"title",height:39,centerX:1},compId:6},{type:"Box",props:{y:41,width:534,var:"signList",height:658,centerX:0},compId:79,child:[{type:"Image",props:{width:165,top:10,skin:"Main/qiandao-1-2-1.png",sizeGrid:"48,48,80,48",left:9,height:214},compId:8,child:[{type:"Image",props:{name:"skin",centerY:0,centerX:0},compId:29},{type:"Text",props:{y:185,x:33.5,width:100,valign:"middle",text:"大量金币",name:"name",height:20,fontSize:20,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:86},{type:"Image",props:{y:0,x:0,var:"imgSigned",top:0,skin:"Main/qiandao-1-6.png",right:0,name:"signed",left:0,bottom:0,sizeGrid:"4,4,4,4"},compId:28,child:[{type:"Image",props:{y:123,x:40,skin:"Main/qiandao-1-7.png",centerX:0,bottom:5},compId:27}]},{type:"Text",props:{y:0,x:0,width:167,valign:"middle",text:"第一天",height:34,fontSize:20,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:108}]},{type:"Image",props:{width:165,top:10,skin:"Main/qiandao-1-2-1.png",sizeGrid:"56,50,69,29",height:214,centerX:1},compId:43,child:[{type:"Image",props:{name:"skin",centerY:0,centerX:0},compId:46},{type:"Text",props:{y:185,x:33,width:100,valign:"middle",text:"大量金币",name:"name",height:20,fontSize:20,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:87},{type:"Image",props:{y:0,x:0,top:0,skin:"Main/qiandao-1-6.png",right:0,name:"signed",left:0,bottom:0,sizeGrid:"4,4,4,4"},compId:47,child:[{type:"Image",props:{y:123,x:40,skin:"Main/qiandao-1-7.png",centerX:0,bottom:5},compId:48}]},{type:"Text",props:{y:0,x:0,width:151,valign:"middle",text:"第二天",height:33,fontSize:20,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:109}]},{type:"Image",props:{width:165,top:10,skin:"Main/qiandao-1-2-1.png",sizeGrid:"58,50,74,41",right:6,height:214},compId:49,child:[{type:"Image",props:{name:"skin",centerY:0,centerX:0},compId:52},{type:"Text",props:{y:186,x:33,width:100,valign:"middle",text:"大量金币",name:"name",height:20,fontSize:20,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:88},{type:"Image",props:{y:0,x:0,top:0,skin:"Main/qiandao-1-6.png",right:0,name:"signed",left:0,bottom:0,sizeGrid:"4,4,4,4"},compId:53,child:[{type:"Image",props:{y:123,x:40,skin:"Main/qiandao-1-7.png",centerX:0,bottom:5},compId:54}]},{type:"Text",props:{y:0,x:0,width:151,valign:"middle",text:"第三天",height:33,fontSize:20,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:110}]},{type:"Image",props:{x:8,width:165,skin:"Main/qiandao-1-2-1.png",sizeGrid:"42,57,88,42",height:214,centerY:18},compId:55,child:[{type:"Image",props:{name:"skin",centerY:0,centerX:0},compId:60},{type:"Text",props:{y:185,x:33.5,width:100,valign:"middle",text:"大量金币",name:"name",height:20,fontSize:20,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:89},{type:"Image",props:{y:0,x:0,top:0,skin:"Main/qiandao-1-6.png",right:0,name:"signed",left:0,bottom:0,sizeGrid:"4,4,4,4"},compId:61,child:[{type:"Image",props:{y:123,x:40,skin:"Main/qiandao-1-7.png",centerX:0,bottom:5},compId:62}]},{type:"Text",props:{y:0,x:0,width:167,valign:"middle",text:"第四天",height:31,fontSize:20,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:111}]},{type:"Image",props:{x:186,width:165,skin:"Main/qiandao-1-2-1.png",sizeGrid:"44,48,88,41",height:214,centerY:18},compId:56,child:[{type:"Image",props:{name:"skin",centerY:0,centerX:0},compId:65},{type:"Text",props:{y:184,x:33,width:100,valign:"middle",text:"大量金币",name:"name",height:20,fontSize:20,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:90},{type:"Image",props:{y:0,x:0,top:0,skin:"Main/qiandao-1-6.png",right:0,name:"signed",left:0,bottom:0,sizeGrid:"4,4,4,4"},compId:66,child:[{type:"Image",props:{y:123,x:40,skin:"Main/qiandao-1-7.png",centerX:0,bottom:5},compId:67}]},{type:"Text",props:{y:0,x:0,width:166,valign:"middle",text:"第五天",height:32,fontSize:20,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:112}]},{type:"Image",props:{x:363,width:165,skin:"Main/qiandao-1-2-1.png",sizeGrid:"46,66,92,47",height:214,centerY:18},compId:57,child:[{type:"Image",props:{name:"skin",centerY:0,centerX:0},compId:70},{type:"Text",props:{y:185,x:32.5,width:100,valign:"middle",text:"大量金币",name:"name",height:20,fontSize:20,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:91},{type:"Image",props:{y:0,x:0,top:0,skin:"Main/qiandao-1-6.png",right:0,name:"signed",left:0,bottom:0,sizeGrid:"4,4,4,4"},compId:71,child:[{type:"Image",props:{y:123,x:40,skin:"Main/qiandao-1-7.png",centerX:0,bottom:5},compId:72}]},{type:"Text",props:{y:0,x:0,width:166,valign:"middle",text:"第六天",height:34,fontSize:20,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:113}]},{type:"Image",props:{y:483,skin:"Main/qiandao-1-2-1.png",sizeGrid:"56,52,70,50",right:0,left:18,height:150},compId:80,child:[{type:"Image",props:{width:1,name:"skin",height:1,centerY:0,centerX:0},compId:83},{type:"Text",props:{y:122,x:208,width:100,valign:"middle",text:"大量金币",name:"name",height:20,fontSize:20,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"laya.display.Text"},compId:92},{type:"Image",props:{width:516,top:0,skin:"Main/qiandao-1-6.png",right:0,pivotY:75,pivotX:258,name:"signed",left:0,height:150,bottom:0,sizeGrid:"4,4,4,4"},compId:84,child:[{type:"Image",props:{y:123,x:40,skin:"Main/qiandao-1-7.png",centerX:0,bottom:5},compId:85}]},{type:"Text",props:{y:17,x:258,width:61,valign:"middle",text:"第七天",pivotY:10,pivotX:31,height:20,fontSize:20,color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:114}]}]},{type:"Button",props:{y:735,var:"btnSign",stateNum:1,skin:"Main/qiandao-1-4-1.png",selected:!1,centerX:15,anchorY:.5,anchorX:.5},compId:7,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:100}]}]},{type:"Box",props:{y:1060,x:310,width:100,var:"moveBox",height:40},compId:102,child:[{type:"Button",props:{y:22,x:54,width:92,var:"btnClose",stateNum:1,skin:"Main/qiandao-1-5-1.png",pivotY:19,pivotX:46,height:37},compId:5,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:101}]}]}],loadList:["Main/bga.png","Main/huodetili-1-1.png","Main/huodetili-1-2.png","Main/huodetili-1-3.png","Main/qiandao-1-3-1.png","Main/qiandao-1-2-1.png","Main/qiandao-1-6.png","Main/qiandao-1-7.png","Main/qiandao-1-4-1.png","Main/qiandao-1-5-1.png"],loadList3D:[]},e.SignUI=C,xe("ui.SignUI",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:"Main/shouye-1-21.png",right:0,name:"bg",left:0,bottom:0},compId:3},{type:"Image",props:{y:240,x:0,width:720,var:"gunModel",height:250},compId:22},{type:"Box",props:{y:275,right:0,name:"panel",left:0,height:179},compId:23,child:[{type:"Button",props:{var:"btnPrev",stateNum:1,skin:"Main/qieqiang-1-1.png",left:30,centerY:0},compId:17,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:30}]},{type:"Button",props:{width:67,var:"btnNext",stateNum:1,skin:"Main/qieqiang-1-1.png",skewX:0,rotation:180,right:-37,height:40,centerY:40,anchorY:0,anchorX:0},compId:18,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:31}]}]},{type:"Image",props:{y:521,skin:"Main/qieqiang-1-4.png",name:"panel",centerX:0},compId:4,child:[{type:"Image",props:{y:71,x:64,skin:"Main/qieqiang-1-5.png"},compId:5},{type:"Image",props:{y:128,x:62,skin:"Main/qieqiang-1-7.png"},compId:6},{type:"Image",props:{y:185,x:63,skin:"Main/qieqiang-1-8.png"},compId:7},{type:"ProgressBar",props:{y:78,x:229,var:"barAtk",skin:"Main/qieqiang-1-9.png"},compId:8},{type:"ProgressBar",props:{y:135,x:229,var:"barAmmo",skin:"Main/qieqiang-1-9.png"},compId:9},{type:"ProgressBar",props:{y:192,x:229,var:"barReloadTime",skin:"Main/qieqiang-1-9.png"},compId:10},{type:"Text",props:{y:71,x:603,width:50,var:"txtAtk",valign:"middle",text:"10",fontSize:30,font:"Arial",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:11},{type:"Text",props:{y:128,x:603,width:50,var:"txtAmmo",valign:"middle",text:"10",fontSize:30,font:"Arial",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:12},{type:"Text",props:{y:185,x:603,width:50,var:"txtReloadTime",valign:"middle",text:"10",fontSize:30,font:"Arial",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:13},{type:"Text",props:{y:-50,x:160,width:400,var:"txtName",valign:"middle",height:45,fontSize:45,color:"#26da8c",bold:!0,align:"center",runtime:"laya.display.Text"},compId:29}]},{type:"Box",props:{y:820,x:221,width:277,var:"moveBox",height:160},compId:37,child:[{type:"Button",props:{y:54,x:138,var:"btnInUse",stateNum:1,skin:"Main/zengzaishiyong.png",anchorY:.5,anchorX:.5},compId:39,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:40}]},{type:"Button",props:{y:49,x:138,var:"btnUse",stateNum:1,skin:"Main/xuanzeshiyong.png",anchorY:.5,anchorX:.5},compId:35,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:36}]},{type:"Button",props:{y:113,x:92,width:92,var:"btnClose",stateNum:1,skin:"Main/fanhui-1.png",height:37},compId:25,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:32}]}]}],loadList:["Main/shouye-1-21.png","Main/qieqiang-1-1.png","Main/qieqiang-1-4.png","Main/qieqiang-1-5.png","Main/qieqiang-1-7.png","Main/qieqiang-1-8.png","Main/qieqiang-1-9.png","Main/zengzaishiyong.png","Main/xuanzeshiyong.png","Main/fanhui-1.png"],loadList3D:[]},e.SkinUI=D,xe("ui.SkinUI",D);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:-1,skin:"Main/bga.png",right:0,name:"bg",left:0,bottom:0,sizeGrid:"5,5,5,5"},compId:3},{type:"Image",props:{y:124,x:72.5,skin:"Main/qiandao-1-1.png",rotation:0,name:"dialog"},compId:20,child:[{type:"Image",props:{y:98,x:240,skin:"Main/shiyong-3.png",name:"title"},compId:21},{type:"Box",props:{y:200,x:210,width:160,height:160},compId:24,child:[{type:"Image",props:{y:0,x:0,var:"icon",centerY:0,centerX:0},compId:42}]},{type:"Box",props:{y:420,x:30},compId:26,child:[{type:"Image",props:{x:2,skin:"Main/qieqiang-1-5.png"},compId:27},{type:"Image",props:{y:57,skin:"Main/qieqiang-1-7.png"},compId:28},{type:"Image",props:{y:114,x:1,skin:"Main/qieqiang-1-8.png"},compId:29},{type:"ProgressBar",props:{y:7,x:167,width:300,var:"barAtk",skin:"Main/qieqiang-1-9.png"},compId:30,child:[{type:"Image",props:{y:0,x:0,visible:!0,skin:"Main/youhua-1-10.png",name:"negative",anchorX:1},compId:43},{type:"Image",props:{visible:!0,skin:"Main/youhua-1-9.png",name:"positive",alpha:1},compId:44}]},{type:"ProgressBar",props:{y:64,x:167,width:300,var:"barAmmo",skin:"Main/qieqiang-1-9.png"},compId:31,child:[{type:"Image",props:{y:0,x:0,visible:!0,skin:"Main/youhua-1-10.png",name:"negative",anchorX:1},compId:57},{type:"Image",props:{y:0,x:0,visible:!0,skin:"Main/youhua-1-9.png",name:"positive"},compId:58}]},{type:"ProgressBar",props:{y:121,x:167,width:300,var:"barReloadTime",skin:"Main/qieqiang-1-9.png"},compId:32,child:[{type:"Image",props:{y:0,x:0,visible:!0,skin:"Main/youhua-1-10.png",name:"negative",anchorX:1},compId:59},{type:"Image",props:{y:0,x:0,visible:!0,skin:"Main/youhua-1-9.png",name:"positive"},compId:60}]},{type:"Text",props:{x:474,width:50,var:"txtAtk",valign:"middle",text:"10",fontSize:30,font:"Arial",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:33},{type:"Text",props:{y:57,x:474,width:50,var:"txtAmmo",valign:"middle",text:"10",fontSize:30,font:"Arial",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:34},{type:"Text",props:{y:114,x:474,width:50,var:"txtReloadTime",valign:"middle",text:"10",fontSize:30,font:"Arial",color:"#ffffff",bold:!0,align:"center",runtime:"laya.display.Text"},compId:35}]},{type:"Button",props:{y:771,x:287,var:"btnTry",stateNum:1,skin:"Main/shiyong-1.png",anchorY:.5,anchorX:.5},compId:11,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:17}]},{type:"Text",props:{y:650,x:60,var:"desc",valign:"middle",text:"恭喜你获得一次试用皮肤的机会!",height:30,fontSize:30,color:"#F5C148",bold:!0,align:"center",runtime:"laya.display.Text"},compId:10}]},{type:"Box",props:{y:998,x:264,width:200,var:"moveBox",height:50},compId:14,child:[{type:"Button",props:{y:9,x:33,var:"btnClose",stateNum:1,skin:"Main/shiyong-2.png"},compId:15,child:[{type:"Script",props:{runtime:"views/comp/ButtonScript.ts"},compId:18}]}]}],loadList:["Main/bga.png","Main/qiandao-1-1.png","Main/shiyong-3.png","Main/qieqiang-1-5.png","Main/qieqiang-1-7.png","Main/qieqiang-1-8.png","Main/qieqiang-1-9.png","Main/youhua-1-10.png","Main/youhua-1-9.png","Main/shiyong-1.png","Main/shiyong-2.png"],loadList3D:[]},e.TryOutUI=T,xe("ui.TryOutUI",T)}(fe||(fe={}));class ve extends fe.FriendAssistUI{constructor(){super()}onOpen(e){this._initUI(),this._btnHandler()}onClose(){}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){}_btnHandler(){this.btnInvite.clickHandler=new Laya.Handler(this,this._inviteClick),this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick)}_inviteClick(){this.btnInvite.mouseEnabled=!1,L.FriendAssistShare(e=>{this.btnInvite.mouseEnabled=!0})}_closeClick(){J.Instance.close(Q.FriendAssist)}}class ke{constructor(e,t,n,i,a,s){this.isUnlock=e,this.isInvited=t,this.unlockLevel=n,this.type=i,this.desc=a,this.effect=s}static GenData(){let e=_e.Instance.helpCnt,t=Number(F.Instance.curAccountData.getUser(O.unlock_kun)),n=F.Instance.curAccountData.getConfig(V.find_help),i=[];return n.forEach(n=>{let a=t>=n.unlock_lv,s=a&&e>=n.id,o=n.unlock_lv,r=n.reward_type,c=n.reward_string,h=n.reward_num,l=new ke(a,s,o,r,c,h);i.push(l)},this),i}}class Me extends Laya.Script{constructor(){super()}onAwake(){this._list=this.owner,this._list.vScrollBarSkin="",this._list.renderHandler=new Laya.Handler(this,this._updateCell);let e=ke.GenData();this._list.array=e,this._list.refresh(),ee.Instance.on(te.FriendAssistCtrl.RefreshData,this,this._refreshData)}onDestroy(){ee.Instance.off(te.FriendAssistCtrl.RefreshData,this,this._refreshData)}_updateCell(e,t){e.getComponent(we).refreshData()}_refreshData(){let e=ke.GenData();this._list.array=e,this._list.refresh()}}class Le extends Laya.Script{constructor(){super()}onAwake(){this._comp=this.owner,this._scaleX=this._comp.scaleX,this._scaleY=this._comp.scaleY,this._t=0}onUpdate(){let e=Laya.timer.delta;this._t+=e,this._t<400?(this._comp.scaleX-=.2*this._scaleX*e/500,this._comp.scaleY-=.2*this._scaleY*e/500):this._t>=400&&this._t<800?(this._comp.scaleX+=.2*this._scaleX*e/500,this._comp.scaleY+=.2*this._scaleY*e/500):this._t>=800&&this._t<1e3?(this._comp.scaleX=this._scaleX,this._comp.scaleY=this._scaleY):this._t=0}onDestroy(){this._comp.scaleX=this._scaleX,this._comp.scaleY=this._scaleY}}class be extends Laya.Script{constructor(){super()}showRecycle(e){let t=Laya.stage.addChild(new Laya.Text);t.text="+"+Ie.ToKMB(e,1),t.color="#FF8C00",t.fontSize=30,t.width=120,t.align="center",t.valign="middle";let n=this.owner,i=n.parent,a=new Laya.Point(n.x,n.y);i.localToGlobal(a),a.x+=(n.width-t.width)/2,a.y-=t.height,t.pos(a.x,a.y),Laya.Tween.to(t,{y:a.y-50,alpha:.5},1e3,null,Laya.Handler.create(this,()=>{t.destroy()}))}}const Se=20,Ae=20;class Ce{static ShowToast(e,t=500){let n=new Laya.Text;n.text=e,n.color="#FFFFFF",n.fontSize=30;let i=new Laya.Image;i.skin="Main/dialog.png",i.width=n.width+2*Se,i.height=n.height+2*Ae,i.sizeGrid="25,25,25,25",i.addChild(n),n.pos(Se,Ae),Laya.stage.addChild(i),i.pos((Laya.stage.width-i.width)/2,(Laya.stage.height-i.height)/2),Laya.Tween.to(i,{y:i.y-200,alpha:.5},t,null,Laya.Handler.create(this,()=>{i.destroy()}))}}const De=5,Te="res/skin/",Be=".png";class Ne extends Laya.Script{constructor(){super(),this._isMouseDown=!1}onAwake(){this._list=this.owner,this._list.renderHandler=new Laya.Handler(this,this._updateGunItem),this.refreshList(),Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this._onStageMouseDown),Laya.stage.on(Laya.Event.MOUSE_UP,this,this._onStageMouseUp),Laya.stage.on(Laya.Event.MOUSE_OUT,this,this._onStageMouseUp)}_onStageMouseDown(e){this._isMouseDown||null==e.target||(this._dragItem=e.target.getComponent(Ve),null!=this._dragItem&&0!=this._dragItem.gunId&&(this._isMouseDown=!0,this._downPos=new Laya.Vector2(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY),this._dragItem.startDrag(),this._startScale(),Laya.timer.frameLoop(1,this,this._onMouseMove)))}_onMouseMove(e){let t=new Laya.Vector2(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY);this._dragItem.move(t.x-this._downPos.x,t.y-this._downPos.y)}_onStageMouseUp(e){if(!this._isMouseDown)return;if(this._isMouseDown=!1,Laya.timer.clear(this,this._onMouseMove),this._stopScale(),this._dragItem.endDrag(),null==e.target)return;let t=e.target.getComponent(Ve);if(t&&t.index!=this._dragItem.index){let e=Number(F.Instance.curAccountData.getUser(O.unlock_kun));if(this._dragItem.gunId==t.gunId&&this._dragItem.gunId==e){let n=F.Instance.curAccountData.getConfig(V.gun);if(e>=n[n.length-1].id)return void Ce.ShowToast("该枪械已是最高级!");let i=this._dragItem.gunId+1,a=F.Instance.curAccountData.cfg.gunDic.get(this._dragItem.gunId),s=F.Instance.curAccountData.cfg.gunDic.get(i);if(s){let e=Te+a.icon+Be,t=Te+s.icon+Be;J.Instance.open(Q.GunUpgrade,[e,t,Laya.Handler.create(this,()=>{let e=[{t:F.Instance.ServerTime.toString()},{id:i.toString()}];D.Instance.HttpPostRequest(C.Equip,e,Laya.Handler.create(this,e=>{J.Instance.open(Q.NewWeapon,i),ee.Instance.trigger(te.MainUIInfo.AirDropRefresh),ee.Instance.trigger(te.MainUIInfo.FloatAirDropRefresh)}),null)})])}this._sendMoveGun(this._dragItem.index,t.index)}else{let n=null;if(this._dragItem.gunId==t.gunId){t.showStarEffect(),x.Instance.playSound(l.diamond);let i=t.gunId+1;Number(F.Instance.curAccountData.getUser(O.unlock_kun));e>5&&i>=e-6&&i<=e-4&&(n=Laya.Handler.create(this,()=>{Laya.timer.once(500,this,()=>{J.Instance.open(Q.ExtraUpgrade,[i,t.index])})}))}this._sendMoveGun(this._dragItem.index,t.index,n)}}let n=e.target.getComponent(be);n&&(this._gunNum>=5?this._sendDiscardGun(this._dragItem.index,this._dragItem.gunId,n):Ce.ShowToast(`枪支数量小于${De}无法回收`)),this._dragItem=null}_sendMoveGun(e,t,n=null){let i=[{from:e.toString()},{to:t.toString()},{t:F.Instance.ServerTime.toString()}];D.Instance.HttpPostRequest(C.MoveGun,i,Laya.Handler.create(this,e=>{ee.Instance.trigger(te.MainUIGuide.Upgrade),this.refreshList(),n&&n.run()}),Laya.Handler.create(this,e=>{}))}_sendDiscardGun(e,t,n){let i=[{from:e.toString()},{t:F.Instance.ServerTime.toString()}];D.Instance.HttpPostRequest(C.DiscardGun,i,Laya.Handler.create(this,e=>{this.refreshList();let i=F.Instance.curAccountData.cfg.gunDic.get(t),a=Number(i.money);ie.Instance.updateMoney(a),ie.Instance.syncData(),n.showRecycle(a)}),Laya.Handler.create(this,e=>{}))}refreshList(){se.Instance.refreshList();let e=F.Instance.curAccountData.getUser(O.list_kun);this._gunNum=0,e.forEach(e=>{e>0&&this._gunNum++},this),this._list.array=e.concat(),this._list.refresh()}_updateGunItem(e,t){e.getComponent(Ve).refreshData(t)}_startScale(){let e=this._list.getChildAt(0);for(let t=0;t<e.numChildren;t++){let n=e.getChildAt(t).getComponent(Ve);n.gunId==this._dragItem.gunId&&n!=this._dragItem&&n.startScale()}}_stopScale(){let e=this._list.getChildAt(0);for(let t=0;t<e.numChildren;t++){let n=e.getChildAt(t).getComponent(Ve);n.gunId==this._dragItem.gunId&&n!=this._dragItem&&n.stopScale()}}}Ne.canShowIncomeUI=!1;class Ge{constructor(){this.scale=1}static get Instance(){return null==this._Instance&&(this._Instance=new Ge),this._Instance}get delta(){return 17*this.scale}}const Ee=500;class He extends Laya.Script{constructor(){super(),this._t=0}onAwake(){this._gun=this.owner,this._originScale=this._gun.scaleX,this._step=(.3-this._originScale)/Ee}onUpdate(){this._t+=Ge.Instance.delta,this._t>Ee&&(this._t=0,this._step*=-1),this._gun.scaleX+=this._step*Ge.Instance.delta,this._gun.scaleY+=this._step*Ge.Instance.delta}onDestroy(){this._gun.scaleX=this._gun.scaleY=this._originScale}}const Pe="res/skin/",Re=".png",Ue=10,ze=["#1262c3","#1fbf17","#d00e0f","#08f7d8","#e1cf51","#62fe05","#a131fa","#ff7202","#e787f5","#ecf951"];class Ve extends Laya.Script{constructor(){super(),this._isMouseDown=!1,this._isShowUI=!0}onAwake(){this._renderBox=this.owner,this._container=this._renderBox.getChildByName("container"),this._skin=this._container.getChildByName("skin"),this._skinBg=this._container.getChildByName("skinBg"),this._polygon=this._renderBox.getChildByName("polygon"),this._level=this._renderBox.getChildByName("level")}refreshData(e){if(this.index=e,this.gunId=this._renderBox.dataSource,0!=this.gunId){let e=F.Instance.curAccountData.cfg.gunDic.get(this.gunId),t=Pe+e.icon+Re;this._setImg(this._skin,t),this._setImg(this._skinBg,t),this._level.value=e.id,this._polygon.visible=!0;ze[this.gunId%ze.length];ee.Instance.on(te.IncomeMgr.GetIncome,this,this._getIncome)}else this._skin.skin=null,this._skinBg.skin=null,this._level.value=null,this._polygon.visible=!1,ee.Instance.off(te.IncomeMgr.GetIncome,this,this._getIncome)}_setImg(e,t){e.scale(.37,.37,!0),e.skin=t,e.anchorX=e.anchorY=.5,e.skewY=180,e.rotation=-40}startDrag(){this._point=new Laya.Point(this._skin.x,this._skin.y),this._container.localToGlobal(this._point),this._point.x+=Ue,this._point.y+=Ue,this._skin.removeSelf(),Laya.stage.addChild(this._skin),this._skin.x=this._point.x,this._skin.y=this._point.y,this._skinBg.alpha=.5,this._isShowUI=!1}move(e,t){this._skin.x=this._point.x+e,this._skin.y=this._point.y+t}endDrag(){this._skin.removeSelf(),this._container.addChild(this._skin),this._skin.centerX=this._skin.centerY=0,this._skinBg.alpha=1,this._isShowUI=!0}_getIncome(e,t,n){this.index==e&&this._isShowUI&&Ne.canShowIncomeUI&&this._showIncome(t,n)}_showIncome(e,t){let n=Laya.stage.addChild(new Laya.Text);n.text="+"+Ie.ToKMB(e,1),n.color=t?"#00FF00":"#FF8C00",n.fontSize=30,n.width=120,n.align="center",n.valign="middle";let i=new Laya.Point(this._skinBg.x,this._skinBg.y);this._container.localToGlobal(i),i.x+=-n.width/2,i.y-=n.height,n.pos(i.x,i.y),Laya.Tween.to(n,{y:i.y-50,alpha:.5},800,null,Laya.Handler.create(this,()=>{n.destroy()}))}showStarEffect(){let e=this._container.scene.starEffect,t=new Laya.Point(this._skinBg.x,this._skinBg.y);this._container.localToGlobal(t),e.pos(t.x-10,t.y-10),e.visible=!0,this._container.scene.ani3.play(0,!1),Laya.timer.once(7/24*1e3,this,()=>{e.visible=!1})}onDestroy(){ee.Instance.off(te.IncomeMgr.GetIncome,this,this._getIncome)}startScale(){this._skin.addComponent(He),this._skinBg.addComponent(He)}stopScale(){let e=this._skin.getComponent(He);e&&e.destroy();let t=this._skinBg.getComponent(He);t&&t.destroy()}}const Oe=0,Xe=200,qe=400,Ye=8e3;class Fe extends Laya.Script{constructor(){super(),this._isLeft=!1,this._t=Ye,this._startX=0,this._startY=0,this._endX=0,this._endY=0}onAwake(){this._floatBox=this.owner}onUpdate(){let e=Laya.timer.delta;if(this._t+=e,this._t>=Ye)this._t=0,this._isLeft=!this._isLeft,this._startX=this._getX(this._isLeft),this._endX=this._getX(!this._isLeft),this._startY=z.RandInt(Oe,Xe),this._endY=z.RandInt(Xe,qe),this._floatBox.pos(this._startX,this._startY);else{let e=(this._endX-this._startX)*this._t/Ye,t=(this._endY-this._startY)*this._t/Ye;this._floatBox.pos(this._startX+e,this._startY+t)}}_getX(e){return e?-this._floatBox.width:Laya.stage.width}}class We extends fe.AirDropUI{constructor(){super(),this._isBoxOpen=!1,this._gunArr=[]}static get CanOpenWhenBuy(){let e=Number(F.Instance.curAccountData.getUser(O.unlock_kun)),t=(Laya.timer.currTimer-We._lastOpenTime)/1e3;return e>4&&(We._unopenCntWhenBuy<3||t>180)}static get CanShowInMain(){return Number(F.Instance.curAccountData.getUser(O.unlock_kun))>4&&We.startLevelCnt>=2}static get CanFloatInMain(){return!!(Number(F.Instance.curAccountData.getUser(O.unlock_kun))>4&&We.floatLvlCnt>0&&(We._firstFloat||Math.random()>=.5))}onOpen(e){let[t,n]=e;this._openMethod=t,this._complete=n,this._openMethod==g.BuyGun&&(3==We._unopenCntWhenBuy&&(We._unopenCntWhenBuy=0),We._lastOpenTime=Laya.timer.currTimer),this._btnHandler(),M.showBanner()}onClose(){this._openMethod==g.BuyGun&&(this._isBoxOpen?We._unopenCntWhenBuy=0:We._unopenCntWhenBuy++),M.hideBanner(),this._complete&&this._complete.run()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnOpen.clickHandler=new Laya.Handler(this,this._openClick)}_closeClick(){J.Instance.close(Q.AirDrop)}_openClick(){this.btnOpen.mouseEnabled=!1,this._isBoxOpen=!0,L.AldEvent("空投看视频"),M.showVideoAd(e=>{e?(this._buyGun(),this.btnOpen.mouseEnabled=!1,this.btnOpen.gray=!0):(S.ShowToast("只有观看完整视频才能打开空投哦!"),this.btnOpen.mouseEnabled=!0)})}_buyGun(){let e=F.Instance.curAccountData.getUser(O.list_kun),t=0;e.forEach(e=>{0==e&&t++},this),t>5&&(t=5),this._buyOneGun(t)}_buyOneGun(e){if(0==e)return this._openMethod==g.Main&&(We.startLevelCnt=0),this._openMethod==g.Float&&(We.floatLvlCnt=0,We._firstFloat=!1),ee.Instance.trigger(te.MainUIInfo.GunListRefresh),void J.Instance.close(Q.AirDrop).open(Q.NewReward,[this._gunArr]);let t,n=F.Instance.curAccountData.getUser(O.unlock_kun);if(n<=4)t=1;else{let e=n-4,i=n-6;i<1&&(i=1),t=z.RandInt(i,e)}let i=F.Instance.curAccountData.cfg.gunDic.get(t);this._gunArr.push(i);let a=[{t:F.Instance.ServerTime.toString()},{id:t.toString()}];D.Instance.HttpPostRequest(C.BuyGun,a,Laya.Handler.create(this,t=>{e--,this._buyOneGun(e)}),Laya.Handler.create(this,t=>{console.log(`[LOG]${t.message}`),e--,this._buyOneGun(e)}))}}We.startLevelCnt=2,We.floatLvlCnt=1,We._firstFloat=!0,We._unopenCntWhenBuy=0,We._lastOpenTime=0;const je="res/skin/",$e=".png";var Ke,Ze;!function(e){e[e.money=0]="money",e[e.diamond=1]="diamond",e[e.free=2]="free",e[e.none=3]="none"}(Ke||(Ke={}));class Je extends Laya.Script{constructor(){super()}onAwake(){this._renderBox=this.owner,this._btnFree=this._renderBox.getChildByName("free"),this._btnBuy=this._renderBox.getChildByName("buy"),this._txtPrice=this._btnBuy.getChildByName("price"),this._imgMoney=this._btnBuy.getChildByName("iconMoney"),this._imgDiamond=this._btnBuy.getChildByName("iconDiamond"),this._imgSpecial=this._renderBox.getChildByName("special"),this._txtName=this._renderBox.getChildByName("name"),this._fcLevel=this._renderBox.getChildByName("level");let e=this._renderBox.getChildByName("skinFrame");this._imgSkin=e.getChildByName("skin"),this._freeRate=Math.random()}refreshData(){let e=this._renderBox.dataSource;this._gunId=e.id,this._gunMoney=Number(e.money),this._gunDiamond=e.diamond;let t=F.Instance.curAccountData.getUser(O.buyed_kun)[this._gunId]||0;this._gunMoney+=t*e.addMoney,this._gunDiamond+=t*e.addDiamond;let n=Number(F.Instance.curAccountData.getUser(O.unlock_kun));this._isUnlock=this._gunId<=n,this._imgSpecial.visible=!1,this._currencyType=Ke.none,n<=4?1==this._gunId?(this._currencyType=Ke.money,this._canBuy=!0):this._canBuy=!1:this._gunId<n-3?this._gunId==n-4&&this._freeRate>=.5?(this._currencyType=Ke.free,this._canBuy=!1):(this._currencyType=Ke.money,this._canBuy=!0):this._gunId==n-3||this._gunId==n-2?(this._currencyType=Ke.diamond,this._canBuy=!0):this._canBuy=!1,this._setUI(e)}_setUI(e){let t=je+e.icon+$e;this._imgSkin.scale(.6,.6,!0),this._imgSkin.skin=t,this._fcLevel.value=this._gunId.toString();let n=[new Laya.ColorFilter([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0])];this._imgSkin.filters=this._isUnlock?null:n,this._btnBuy.visible=this._canBuy,this._imgDiamond.visible=this._currencyType==Ke.diamond,this._imgMoney.visible=this._currencyType==Ke.money,this._btnFree.visible=this._currencyType==Ke.free,this._txtName.text=e.name,this._currencyType==Ke.money?this._txtPrice.text=Ie.ToKMB(this._gunMoney,2):this._currencyType==Ke.diamond&&(this._txtPrice.text=Ie.ToKMB(this._gunDiamond,2)),this._btnBuy.clickHandler=new Laya.Handler(this,this._buyGun),this._btnFree.clickHandler=new Laya.Handler(this,this._buyGunForFree)}_buyGun(){this._btnBuy.mouseEnabled=!1;let e=F.Instance.curAccountData.getUser(O.list_kun),t=0;e.forEach(e=>{e>0&&t++},this),t>=12?(Ce.ShowToast("枪支已满!"),this._btnBuy.mouseEnabled=!0):this._currencyType==Ke.money?ie.Instance.vmoney>=this._gunMoney?this._sendBuyGun(Laya.Handler.create(this,e=>{this._afterBuy(),this._btnBuy.mouseEnabled=!0}),Laya.Handler.create(this,e=>{console.log(`[LOG]${e.message}`),Ce.ShowToast("金币不足!"),this._btnBuy.mouseEnabled=!0})):(We.CanOpenWhenBuy?J.Instance.open(Q.AirDrop,[g.BuyGun,null]):Ce.ShowToast("金币不足!"),this._btnBuy.mouseEnabled=!0):this._currencyType==Ke.diamond?ie.Instance.diamond>=this._gunDiamond?this._sendBuyGun(Laya.Handler.create(this,e=>{this._afterBuy(),this._btnBuy.mouseEnabled=!0}),Laya.Handler.create(this,e=>{console.log(`[LOG]${e.message}`),Ce.ShowToast("钻石不足!"),this._btnBuy.mouseEnabled=!0})):(Ce.ShowToast("钻石不足!"),this._btnBuy.mouseEnabled=!0):this._btnBuy.mouseEnabled=!0}_buyGunForFree(){this._btnBuy.mouseEnabled=!1;let e=F.Instance.curAccountData.getUser(O.list_kun),t=0;e.forEach(e=>{e>0&&t++},this),t>=12?(Ce.ShowToast("枪支已满!"),this._btnBuy.mouseEnabled=!0):this._currencyType==Ke.free?M.showVideoAd(e=>{e?this._sendBuyGun(Laya.Handler.create(this,e=>{this._afterBuy(),this._btnBuy.mouseEnabled=!0}),Laya.Handler.create(this,e=>{console.log(`[LOG]${e.message}`),this._btnBuy.mouseEnabled=!0})):(S.ShowToast("只有观看完整视频才能获得哦!"),this._btnBuy.mouseEnabled=!0)}):this._btnBuy.mouseEnabled=!0}_sendBuyGun(e,t){let n=[{t:F.Instance.ServerTime.toString()},{id:this._gunId.toString()}];D.Instance.HttpPostRequest(C.BuyGun,n,e,t)}_afterBuy(){this._currencyType==Ke.money&&ie.Instance.updateMoney(-this._gunMoney),Ce.ShowToast(`恭喜获得${this._renderBox.dataSource.name}`),ie.Instance.syncData(),this.refreshData()}}class Qe extends Laya.Script{constructor(){super()}onAwake(){this._list=this.owner,this._list.renderHandler=new Laya.Handler(this,this._updateGunItem),this._list.vScrollBarSkin="";let e=F.Instance.curAccountData.getConfig(V.gun);this._list.array=e.concat(),this._list.refresh()}_updateGunItem(e,t){e.getComponent(Je).refreshData()}}class et{constructor(){}static init(){var e=Laya.ClassUtils.regClass;e("views/comp/ButtonScript.ts",v),e("views/comp/AchievementItem.ts",ae),e("views/comp/AchievementItemList.ts",$),e("views/comp/FriendAssistItem.ts",we),e("views/comp/FriendAssistList.ts",Me),e("views/comp/ScaleScript.ts",Le),e("views/comp/GunDragItem.ts",Ve),e("views/comp/GunDragList.ts",Ne),e("views/comp/RecycleItem.ts",be),e("views/comp/FloatScript.ts",Fe),e("views/comp/ShopGunItem.ts",Je),e("views/comp/ShopGunList.ts",Qe)}}et.width=720,et.height=1280,et.scaleMode="fixedwidth",et.screenMode="none",et.alignV="top",et.alignH="left",et.startScene="Loading.scene",et.sceneRoot="",et.debug=!1,et.stat=!1,et.physicsDebug=!1,et.exportSceneToJson=!0,et.init(),function(e){e[e.TargetArrow=0]="TargetArrow"}(Ze||(Ze={}));class tt{constructor(){this._urlArr=["res/u3d/LayaScene_Prefab/Conventional/Player.lh","res/u3d/LayaScene_Prefab/Conventional/BulletRifle.lh","res/u3d/LayaScene_Prefab/Conventional/TargetArrow.lh","res/u3d/LayaScene_Prefab/Conventional/Ball.lh","res/u3d/LayaScene_Prefab/Conventional/Bomb.lh","res/u3d/LayaScene_Prefab/Conventional/MainMenuPlayer.lh","res/u3d/LayaScene_Prefab/Conventional/leader.lh","res/u3d/LayaScene_Prefab/Conventional/Car.lh","res/u3d/LayaScene_Prefab/Conventional/kaiqiang.lh","res/u3d/LayaScene_Prefab/Conventional/kaiqiang2.lh","res/u3d/LayaScene_Prefab/Conventional/boom.lh","res/u3d/LayaScene_Prefab/Conventional/pistol.lh","res/u3d/LayaScene_Prefab/Conventional/rifle.lh","res/u3d/LayaScene_Prefab/Conventional/light.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_AK47.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_AWP.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_Dragon.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_DSR.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_FAL.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_FRF2.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_Gatlin.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_KAC.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_M4A1.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_M82A1.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_MG3.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_MG4.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_MP5.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_QBU88.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_Red95.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_RPK.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_SCAR.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_SCARNewYear.lh","res/u3d/LayaScene_Weapons/Conventional/wpn_model_SVD.lh"],this._npcUrlArr=["res/u3d/LayaScene_Npc/Conventional/male1.lh","res/u3d/LayaScene_Npc/Conventional/male2.lh","res/u3d/LayaScene_Npc/Conventional/male3.lh","res/u3d/LayaScene_Npc/Conventional/male4.lh","res/u3d/LayaScene_Npc/Conventional/male5.lh","res/u3d/LayaScene_Npc/Conventional/male6.lh","res/u3d/LayaScene_Npc/Conventional/male7.lh","res/u3d/LayaScene_Npc/Conventional/male8.lh","res/u3d/LayaScene_Npc/Conventional/male9.lh","res/u3d/LayaScene_Npc/Conventional/male10.lh","res/u3d/LayaScene_Npc/Conventional/fmale1.lh","res/u3d/LayaScene_Npc/Conventional/fmale2.lh","res/u3d/LayaScene_Npc/Conventional/fmale3.lh","res/u3d/LayaScene_Npc/Conventional/fmale4.lh","res/u3d/LayaScene_Npc/Conventional/fmale5.lh","res/u3d/LayaScene_Npc/Conventional/fmale6.lh","res/u3d/LayaScene_Npc/Conventional/fmale7.lh","res/u3d/LayaScene_Npc/Conventional/fmale8.lh","res/u3d/LayaScene_Npc/Conventional/fmale9.lh","res/u3d/LayaScene_Npc/Conventional/fmale10.lh"],this._prefDic=new T,this._npcUrlDic=new T}static get Instance(){return null==this._Instance&&(this._Instance=new tt),this._Instance}load(e){console.log("[LOG]开始加载预制"),this._initNpcUrlDic(),Laya.loader.create(this._urlArr,Laya.Handler.create(this,()=>{console.log("[LOG]预制加载完成"),this._urlArr.forEach(e=>{if(1==e.progress){let t=Laya.loader.getRes(e.url);this._prefDic.set(t.name,t)}else console.log(`[LOG]${e.url}加载失败`)},this),e&&e.run()}))}getPref(e){return this._prefDic.get(e)}dynamicLoadNpc(e){let t=[],n=F.Instance.curAccountData.level.actors;for(let e=0;e<n.length;e++){let i=F.Instance.curAccountData.cfg.actorDic.get(n[e]);this._prefDic.has(i.prefab)||t.push(this._npcUrlDic.get(i.prefab))}if(console.log("ForEach------end",n),0==t.length)return console.log("urlArr.length------"),void(e&&e.run());console.log("[LOG]介绍界面开始加载预制"),Laya.loader.create(t,Laya.Handler.create(this,()=>{console.log("[LOG]介绍界面预制加载完成");for(let e=0;e<t.length;e++){let n=Laya.loader.getRes(t[e].url);this._prefDic.set(n.name,n)}e&&e.run()}))}_initNpcUrlDic(){this._npcUrlArr.forEach(e=>{let t=e.split("/").slice(-1)[0].split(".")[0];this._npcUrlDic.set(t,e)},this)}}const nt="https://cdn2.xwxgame.com/sniper/",it="config/whitelist.txt";class at extends fe.LoadingUI{constructor(){super()}onOpen(e){this._init()}onClose(){}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_init(){L.AldEvent("开始加载"),this._showLoading(),this._login()}_login(){Laya.Browser.onAndroid?this._wxLogin():this._localLogin()}_wxLogin(){let e=Laya.LocalStorage.getItem("loginCode");if(!e){console.log("本地生成code"),e="xj_"+(new Date).getTime().toString()+z.RandInt(1e4,99999).toString(),Laya.LocalStorage.setItem("loginCode",e),console.log("新用户")}console.log("[LOG]code:"+e);new F(e,"","",0,"","","","",S.ShareId,"",k.Ver);this._localLogin()}_localLogin(){L.AldEvent("开始本地登录"),D.Instance.login(null,new Laya.Handler(this,()=>{this._loadSubpackages()}),new Laya.Handler(this,()=>{this._localLogin()}))}_loadSubpackages(){tt.Instance.load(Laya.Handler.create(this,this._prefabLoaded))}_prefabLoaded(){this._loadingFinish()}_showLoading(){this._progressTween=Laya.Tween.to(this.progressBar,{value:.92,update:new Laya.Handler(this,()=>{let e=Math.floor(100*this.progressBar.value);this.progressVal.text=`${e}%`})},1e4,Laya.Ease.linearInOut,Laya.Handler.create(this,()=>{}))}_loadingFinish(){this.progressVal.text="95%",this.progressBar.value=.95,Laya.timer.once(200,this,()=>{this._progressTween.clear(),this.progressVal.text="100%",this.progressBar.value=1,M.initAd(),b.OnShowHandle(),se.Instance.init(),_e.Instance.init(),J.Instance.close(Q.Loading).open(Q.Main)})}_loadCDN(e){Laya.Browser.onWeiXin?(Laya.URL.basePath=nt+F.Instance.curAccountData.CNDFolder+"/",Laya.MiniAdpter.nativefiles.push(it),Laya.loader.create(it,new Laya.Handler(this,()=>{let t=Laya.loader.getRes(it),n=JSON.parse(t);for(let e=0;e<n.length;e++)Laya.MiniAdpter.nativefiles.push(n[e]);e&&e.run()}))):e&&e.run()}}var st;!function(e){e[e.MainTitle=0]="MainTitle",e[e.InGame=1]="InGame",e[e.Win=2]="Win",e[e.Lose=3]="Lose",e[e.Pause=4]="Pause"}(st||(st={}));class ot{constructor(){this.state=st.MainTitle}static get Instance(){return null==this._Instance&&(this._Instance=new ot),this._Instance}changeState(e){this.state=e}}class rt{constructor(){this.winDelay=1e3}static get Instance(){return null==this._Instance&&(this._Instance=new rt),this._Instance}start(){ot.Instance.changeState(st.InGame),ee.Instance.trigger(te.GameCtrl.Start)}pause(){ot.Instance.changeState(st.Pause),ee.Instance.trigger(te.GameCtrl.Pause)}resume(){ot.Instance.changeState(st.InGame),ee.Instance.trigger(te.GameCtrl.Resume)}lose(e){ot.Instance.changeState(st.Lose),ee.Instance.trigger(te.GameCtrl.Lose,[e])}win(){ot.Instance.changeState(st.Win),ee.Instance.trigger(te.GameCtrl.Win)}backToMain(){ot.Instance.changeState(st.MainTitle),ee.Instance.trigger(te.GameCtrl.BackToMain)}}const ct="res/skin/",ht=".png";class lt extends fe.TryOutUI{constructor(){super()}static get CanTryOut(){return!lt.IsInTryOut&&1!=F.Instance.curAccountData.levelId}onOpen(e){let[t,n]=e;this._complete=t,this._isLose=n,console.log("试用界面data---",e.isLose),this._initUI(),this._btnHandler(),M.showBanner()}onClose(){M.hideBanner(),this._complete&&this._complete.run()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){let e=F.Instance.curAccountData,t=Number(e.getUser(O.equip_kun)),n=lt.TryOutGunId=z.Clamp(t+2,1,19),i=e.getThemeById(t),a=e.cfg.gunDic.get(n);this.icon.skin=ct+a.icon+ht;let s=e.getGlobal(h.min_wpn_atk),o=e.getGlobal(h.max_wpn_atk),r=e.getGlobal(h.min_wpn_ammo),c=e.getGlobal(h.max_wpn_ammo),l=e.getGlobal(h.min_wpn_reload_speed),d=e.getGlobal(h.max_wpn_reload_speed);this.txtAtk.text=i.atk,this.barAtk.value=z.ToPercentage(i.atk,s,o),this.txtAmmo.text=i.ammo,this.barAmmo.value=z.ToPercentage(i.ammo,r,c),this.txtReloadTime.text=i.reload_speed,this.barReloadTime.value=z.ToPercentage(i.reload_speed,d,l),this._setCompareBar(this.barAtk,a.atk-i.atk,o-s),this._setCompareBar(this.barAmmo,a.ammo-i.ammo,c-r),this._setCompareBar(this.barReloadTime,i.reload_speed-a.reload_speed,d-l)}_setCompareBar(e,t,n){let i=e.getChildByName("positive"),a=e.getChildByName("negative");i.visible=t>0,a.visible=t<0,0!=t&&(a.x=i.x=e.width*e.value,a.width=i.width=Math.abs(t)/n*e.width)}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnTry.clickHandler=new Laya.Handler(this,this._tryClick)}_closeClick(){this._isLose?(console.log("this._isclose00----",this._isLose),J.Instance.close(Q.TryOut),console.log("this._isclose11----",this._isLose)):(console.log("this._isclose22----",this._isLose),J.Instance.close(Q.TryOut).open(Q.Desc),console.log("this._isclose33----",this._isLose))}_tryClick(){this.btnTry.mouseEnabled=!1,L.AldEvent("试用看视频"),M.showVideoAd(e=>{e?(this.btnTry.gray=!0,lt.IsInTryOut=!0,lt.TryTimes=F.Instance.curAccountData.tryOutTimes,this._isLose?J.Instance.close(Q.TryOut):J.Instance.close(Q.TryOut).open(Q.Desc)):(S.ShowToast("只有观看完整视频才能试用哦!"),this.btnTry.mouseEnabled=!0)})}}lt.TryOutGunId=0,lt.IsInTryOut=!1,lt.TryTimes=0;class dt{static get Zero(){return new Laya.Vector3(0,0,0)}static get Up(){return new Laya.Vector3(0,1,0)}static Add(e,t){return new Laya.Vector3(e.x+t.x,e.y+t.y,e.z+t.z)}static Substract(e,t){return new Laya.Vector3(e.x-t.x,e.y-t.y,e.z-t.z)}static Scale(e,t){let n=dt.Zero;return Laya.Vector3.scale(e,t,n),n}static Lerp(e,t,n){let i=dt.Zero;return Laya.Vector3.lerp(e,t,n,i),i}static ClampEuler(e){return new Laya.Vector3(z.ClampEuler(e.x),z.ClampEuler(e.y),z.ClampEuler(e.z))}}class pt{static U3dToLayaFov(e){return e*(Laya.stage.width/Laya.stage.height)/(et.width/et.height)}}class gt{static get Instance(){return null==this._Instance&&(this._Instance=new gt),this._Instance}createScene(e,t){this._scene=new Laya.Scene3D,this._camera=new Laya.Camera,this._camera.transform.position=new Laya.Vector3(0,0,15),this._camera.clearFlag=2,this._camera.fieldOfView=pt.U3dToLayaFov(12),this._scene.addChild(this._camera);let n=new Laya.DirectionLight;this._scene.addChild(n),n.transform.position=new Laya.Vector3(0,2,1),n.transform.rotationEuler=new Laya.Vector3(-60,0,0),this._gunPos=new Laya.Sprite3D,this._scene.addChild(this._gunPos),e.addChild(this._scene),this._camera.viewport=t;let i=tt.Instance.getPref("light"),a=Laya.Sprite3D.instantiate(i);this._scene.addChild(a),a.transform.localPosition=new Laya.Vector3(-.86,1.6,0),a.transform.localRotationEuler=new Laya.Vector3(0,180,0);let s=new Laya.DirectionLight;this._scene.addChild(s)}changeGun(e){this._gunPos.destroyChildren(),this._gunPos.transform.rotationEuler=dt.Zero;let t=tt.Instance.getPref(e),n=Laya.Sprite3D.instantiate(t),i=n.getChildAt(0);i.removeSelf(),n.destroy(),this._gunPos.addChild(i);let a=.15;switch(e){case"wpn_model_AWP":a=.3;break;case"wpn_model_Dragon":a=.4;break;case"wpn_model_FRF2":case"wpn_model_M82A1":case"wpn_model_SVD":a=.3}i.transform.localPosition=new Laya.Vector3(a,.9,0),i.transform.localRotationEuler=new Laya.Vector3(-90,-90,0)}destroyScene(){this._scene.destroy(),this._scene=null,this._camera=null,this._gunPos=null}rotate(e){this._gunPos.transform.rotate(new Laya.Vector3(0,e,0),!0,!1)}}const ut="res/skin/",yt=".png",mt=["#1262c3","#1fbf17","#d00e0f","#08f7d8","#e1cf51","#62fe05","#a131fa","#ff7202","#e787f5","#ecf951"];class _t extends fe.MainUI{constructor(){super(),this._isMenuExpanded=!0,this._isInEnergyTikTok=!1}onOpen(e){if(_t._IsFirstTime){_t._IsFirstTime=!1;let e=F.Instance.curAccountData.isFirstLogin;e||0==se.Instance.offlineIncome?(se.Instance.start(),this._initGuide(),!e&&this._checkCanSign()&&J.Instance.open(Q.Sign)):J.Instance.open(Q.OfflineIncome,Laya.Handler.create(this,()=>{this._initGuide(),!e&&this._checkCanSign()&&J.Instance.open(Q.Sign)}))}else this._initGuide();this._initMainMenuScene(),this._initData(),this._initUI(),this._btnHandler(),rt.Instance.backToMain(),ee.Instance.on(te.MoneyMgr.RefreshMoney,this,this._refreshMoney),ee.Instance.on(te.MainUIInfo.RedDotRefresh,this,this._refreshRedDot),ee.Instance.on(te.MainUIInfo.GunListRefresh,this,this._refreshGunList),ee.Instance.on(te.MainUIInfo.AirDropRefresh,this,this._refreshAirDrop),ee.Instance.on(te.MainUIInfo.FloatAirDropRefresh,this,this._refreshFloatAirDrop),ee.Instance.on(te.IncomeMgr.RefreshRate,this,this._refreshIncomeRate),L.AldEvent("打开主界面")}onClose(){gt.Instance.destroyScene(),ee.Instance.off(te.MoneyMgr.RefreshMoney,this,this._refreshMoney),ee.Instance.off(te.MainUIInfo.RedDotRefresh,this,this._refreshRedDot),ee.Instance.off(te.MainUIInfo.GunListRefresh,this,this._refreshGunList),ee.Instance.off(te.MainUIInfo.AirDropRefresh,this,this._refreshAirDrop),ee.Instance.off(te.MainUIInfo.FloatAirDropRefresh,this,this._refreshFloatAirDrop),ee.Instance.off(te.IncomeMgr.RefreshRate,this,this._refreshIncomeRate),Laya.timer.clear(this,this._autoRotateGun),L.AldEvent("关闭主界面")}onActive(){Ne.canShowIncomeUI=!0}onInactive(){Ne.canShowIncomeUI=!1}onResize(){this.height=Laya.stage.height}_initMainMenuScene(){let e=new Laya.Viewport(this.gunModel.x,this.gunModel.y,this.gunModel.width,this.gunModel.height);if(gt.Instance.createScene(this.gunModel,e),lt.IsInTryOut){let e=F.Instance.curAccountData.getThemeById(lt.TryOutGunId);gt.Instance.changeGun(e.model)}else gt.Instance.changeGun(F.Instance.curAccountData.equipGun.model);Laya.timer.frameLoop(1,this,this._autoRotateGun)}_initData(){let e=F.Instance.curAccountData;this._energy=e.energy,this._energyRecTime=e.energyRecTime}_initUI(){this.txtLevel.text=`第${F.Instance.curAccountData.levelId}关`,this.ani4.play(0,!0),this.ani5.play(0,!0),this._refreshEnergyUI(),this._refreshMoney(),this._refreshBuySlot(),this._refreshRedDot(),this._refreshAirDrop(),this._refreshFloatAirDrop(),this._refreshIncomeRate()}_refreshMoney(){this.txtCoin.text=Ie.ToKMB(ie.Instance.vmoney,2),this.txtDiamond.text=Ie.ToKMB(ie.Instance.diamond,2),this._energy=F.Instance.curAccountData.energy;let e=Ie.ToKMB(se.Instance.totalOutPerSeconed,2);this.txtMoneySpeed.text=`+${e}/秒`,this._refreshEnergyUI()}_btnHandler(){this.btnStart.clickHandler=new Laya.Handler(this,this._startGame),this.btnMenu.clickHandler=new Laya.Handler(this,this._toggleMenu),this.btnSign.clickHandler=new Laya.Handler(this,this._goTo,[Q.Sign]),this.btnRank.clickHandler=new Laya.Handler(this,this._goTo,[Q.Rank]),this.btnAchievement.clickHandler=new Laya.Handler(this,this._goTo,[Q.Achievement]),this.btnSetting.clickHandler=new Laya.Handler(this,this._goTo,[Q.Setting]),this.btnLottery.clickHandler=new Laya.Handler(this,this._goTo,[Q.Lottery]),this.btnDaily.clickHandler=new Laya.Handler(this,this._goTo,[Q.DailyGift]),this.btnGetEnergy.clickHandler=new Laya.Handler(this,this._goTo,[Q.GetEnergy]),this.btnFriendHelp.clickHandler=new Laya.Handler(this,this._goTo,[Q.FriendAssist]),this.btnSkin.clickHandler=new Laya.Handler(this,this._closeThenGoTo,[Q.Main,Q.Skin]),this.btnShop.clickHandler=new Laya.Handler(this,this._closeThenGoTo,[Q.Main,Q.Shop]),this.btnSpeedup.clickHandler=new Laya.Handler(this,this._boost),this.btnBuy.clickHandler=new Laya.Handler(this,this._buyGun),this.btnTouchArea.clickHandler=new Laya.Handler(this,this._touchScreen),this.btnDiamond.clickHandler=new Laya.Handler(this,this._addDiamond),this.btnFree.clickHandler=new Laya.Handler(this,this._airDropClick),this.btnFloatAirDrop.clickHandler=new Laya.Handler(this,this._floatAirDropClick)}_startGame(){0!=this._energy?(F.Instance.curAccountData.refreshLevel(),F.Instance.curAccountData.level.preMsgId>0?J.Instance.close(Q.Main).open(Q.Conversation,!0):(console.log("tryoutview.cantryout--",lt.CanTryOut),lt.CanTryOut?J.Instance.close(Q.Main).open(Q.TryOut,[null,!1]):J.Instance.close(Q.Main).open(Q.Desc))):J.Instance.open(Q.GetEnergy)}_toggleMenu(){let e=this._isMenuExpanded?-this.menu.width:0;this._isMenuExpanded=!this._isMenuExpanded,Laya.Tween.to(this.menu,{x:e},300,Laya.Ease.linearInOut),this._refreshRedDot()}_goTo(e){J.Instance.open(e)}_closeThenGoTo(e,t){J.Instance.close(e).open(t)}_touchScreen(){}_refreshEnergyUI(){let e=F.Instance.curAccountData.getGlobal(h.energy_init);this.txtEnergy.text=this._energy.toString(),this._energy>=e?this.txtPowerRecTime.visible=!1:this._isInEnergyTikTok||(this.txtPowerRecTime.visible=!0,Laya.timer.loop(1e3,this,this._energyTiktok),this._energyTiktok())}_energyTiktok(){this._energyRecTime>0?(this.txtPowerRecTime.text=Ie.ToTimeMS(this._energyRecTime),this._energyRecTime--,this._isInEnergyTikTok=!0):(this._isInEnergyTikTok=!1,this.txtPowerRecTime.text="00:00",this._energy++,this._energyRecTime=F.Instance.curAccountData.getGlobal(h.tilirec),Laya.timer.clear(this,this._energyTiktok),this._refreshEnergyUI())}_refreshBuySlot(){let e,t=F.Instance.curAccountData.getUser(O.unlock_kun);if(t<=4)e=1;else{let n=t-4,i=t-6;i<1&&(i=1),e=z.RandInt(i,n)}this._gunData=F.Instance.curAccountData.cfg.gunDic.get(e);let n=F.Instance.curAccountData.getUser(O.buyed_kun)[e]||0;this._gunPrice=Number(this._gunData.money)+n*this._gunData.addMoney,this.txtGunPrice.text=Ie.ToKMB(this._gunPrice,2),this.imgGun.skin=ut+this._gunData.icon+yt,this.imgGun.scaleX=this.imgGun.scaleY=.4,this.fcGunLevel.value=e,this.imgPolygon.graphics.clear();let i=mt[e%mt.length];this.imgPolygon.graphics.drawPoly(.5,0,[0,17,10,0,29,0,39,17,29,34,10,34],i,i,0)}_buyGun(){this.btnBuy.mouseEnabled=!1,ee.Instance.trigger(te.MainUIGuide.BuyGun);let e=F.Instance.curAccountData.getUser(O.list_kun),t=0;e.forEach(e=>{e>0&&t++},this),t>=12?(Ce.ShowToast("枪支已满!"),this.btnBuy.mouseEnabled=!0):ie.Instance.vmoney>=this._gunPrice?this._sendBuyGun(Laya.Handler.create(this,e=>{ie.Instance.updateMoney(-this._gunPrice),Ce.ShowToast(`恭喜获得${this._gunData.name}`),ie.Instance.syncData(),this._refreshBuySlot(),this.gunList.getComponent(Ne).refreshList(),this.btnBuy.mouseEnabled=!0}),Laya.Handler.create(this,e=>{console.log(`[LOG]${e.message}`),Ce.ShowToast("金币不足!"),this.btnBuy.mouseEnabled=!0})):(We.CanOpenWhenBuy?J.Instance.open(Q.AirDrop,[g.BuyGun,null]):Ce.ShowToast("金币不足!"),this.btnBuy.mouseEnabled=!0)}_boost(){J.Instance.open(Q.IncomeBoost),ee.Instance.trigger(te.MainUIGuide.Boost)}_sendBuyGun(e,t){let n=[{t:F.Instance.ServerTime.toString()},{id:this._gunData.id.toString()}];D.Instance.HttpPostRequest(C.BuyGun,n,e,t)}_addDiamond(){L.AldEvent("买钻石看视频"),M.showVideoAd(e=>{if(e){let e=[{reward_item:"2000"},{reward_num:F.Instance.curAccountData.videoDiamondReward},{t:F.Instance.ServerTime.toString()}];D.Instance.HttpPostRequest(C.Fission,e,Laya.Handler.create(this,e=>{let t=e.rewards;t[2e3]&&J.Instance.open(Q.DiamondEffect,Laya.Handler.create(this,()=>{J.Instance.open(Q.Reward,[p.diamond,t[2e3],Laya.Handler.create(this,()=>{ie.Instance.refreshMoney()})])}))}),Laya.Handler.create(this,e=>{}))}else S.ShowToast("只有观看完整视频才能领取哦!")})}_initGuide(){1!=F.Instance.curAccountData.levelId||F.Instance.curAccountData.isGuideLv1Ended?2!=F.Instance.curAccountData.levelId||F.Instance.curAccountData.isGuideLv2Ended?4!=F.Instance.curAccountData.levelId||F.Instance.curAccountData.isGuideLv4Ended||J.Instance.open(Q.ExtraGuide,4):J.Instance.open(Q.ExtraGuide,1):J.Instance.open(Q.ExtraGuide,6)}get _isUnsigned(){if(!F.Instance.curAccountData.sign)return!0;let e=new Date(1e3*F.Instance.ServerTime);e.setHours(0,0,0,0);var t=1e3*Number(F.Instance.curAccountData.getSign(X.sign_time));return new Date(t).valueOf()<e.valueOf()}get _isAchCollected(){let e=F.Instance.curAccountData.task||{},t=F.Instance.curAccountData.getConfig(V.achievement);for(let n=1;n<=t.length/5;n++){let i=n,a=1,s=0,o=!1,r=e[n];if(r&&(i=Number(r.type),a=Number(r.level)+1,s=Number(r.progress),a>5&&(o=!0,a=5)),s>=W.Find(t,e=>e.type==i&&e.level==a).require_num&&!o)return!1}return!0}_refreshRedDot(){let e=this.btnMenu.getChildByName("dot");e&&(e.visible=!this._isMenuExpanded&&(this._isUnsigned||!this._isAchCollected));let t=this.btnSign.getChildByName("dot");t&&(t.visible=this._isMenuExpanded&&this._isUnsigned);let n=this.btnAchievement.getChildByName("dot");n&&(n.visible=this._isMenuExpanded&&!this._isAchCollected)}_autoRotateGun(){gt.Instance.rotate(1)}_refreshGunList(){this.gunList.getComponent(Ne).refreshList()}_checkCanSign(){if(!F.Instance.curAccountData.sign)return!0;let e=new Date(1e3*F.Instance.ServerTime);e.setHours(0,0,0,0);var t=1e3*Number(F.Instance.curAccountData.getSign(X.sign_time));return new Date(t).valueOf()<e.valueOf()}_airDropClick(){J.Instance.open(Q.AirDrop,[g.Main,Laya.Handler.create(this,()=>{this._refreshAirDrop()})])}_floatAirDropClick(){J.Instance.open(Q.AirDrop,[g.Float,Laya.Handler.create(this,()=>{this._refreshFloatAirDrop()})])}_refreshAirDrop(){this.btnFree.visible=We.CanShowInMain}_refreshFloatAirDrop(){this.floatBox.visible=We.CanFloatInMain}_refreshIncomeRate(){this.txtIncomeAmountUp.text=`收益x${se.Instance.totalAmount}%`,this.txtIncomeSpeedUp.text=`加速x${se.Instance.totalTime}%`}}_t._IsFirstTime=!0;class It{static Log(e){}}class wt{static get Instance(){return null==this._Instance&&(this._Instance=new wt),this._Instance}on(){Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this._startDrag)}off(){Laya.stage.off(Laya.Event.MOUSE_DOWN,this,this._startDrag)}_startDrag(e){e.target instanceof Laya.UIComponent||(this.downPos=new Laya.Vector2(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY),this.lastDragPos=new Laya.Vector2(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY),this.dragPos=new Laya.Vector2(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY),this.isPressed=!0,Laya.stage.on(Laya.Event.MOUSE_UP,this,this._endDrag),Laya.stage.on(Laya.Event.MOUSE_OUT,this,this._endDrag),Laya.timer.frameLoop(1,this,this._onDrag),It.Log("down"))}_endDrag(e){this.isPressed=!1,Laya.timer.clear(this,this._onDrag),Laya.stage.off(Laya.Event.MOUSE_UP,this,this._endDrag),Laya.stage.off(Laya.Event.MOUSE_OUT,this,this._endDrag),It.Log("up")}_onDrag(){this.isPressed&&(this.lastDragPos=this.dragPos,this.dragPos=new Laya.Vector2(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY),It.Log("move"))}getDownOffset(){let e=this.dragPos.x-this.downPos.x,t=this.dragPos.y-this.downPos.y;return new Laya.Vector2(e,t)}getLastDragOffset(){let e=this.dragPos.x-this.lastDragPos.x,t=this.dragPos.y-this.lastDragPos.y;return new Laya.Vector2(e,t)}getDownAxisX(){let e=2*(this.dragPos.x-this.downPos.x)/Laya.stage.width;return z.Clamp(e,-1,1)}getDownAxisY(){let e=2*(this.dragPos.y-this.downPos.y)/Laya.stage.height;return z.Clamp(e,-1,1)}}class ft{}ft.ActorIdProperty=Symbol("ActorId");class xt{static Play(e,t,n=null,i=null,a=null){if(null==e||null==e.getControllerLayer())return void(i&&i.run());let s=e.getControllerLayer().getAnimatorState(t);if(null!=s){if(null!=n&&(s.clip.islooping=n),null!=a&&(s.speed=a),e.play(t),i){let t=()=>{e.getCurrentAnimatorPlayState().normalizedTime>=1&&(Laya.timer.clear(this,t),i.run())};Laya.timer.frameLoop(1,this,t)}}else i&&i.run()}}class vt extends Laya.Script3D{constructor(){super()}onAwake(){this._gameobject=this.owner;let e=this._gameobject[ft.ActorIdProperty];this._actor=zt.Instance.getActor(e)}}class kt{static GetChild(e,t){let n=[];for(let t=0;t<e.numChildren;t++)n.push(e.getChildAt(t));for(;n.length>0;){let e=n.shift();if(t(e))return e;for(let t=0;t<e.numChildren;t++)n.push(e.getChildAt(t))}return null}static GetChildByName(e,t){return kt.GetChild(e,e=>e.name==t)}static getChildren(e,t){let n=[],i=[];for(let t=0;t<e.numChildren;t++)i.push(e.getChildAt(t));for(;i.length>0;){let e=i.shift();t(e)&&n.push(e);for(let t=0;t<e.numChildren;t++)i.push(e.getChildAt(t))}return n}}const Mt="headPos",Lt="Main/hp.png";class bt extends Laya.Script3D{constructor(){super()}onAwake(){this._gameobject=this.owner;let e=this._gameobject[ft.ActorIdProperty];this._actor=zt.Instance.getActor(e),this._headPos=kt.GetChildByName(this._gameobject,Mt),this._hpBar=new Laya.ProgressBar(Lt),this._hpBar.anchorX=this._hpBar.anchorY=.5,Laya.stage.addChild(this._hpBar),this._hpBar.value=this._actor.curHp/this._actor.maxHp}onUpdate(){let e=new Laya.Sprite3D;e.transform.position=this._headPos.transform.position.clone(),e.transform.rotationEuler=this._headPos.transform.rotationEuler.clone(),e.transform.translate(new Laya.Vector3(0,.4,0),!1);let t=dt.Zero;Un.Instance.camera.worldToViewportPoint(e.transform.position,t),this._hpBar.pos(t.x,t.y),this._hpBar.value=this._actor.curHp/this._actor.maxHp,Un.Instance.camera.fieldOfView==Un.Instance.scopeFov?this._hpBar.scaleX=this._hpBar.scaleY=1:this._hpBar.scaleX=this._hpBar.scaleY=.5}onDestroy(){this._hpBar.destroy(),this._hpBar=null}}class St{static GetAnimator(e){return e.getChildAt(0).getComponent(Laya.Animator)}static SetColliderInactive(e){kt.getChildren(e,e=>e.getComponent(Laya.PhysicsCollider)).forEach(e=>{let t=e.getComponent(Laya.PhysicsCollider);t&&(t.enabled=!1)},this)}static HideHpBar(e){let t=e.getComponent(bt);t&&t.destroy()}}class At extends vt{constructor(){super(),this._t=0}onAwake(){super.onAwake(),this._animator=St.GetAnimator(this._gameobject),xt.Play(this._animator,e[e.Idle],!0),this._targets=[],this._actor.atkTarget.forEach(e=>{this._targets.push(zt.Instance.getActor(e))},this),this._dura=1/this._actor.atkSpeed}onUpdate(){ot.Instance.state==st.InGame&&(null==this._curTarget&&0==this._targets.length?this.destroy():(this._t+=Ge.Instance.delta/1e3,this._t>=this._dura&&(this._t-=this._dura,null==this._curTarget&&(this._curTarget=this._targets.shift(),this._gameobject.transform.lookAt(this._curTarget.sprite.transform.position,dt.Up,!0),this._gameobject.transform.rotate(new Laya.Vector3(0,180,0),!0,!1)),this._actor.fire(),this._curTarget.attacked(this._actor.atk),this._curTarget.isAlive||(this._curTarget.actorStateCtrl.request(Ot.NoHp),this._curTarget=null),zt.Instance.isProtectedDead&&(rt.Instance.lose(d.ProtectDead),this.destroy()))))}}class Ct extends vt{constructor(){super(),this._t=0}onAwake(){super.onAwake(),this._animator=St.GetAnimator(this._gameobject),xt.Play(this._animator,e[e.Idle],!0),this._dura=1/this._actor.atkSpeed,this._targetPos=Hn.Instance.player.transform.position.clone(),this._targetPos.y=this._gameobject.transform.position.y,this._gameobject.transform.lookAt(this._targetPos,dt.Up,!0),this._gameobject.transform.rotate(new Laya.Vector3(0,180,0),!0,!1)}onUpdate(){ot.Instance.state==st.InGame&&(this._t+=Ge.Instance.delta/1e3,this._t>=this._dura&&(this._t-=this._dura,this._actor.fire(),Hn.Instance.attacked(this._actor.atk),Hn.Instance.isAlive||(rt.Instance.lose(d.PlayerDead),this.destroy())))}}const Dt=.25;class Tt extends Laya.Script3D{constructor(){super(),this._t=0}onAwake(){this._gameobject=this.owner;let e=this._gameobject[ft.ActorIdProperty];this._actor=zt.Instance.getActor(e);let t=tt.Instance.getPref(Ze[Ze.TargetArrow]);this._arrow=Laya.Sprite3D.instantiate(t),this._gameobject.addChild(this._arrow),this._arrowLocalOrigin=this._arrow.transform.localPosition.clone(),this._arrow.getChildAt(0).meshRenderer.material.albedoColor=this._actor.arrowColor.clone()}onUpdate(){if(ot.Instance.state!=st.InGame)return;if(this.destroyed)return;this._t+=Ge.Instance.delta/1e3*2*Math.PI/2;let e=this._arrowLocalOrigin.y+Dt*Math.sin(this._t);this._arrow.transform.localPosition=new Laya.Vector3(this._arrowLocalOrigin.x,e,this._arrowLocalOrigin.z)}onDestroy(){this._arrow.destroy()}}class Bt extends vt{constructor(){super(),this._t=0}onAwake(){super.onAwake(),this._animator=St.GetAnimator(this._gameobject),xt.Play(this._animator,e[e.Run],!0),this._actor.moveSpeed&&console.log("[LOG]Warning!!!NPC逃跑速度为0")}onUpdate(){if(ot.Instance.state==st.InGame)if(null==this._targetPos&&0==this._actor.movePosArr.length)xt.Play(this._animator,e[e.Idle],!0),this._actor.npcType==r[r.target]&&rt.Instance.lose(d.TargetEscape),this.destroy();else if(null==this._targetPos&&(this._targetPos=this._actor.movePosArr.shift(),this._gameobject.transform.lookAt(this._targetPos,dt.Up,!0),this._gameobject.transform.rotate(new Laya.Vector3(0,180,0),!0,!1),this._origin=this._gameobject.transform.position.clone(),this._dura=Laya.Vector3.distance(this._origin,this._targetPos)/this._actor.moveSpeed,this._t=0),this._t+=Ge.Instance.delta/1e3/this._dura,this._t>=1)this._gameobject.transform.position=this._targetPos.clone(),this._targetPos=null;else{let e=dt.Lerp(this._origin,this._targetPos,this._t);this._gameobject.transform.position=e.clone()}}}class Nt extends vt{constructor(){super(),this._deadActors=[],this._t=0}onAwake(){super.onAwake(),this._animator=this._gameobject.getComponent(Laya.Animator),this._targetPos=this._actor.dropPos.clone(),this._targetPosOverhead=this._actor.dropPos.clone(),this._targetPosOverhead.y+=1.8,this._originPos=this._gameobject.transform.position.clone();let e=Laya.Vector3.distance(this._originPos,this._targetPosOverhead);this._dura=Math.sqrt(2*e/this._actor.dropAccel),this._dir=dt.Substract(this._targetPosOverhead,this._originPos),Laya.Vector3.normalize(this._dir,this._dir),this._killActors(),!zt.Instance.isProtectedDead&&zt.Instance.isAllTargetsDead?Hn.Instance.playKillCloseUp(Laya.Handler.create(this,()=>{x.Instance.playSound(l.hit)})):x.Instance.playSound(l.hit)}onUpdate(){if(ot.Instance.state==st.InGame)if(this._t+=Ge.Instance.delta/1e3,this._t>=this._dura)this._gameobject.transform.position=this._targetPosOverhead,this._playActorsDeathAnim(),this._gameobject.active=!1,this.destroy(),zt.Instance.isProtectedDead?rt.Instance.lose(d.ProtectDead):zt.Instance.isAllTargetsDead&&rt.Instance.win();else{let e=this._actor.dropAccel*Math.pow(this._t,2)/2,t=dt.Scale(this._dir,e),n=dt.Add(this._originPos,t);this._gameobject.transform.position=n}}_isInAtkRange(e){let t=Math.abs(e.x-this._targetPos.x),n=Math.abs(e.y-this._targetPos.y),i=Math.abs(e.z-this._targetPos.z);return t<=this._actor.detectArea.x&&n<=this._actor.detectArea.y&&i<=this._actor.detectArea.z}_killActors(){zt.Instance.getAllActors().forEach(e=>{e.isHuman&&this._isInAtkRange(e.sprite.transform.position)&&(e.attacked(this._actor.atk),e.isAlive||this._deadActors.push(e))},this)}_playActorsDeathAnim(){this._deadActors.forEach(e=>{e.actorStateCtrl.request(Ot.NoHp)},this)}}const Gt="boom";class Et extends vt{constructor(){super(),this._isExploded=!1,this._deadActors=[]}onAwake(){super.onAwake(),this._animator=this._gameobject.getComponent(Laya.Animator)}onUpdate(){this._isExploded||(this._isExploded=!0,this._killActors(),!zt.Instance.isProtectedDead&&zt.Instance.isAllTargetsDead?Hn.Instance.playKillCloseUp(Laya.Handler.create(this,()=>{this._gameobject.active=!1,this._createExplodeEffect(),this.destroy(),this._playActorsDeathAnim(),rt.Instance.win()})):(this._gameobject.active=!1,this._createExplodeEffect(),this.destroy(),this._playActorsDeathAnim(),zt.Instance.isProtectedDead&&rt.Instance.lose(d.ProtectDead)))}_isInAtkRange(e){let t=Math.abs(e.x-this._gameobject.transform.position.x),n=Math.abs(e.y-this._gameobject.transform.position.y),i=Math.abs(e.z-this._gameobject.transform.position.z);return t<=this._actor.detectArea.x&&n<=this._actor.detectArea.y&&i<=this._actor.detectArea.z}_killActors(){zt.Instance.getAllActors().forEach(e=>{e.isHuman&&this._isInAtkRange(e.sprite.transform.position)&&(e.attacked(this._actor.atk),e.isAlive||this._deadActors.push(e))},this)}_playActorsDeathAnim(){this._deadActors.forEach(e=>{e.actorStateCtrl.request(Ot.NoHp)})}_createExplodeEffect(){let e=tt.Instance.getPref(Gt),t=Laya.Sprite3D.instantiate(e);In.Instance.root.addChild(t),t.transform.position=this._gameobject.transform.position.clone(),x.Instance.playSound(l.explode)}}class Ht{}Ht.All=Laya.Physics3DUtils.COLLISIONFILTERGROUP_ALLFILTER,Ht.NPC=Laya.Physics3DUtils.COLLISIONFILTERGROUP_CUSTOMFILTER1,Ht.AimAssist=Laya.Physics3DUtils.COLLISIONFILTERGROUP_CUSTOMFILTER2;const Pt="gunPos",Rt="muzzle",Ut="AimAssist";class zt{static get Instance(){return null==this._Instance&&(this._Instance=new zt),this._Instance}constructor(){this._actorDic=new T}init(){this.isProtectedDead=!1,this.isAllTargetsDead=!1;let e=F.Instance.curAccountData;e.level.actors.forEach(t=>{let n=e.cfg.actorDic.get(t),i=tt.Instance.getPref(n.prefab),a=Laya.Sprite3D.instantiate(i);a[ft.ActorIdProperty]=t,In.Instance.root.addChild(a),a.transform.position=n.spawnPos.clone(),a.transform.rotationEuler=n.spawnRota.clone(),this._setCollisionGroup(a);let s=new Vt(a,n);this._actorDic.set(t,s),s.weapon&&s.createWeapon(),s.isHuman&&-1!=s.prefab.indexOf("male")&&s.sprite.addComponent(bt)},this)}_setCollisionGroup(e){kt.getChildren(e,e=>e.getComponent(Laya.PhysicsCollider)).forEach(e=>{let t=Ht.NPC;e.name==Ut&&(t=Ht.AimAssist),e.getComponent(Laya.PhysicsCollider).collisionGroup=t},this)}getActor(e){return this._actorDic.get(e)}getAllActors(){return this._actorDic.values()}clearAll(){this._actorDic.keys().forEach(e=>{this._actorDic.delete(e).sprite.destroy()},this)}showHint(){this._actorDic.keys().forEach(e=>{let t=this._actorDic.get(e);t.isAlive&&t.arrow&&(t.sprite.getComponent(Tt)||t.sprite.addComponent(Tt))},this)}clearAtkScript(){this._actorDic.keys().forEach(e=>{let t=this._actorDic.get(e),n=t.sprite.getComponent(Ct);n&&n.destroy();let i=t.sprite.getComponent(At);i&&i.destroy()},this)}}class Vt{constructor(e,t){this.actorId=t.actorId,this.prefab=t.prefab,this.sprite=e,this.response=t.response,this.movePosArr=[],t.movePosArr.forEach(e=>{this.movePosArr.push(e.clone())},this),this.moveSpeed=t.moveSpeed,this.dropPos=t.dropPos.clone(),this.dropAccel=t.dropAccel,this.detectArea=t.detectArea,this.atkSpeed=t.atkSpeed,this.atkTarget=t.atkTarget.concat(),this.curHp=t.hp,this.maxHp=t.hp,this.atk=t.atk,this.npcType=t.npcType,this.arrow=t.arrow,this.arrowColor=t.arrowColor.clone(),this.isHuman=t.isHuman,this.weapon=t.weapon,this.anim=t.anim,this.loop=t.loop,this.isAlive=!0,this.actorStateCtrl=new Xt(new qt,this)}attacked(e){this.isAlive&&(0==e&&console.log("[LOG]Warning!!!攻击力为0"),this.curHp-=e,this.curHp<=0&&(this.curHp=0,this.isAlive=!1,St.SetColliderInactive(this.sprite),St.HideHpBar(this.sprite),en.Instance.stopDead()),this._checkTargets())}_checkTargets(){let e=zt.Instance.getAllActors(),t=!1,n=!0;e.forEach(e=>{e.npcType!=r[r.protect]||e.isAlive||(t=!0),e.npcType==r[r.target]&&e.isAlive&&(n=!1)},this),t?zt.Instance.isProtectedDead=!0:n&&(zt.Instance.isAllTargetsDead=!0)}createWeapon(){let e=tt.Instance.getPref(this.weapon);null!=e?(this._gun=Laya.Sprite3D.instantiate(e),this._gunPos=kt.GetChildByName(this.sprite,Pt),this._gunPos.addChild(this._gun),this._gun.transform.localPosition=dt.Zero,this._gun.transform.localRotationEuler=dt.Zero,this._gun.transform.localScale=new Laya.Vector3(1,1,1),this._muzzle=kt.GetChildByName(this._gun,Rt)):console.log(`[LOG]找不到预制${this.weapon}`)}fire(){let t=St.GetAnimator(this.sprite);xt.Play(t,e[e.Idle],!1),this.weapon==s[s.pistol]?xt.Play(t,e[e.Shoot1],!1):this.weapon==s[s.rifle]&&xt.Play(t,e[e.Shoot2],!1)}}var Ot;!function(e){e[e.StoryStart=0]="StoryStart",e[e.GunShoot=1]="GunShoot",e[e.NoHp=2]="NoHp"}(Ot||(Ot={}));class Xt{constructor(e,t){this.setState(e),this.actor=t}setState(e){this._state=e}get state(){return this._state}request(e){this._state.handle(this,e)}}class qt{handle(e,t){switch(t){case Ot.StoryStart:e.setState(new Yt)}}}class Yt{handle(e,t){switch(t){case Ot.NoHp:let n=e.actor.sprite.getComponent(Tt);n&&n.destroy(),e.actor.isHuman?(e.setState(new Wt),this._goDie(e)):(e.setState(new Wt),this._thingActived(e));break;case Ot.GunShoot:e.actor.isHuman&&(this._npcFrightened(e),e.setState(new Ft))}}_goDie(t){let n=t.actor.sprite,i=St.GetAnimator(n);xt.Play(i,e[e.Death],!1,Laya.Handler.create(this,()=>{}))}_thingActived(e){if("Car"==e.actor.prefab){let n=e.actor.sprite.getChildAt(0).getComponent(Laya.Animator);xt.Play(n,t[t.Death])}switch(e.actor.response){case o[o.drop]:e.actor.sprite.addComponent(Nt);break;case o[o.explode]:e.actor.sprite.addComponent(Et)}}_npcFrightened(t){let n=St.GetAnimator(t.actor.sprite);switch(t.actor.response){case a[a.move]:t.actor.sprite.addComponent(Bt);break;case a[a.shootnpc]:t.actor.sprite.addComponent(At);break;case a[a.shootplayer]:t.actor.sprite.addComponent(Ct);break;case a[a.stand]:xt.Play(n,e[e.Idle],!0);break;case a[a.anim]:xt.Play(n,t.actor.anim,t.actor.loop)}}}class Ft{handle(e,t){switch(t){case Ot.NoHp:e.setState(new Wt);let n=e.actor.sprite.getComponent(Tt);n&&n.destroy();let i=e.actor.sprite.getComponent(vt);i&&i.destroy(),this._goDie(e)}}_goDie(t){let n=t.actor.sprite,i=St.GetAnimator(n);xt.Play(i,e[e.Death],!1,Laya.Handler.create(this,()=>{}))}}class Wt{handle(e,t){}}class jt{static MoveTo(e,t,n,i,a,s){let o=e.position.clone();return Laya.Tween.to(o,{x:t.x,y:t.y,z:t.z,update:new Laya.Handler(this,()=>{e.position=o.clone()})},n,i,a,s)}static RotateTo(e,t,n,i,a,s){let o=e.rotationEuler.clone();o=dt.ClampEuler(o);let r=dt.ClampEuler(t);return Math.abs(r.x-o.x)>180&&(r.x-=360*Math.sign(r.x-o.x)),Math.abs(r.y-o.y)>180&&(r.y-=360*Math.sign(r.y-o.y)),Math.abs(r.z-o.z)>180&&(r.z-=360*Math.sign(r.z-o.z)),Laya.Tween.to(o,{x:r.x,y:r.y,z:r.z,update:new Laya.Handler(this,()=>{e.rotationEuler=o.clone()})},n,i,a,s)}static OpenView(e,t=null,n=200){e.scaleX=e.scaleY=0,e.pos(Laya.stage.width/2,Laya.stage.height/2),Laya.Tween.to(e,{scaleX:1,scaleY:1,x:0,y:0},n,null,t)}static CloseView(e,t=null,n=200){Laya.Tween.to(e,{scaleX:0,scaleY:0,x:Laya.stage.width/2,y:Laya.stage.height/2},n,null,t)}}const $t=1.2,Kt=6;class Zt{static Init(){}static Log(e){}static Indent(){}static Unindent(){}}var Jt,Qt;Zt.StartTimer=0,Zt._curIndent=0,function(e){e[e.normal=0]="normal",e[e.stop=1]="stop",e[e.pause=2]="pause"}(Jt||(Jt={})),function(e){e[e.show=0]="show",e[e.hide=1]="hide",e[e.delay=2]="delay",e[e.rotate=3]="rotate",e[e.move=4]="move",e[e.parallel=5]="parallel",e[e.serial=6]="serial",e[e.anim=7]="anim",e[e.shoot=8]="shoot",e[e.shootplayer=9]="shootplayer"}(Qt||(Qt={}));class en{static get Instance(){return null==this._Instance&&(this._Instance=new en),this._Instance}init(){this._curPartIndex=0,this._partArr=[],F.Instance.curAccountData.level.stories.forEach(e=>{this._partArr.push(new tn(e))},this)}run(){Zt.Init(),Zt.Log("Story Run"),Zt.Indent(),zt.Instance.getAllActors().forEach(e=>{e.actorStateCtrl.request(Ot.StoryStart)},this),this.isStoped=!1,ee.Instance.on(te.StoryCtrl.PartEnd,this,this._curPartEnd),this._curPartEnd()}_curPartEnd(){this._curPartIndex<this._partArr.length?this._nextPart():this._storyEnd()}_nextPart(){let e=this._partArr[this._curPartIndex];this._curPartIndex++,e.run()}_storyEnd(){Zt.Unindent(),Zt.Log("Story End"),ee.Instance.off(te.StoryCtrl.PartEnd,this,this._curPartEnd),ee.Instance.trigger(te.StoryCtrl.StoryEnd)}stopAll(){this.isStoped||(this.isStoped=!0,on.Instance.stopAll())}stopPart(){this.isStoped||(this.isStoped=!0,on.Instance.stopPart())}stopDead(){on.Instance.stopDead()}pause(){on.Instance.pause()}resume(){on.Instance.resume()}}class tn{constructor(e){this.partId=e,this._curNodeIndex=0,this._nodeArr=[],F.Instance.curAccountData.cfg.storyDic.get(e).nodes.forEach(e=>{this._nodeArr.push(new nn(e))},this)}run(){Zt.Log(`Part${this.partId} Run`),Zt.Indent(),ee.Instance.on(te.StoryCtrl.NodeEnd,this,this._curNodeEnd),this._curNodeEnd()}_curNodeEnd(){this._curNodeIndex<this._nodeArr.length?this._nextNode():this._partEnd()}_nextNode(){let e=this._nodeArr[this._curNodeIndex];this._curNodeIndex++,e.run()}_partEnd(){Zt.Unindent(),Zt.Log(`Part${this.partId} End`),ee.Instance.off(te.StoryCtrl.NodeEnd,this,this._curNodeEnd),ee.Instance.trigger(te.StoryCtrl.PartEnd)}}class nn{constructor(e){this.nodeId=e,this._cntEndedAct=0,this._actionArr=[],F.Instance.curAccountData.cfg.storynodeDic.get(e).actions.forEach(e=>{let t=sn.Create(e);this._actionArr.push(t)},this)}run(){Zt.Log(`Node${this.nodeId} Run[↓Parallel↓]`),Zt.Indent(),this._cntEndedAct==this._actionArr.length?this._nodeEnd():this._actionArr.forEach(e=>{let t=te.StoryCtrl.ActionEnd+e.actionId;ee.Instance.on(t,this,this._onActionEnd),e.run()},this)}_onActionEnd(e){let t=te.StoryCtrl.ActionEnd+e;ee.Instance.off(t,this,this._onActionEnd),this._cntEndedAct++,this._actionArr.length==this._cntEndedAct&&this._nodeEnd()}_nodeEnd(){Zt.Unindent(),Zt.Log(`Node${this.nodeId} End[↑Parallel↑]`),ee.Instance.trigger(te.StoryCtrl.NodeEnd)}}class an{constructor(e){this.actionId=e.actionId,this.action=e.action,this.actorId=e.actorId,this._actionData=e}run(){Zt.Log(`Action${this.actionId} Run[${this.action}]`)}_actionEnd(){Zt.Log(`Action${this.actionId} End`);let e=te.StoryCtrl.ActionEnd+this.actionId;ee.Instance.trigger(e,[this.actionId])}}class sn{static Create(e){let t=F.Instance.curAccountData.cfg.actionDic.get(e),n=null;switch(null==t&&console.log(`[LOG]${e}找不到`),t.action){case Qt[Qt.parallel]:n=new cn(t);break;case Qt[Qt.serial]:n=new hn(t);break;case Qt[Qt.show]:n=new ln(t);break;case Qt[Qt.hide]:n=new dn(t);break;case Qt[Qt.delay]:n=new pn(t);break;case Qt[Qt.rotate]:n=new gn(t);break;case Qt[Qt.move]:n=new un(t);break;case Qt[Qt.anim]:n=new yn(t);break;case Qt[Qt.shoot]:n=new mn(t);break;case Qt[Qt.shootplayer]:n=new _n(t)}return n}}class on{constructor(){this._state=Jt.normal,this._tweenDic=new T}static get Instance(){return null==this._Instance&&(this._Instance=new on),this._Instance}addTween(e,t,n){this._tweenDic.set(e,new rn(t,n))}removeTween(e){this._tweenDic.delete(e)}stopAll(){this._state=Jt.stop,this._tweenDic.keys().forEach(e=>{let t=this._tweenDic.delete(e);t.tween.clear(),t.complete.run()},this)}stopPart(){this._state=Jt.stop,this._tweenDic.keys().forEach(e=>{let t=F.Instance.curAccountData.cfg.actionDic.get(e);if(zt.Instance.getActor(t.actorId).response!=a[a.continue]){let t=this._tweenDic.delete(e);t.tween.clear(),t.complete.run()}},this)}stopDead(){this._tweenDic.keys().forEach(e=>{let t=F.Instance.curAccountData.cfg.actionDic.get(e);if(!zt.Instance.getActor(t.actorId).isAlive){let t=this._tweenDic.delete(e);t.tween.clear(),t.complete.run()}},this)}pause(){this._state=Jt.pause,this._tweenDic.keys().forEach(e=>{this._tweenDic.get(e).tween.pause()},this)}resume(){this._state=Jt.normal,this._tweenDic.keys().forEach(e=>{this._tweenDic.get(e).tween.resume()},this)}}class rn{constructor(e,t){this.tween=e,this.complete=t}}class cn extends an{constructor(e){super(e),this._cntEndedAct=0,this._subactionArr=[],this._actionData.sub.forEach(e=>{let t=sn.Create(e);this._subactionArr.push(t)},this)}run(){super.run(),this._cntEndedAct==this._subactionArr.length?this._actionEnd():this._subactionArr.forEach(e=>{let t=te.StoryCtrl.ActionEnd+e.actionId;ee.Instance.on(t,this,this._onSubactionEnd),e.run()},this)}_onSubactionEnd(e){let t=te.StoryCtrl.ActionEnd+e;ee.Instance.off(t,this,this._onSubactionEnd),this._cntEndedAct++,this._cntEndedAct==this._subactionArr.length&&this._actionEnd()}}class hn extends an{constructor(e){super(e),this._subactionArr=[],this._curSubactionIndex=0,this._actionData.sub.forEach(e=>{let t=sn.Create(e);this._subactionArr.push(t)},this)}run(){super.run(),this._curSubactionIndex<this._subactionArr.length?this._nextSubaction():this._actionEnd()}_curSubactionEnd(e){let t=te.StoryCtrl.ActionEnd+e;ee.Instance.off(t,this,this._curSubactionEnd),this._curSubactionIndex<this._subactionArr.length?this._nextSubaction():this._actionEnd()}_nextSubaction(){let e=this._subactionArr[this._curSubactionIndex];this._curSubactionIndex++;let t=te.StoryCtrl.ActionEnd+e.actionId;ee.Instance.on(t,this,this._curSubactionEnd),e.run()}}class ln extends an{constructor(e){super(e)}run(){super.run();let e=zt.Instance.getActor(this._actionData.actorId);en.Instance.isStoped&&e.response!=a[a.continue]||0==e.isAlive?this._actionEnd():(zt.Instance.getActor(this.actorId).sprite.active=!0,this._actionEnd())}}class dn extends an{constructor(e){super(e)}run(){super.run();let e=zt.Instance.getActor(this._actionData.actorId);en.Instance.isStoped&&e.response!=a[a.continue]||0==e.isAlive?this._actionEnd():(zt.Instance.getActor(this.actorId).sprite.active=!1,this._actionEnd())}}class pn extends an{constructor(e){super(e)}run(){super.run();let e=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&e.response!=a[a.continue]||0==e.isAlive)return void this._actionEnd();let t=Laya.Tween.to({x:1},{x:2},this._actionData.delay,null,Laya.Handler.create(this,this._complete));on.Instance.addTween(this.actionId,t,Laya.Handler.create(this,this._complete))}_complete(){on.Instance.removeTween(this.actionId),this._actionEnd()}}class gn extends an{constructor(e){super(e)}run(){super.run();let t=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&t.response!=a[a.continue]||0==t.isAlive)this._actionEnd();else if(this._actionData.delay>0){let t=zt.Instance.getActor(this.actorId).sprite,n=St.GetAnimator(t);xt.Play(n,e[e.Idle],!0);let i={x:1},a=Laya.Tween.to(i,{x:2},this._actionData.delay,null,Laya.Handler.create(this,this._delay));on.Instance.addTween(this.actionId,a,Laya.Handler.create(this,this._delay))}else this._delay()}_delay(){on.Instance.removeTween(this.actionId);let e=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&e.response!=a[a.continue]||0==e.isAlive)return void this._actionEnd();let t=zt.Instance.getActor(this.actorId).sprite,n=jt.RotateTo(t.transform,this._actionData.rota.clone(),this._actionData.dura,null,Laya.Handler.create(this,this._complete));on.Instance.addTween(this.actionId,n,Laya.Handler.create(this,this._complete))}_complete(){on.Instance.removeTween(this.actionId),this._actionEnd()}}class un extends an{constructor(e){super(e)}run(){super.run();let t=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&t.response!=a[a.continue]||0==t.isAlive)this._actionEnd();else if(this._actionData.delay>0){let t=zt.Instance.getActor(this.actorId).sprite,n=St.GetAnimator(t);xt.Play(n,e[e.Idle],!0);let i={x:1},a=Laya.Tween.to(i,{x:2},this._actionData.delay,null,Laya.Handler.create(this,this._rotate));on.Instance.addTween(this.actionId,a,Laya.Handler.create(this,this._rotate))}else this._rotate()}_rotate(){on.Instance.removeTween(this.actionId);let e=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&e.response!=a[a.continue]||0==e.isAlive)return void this._actionEnd();let t=zt.Instance.getActor(this.actorId).sprite,n=new Laya.Sprite3D;n.transform.position=t.transform.position.clone(),n.transform.rotation=t.transform.rotation.clone(),n.transform.lookAt(this._actionData.pos,new Laya.Vector3(0,1,0),!0),n.transform.rotate(new Laya.Vector3(0,180,0),!0,!1);let i=jt.RotateTo(t.transform,n.transform.rotationEuler.clone(),200,null,Laya.Handler.create(this,this._move));on.Instance.addTween(this.actionId,i,Laya.Handler.create(this,this._move)),n.destroy()}_move(){on.Instance.removeTween(this.actionId);let t=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&t.response!=a[a.continue]||0==t.isAlive)return void this._actionEnd();let n=zt.Instance.getActor(this.actorId).sprite,i=St.GetAnimator(n),s=Laya.Vector3.distance(n.transform.position,this._actionData.pos)/this._actionData.speed*1e3,o=this._actionData.anim,r=1;switch(o){case e[e.Walk]:r=this._actionData.speed/$t;break;case e[e.Run]:r=this._actionData.speed/Kt}xt.Play(i,o,!0,null,r);let c=jt.MoveTo(n.transform,this._actionData.pos.clone(),s,null,Laya.Handler.create(this,this._complete));on.Instance.addTween(this.actionId,c,Laya.Handler.create(this,this._complete))}_complete(){on.Instance.removeTween(this.actionId);let t=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&t.response!=a[a.continue]||0==t.isAlive)return void this._actionEnd();let n=zt.Instance.getActor(this.actorId).sprite,i=St.GetAnimator(n);xt.Play(i,e[e.Idle],!0),this._actionEnd()}}class yn extends an{constructor(e){super(e)}run(){super.run();let e=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&e.response!=a[a.continue]||0==e.isAlive)return void this._actionEnd();let t=zt.Instance.getActor(this.actorId).sprite,n=St.GetAnimator(t);xt.Play(n,this._actionData.anim,this._actionData.loop),this._actionEnd()}}class mn extends an{constructor(e){super(e)}run(){super.run();let t=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&t.response!=a[a.continue]||0==t.isAlive)this._actionEnd();else if(this._actor=zt.Instance.getActor(this.actorId),this._animator=St.GetAnimator(this._actor.sprite),xt.Play(this._animator,e[e.Idle],!0),this._targets=[],this._actionData.atkTarget.forEach(e=>{this._targets.push(zt.Instance.getActor(e))},this),this._dura=1/this._actor.atkSpeed*1e3,0==this._targets.length){this._actor.fire();let e={x:1},t=Laya.Tween.to(e,{x:2},1/0,null,Laya.Handler.create(this,this._atkLoop));on.Instance.addTween(this.actionId,t,Laya.Handler.create(this,this._atkLoop))}else this._atkLoop()}_atkLoop(){on.Instance.removeTween(this.actionId);let t=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&t.response!=a[a.continue]||0==t.isAlive)return void this._actionEnd();if(null==this._curTarg){if(0==this._targets.length)return xt.Play(this._animator,e[e.Idle],!0),void this._actionEnd();this._curTarg=this._targets.shift(),this._actor.sprite.transform.lookAt(this._curTarg.sprite.transform.position,dt.Up,!0),this._actor.sprite.transform.rotate(new Laya.Vector3(0,180,0),!0,!1)}if(this._actor.fire(),this._curTarg.attacked(this._actor.atk),this._curTarg.isAlive||(this._curTarg.actorStateCtrl.request(Ot.NoHp),this._curTarg=null),zt.Instance.isProtectedDead)return rt.Instance.lose(d.ProtectDead),void this._actionEnd();let n=Laya.Tween.to({x:1},{x:2},this._dura,null,Laya.Handler.create(this,this._atkLoop));on.Instance.addTween(this.actionId,n,Laya.Handler.create(this,this._atkLoop))}}class _n extends an{constructor(e){super(e)}run(){super.run();let t=zt.Instance.getActor(this._actionData.actorId);en.Instance.isStoped&&t.response!=a[a.continue]||0==t.isAlive?this._actionEnd():(this._actor=zt.Instance.getActor(this.actorId),this._animator=St.GetAnimator(this._actor.sprite),xt.Play(this._animator,e[e.Idle],!0),this._dura=1/this._actor.atkSpeed*1e3,this._targetPos=Hn.Instance.player.transform.position.clone(),this._targetPos.y=this._actor.sprite.transform.position.y,this._actor.sprite.transform.lookAt(this._targetPos,dt.Up,!0),this._actor.sprite.transform.rotate(new Laya.Vector3(0,180,0),!0,!1),this._atkLoop())}_atkLoop(){on.Instance.removeTween(this.actionId);let e=zt.Instance.getActor(this._actionData.actorId);if(en.Instance.isStoped&&e.response!=a[a.continue]||0==e.isAlive)return void this._actionEnd();if(this._actor.fire(),Hn.Instance.attacked(this._actor.atk),!Hn.Instance.isAlive)return rt.Instance.lose(d.PlayerDead),void this._actionEnd();let t=Laya.Tween.to({x:1},{x:2},this._dura,null,Laya.Handler.create(this,this._atkLoop));on.Instance.addTween(this.actionId,t,Laya.Handler.create(this,this._atkLoop))}}class In{static get Instance(){return null==this._Instance&&(this._Instance=new In),this._Instance}regEvent(){ee.Instance.on(te.GameCtrl.Start,this,this._onGameStart),ee.Instance.on(te.GameCtrl.Win,this,this._onGameWin),ee.Instance.on(te.GameCtrl.Lose,this,this._onGameLose),ee.Instance.on(te.GameCtrl.Pause,this,this._onGamePause),ee.Instance.on(te.GameCtrl.Resume,this,this._onGameResume),ee.Instance.on(te.GameCtrl.BackToMain,this,this._onBackToMain)}_onGameStart(){zt.Instance.init(),en.Instance.init(),Hn.Instance.init(),Un.Instance.init(),wt.Instance.on(),Hn.Instance.enableControl(),Un.Instance.followPlayer(),en.Instance.run(),x.Instance.playMusic(l.bgm1)}_onGameWin(){wt.Instance.off(),Hn.Instance.disableControl(),en.Instance.stopAll(),x.Instance.stopMusic()}_onGameLose(){wt.Instance.off(),Hn.Instance.disableControl(),en.Instance.stopAll(),x.Instance.stopMusic()}_onGamePause(){wt.Instance.off(),en.Instance.pause(),Laya.timer.pause()}_onGameResume(){wt.Instance.on(),en.Instance.resume(),Laya.timer.resume()}_onBackToMain(){zt.Instance.clearAll();for(let e=this.root.numChildren-1;e>=0;e--){let t=this.root.getChildAt(e);t!=Hn.Instance.player&&t.destroy()}}quit(){wt.Instance.off(),Hn.Instance.disableControl(),en.Instance.stopAll(),x.Instance.stopMusic()}hide(){this.root.active=!1}show(){this.root.active=!0}}const wn=43/30,fn="headPos";class xn extends Laya.Script3D{constructor(){super(),this._isPressed=!1,this._lastHorizOffset=0,this._lastVerticOffset=0,this._curHorizOffset=0,this._curVerticOffset=0,this._curHorizShake=0,this._curVerticShake=0,this._aimAssistOn=!1,this._firstInAimAssist=!0,this._isReloading=!1,this._isInHeadArea=!1,this._aimAssistHoriz=0,this._aimAssistVertic=0,this._aimAssistIgnore=!1,this._curFrame=0,this._headCycleTime=0,this._isShake=!1,this._firstRotateNoscope=!0,this._hitHead=null}onAwake(){this._gameObject=this.owner,this._scene=this._gameObject.scene,this._originEuler=dt.ClampEuler(this._gameObject.transform.rotationEuler),this._curEuler=dt.ClampEuler(this._gameObject.transform.rotationEuler),ee.Instance.on(te.PlayerCtrl.Dead,this,this._clearHeadImg),this._idle1()}onDestroy(){this._clearHeadImg(),ee.Instance.off(te.PlayerCtrl.Dead,this,this._clearHeadImg)}onUpdate(){ot.Instance.state==st.InGame&&(this._isReloading||Hn.Instance.isPlayKillCloseup||this._isShake||(0!=Hn.Instance.curAmmo?Hn.Instance.isScopeOpen?wt.Instance.isPressed?(this._isPressed||(this._firstRotateNoscope=!0,this._isPressed=!0,1==F.Instance.curAccountData.levelId&&ee.Instance.trigger(te.PlayerBehav.GuideAim)),this._aimAssist(),this._rotate()):this._isPressed&&(this._fire(),this._shake(),this._lastHorizOffset=this._curHorizOffset,this._lastVerticOffset=this._curVerticOffset,this._isPressed=!1,this._firstInAimAssist=!0):wt.Instance.isPressed&&(this._firstRotateNoscope&&(1==F.Instance.curAccountData.levelId&&Laya.timer.once(700,this,()=>{ee.Instance.trigger(te.GameGuide.RotateNoscope)}),this._firstRotateNoscope=!1),this._rotateNoscope()):this._reload()))}_aimAssist(){let e=new Laya.Vector2(Laya.stage.width/2,Laya.stage.height/2),t=new Laya.Ray(dt.Zero,dt.Zero);Un.Instance.camera.viewportPointToRay(e,t);let n=[];this._scene.physicsSimulation.rayCastAll(t,n,100,Ht.All,Ht.AimAssist)?(this._aimAssistOn=!0,this._firstInAimAssist&&(1==F.Instance.curAccountData.levelId&&ee.Instance.trigger(te.PlayerBehav.GuideFire),this._firstInAimAssist=!1,this._headCycleTime=0),F.Instance.curAccountData.isAimAssistOn&&(this._clearHeadImg(),n.forEach(e=>{let t=kt.GetChildByName(e.collider.owner.parent,fn),n=this._getScreenPoint(t.transform.position),i=new Laya.Sprite3D;i.transform.position=t.transform.position.clone(),i.transform.rotation=t.transform.rotation.clone(),i.transform.setWorldLossyScale(t.transform.getWorldLossyScale().clone()),i.transform.lookAt(this._gameObject.transform.position,new Laya.Vector3(0,1,0),!0),i.transform.translate(new Laya.Vector3(.1,0,0),!0);let a=this._getScreenPoint(i.transform.position),s=2*Laya.Vector3.distance(n,a);if(this._showHeadAim(n,s),!this._aimAssistIgnore){let i=this._getScreenPoint(e.point);if(Laya.Vector3.distance(n,i)<=s){this._hitHead!=e.collider.owner&&(this._isInHeadArea=!0,this._hitHead=e.collider.owner);let n=new Laya.Sprite3D;n.transform.position=this._gameObject.transform.position.clone(),n.transform.rotationEuler=this._gameObject.transform.rotationEuler.clone(),n.transform.lookAt(t.transform.position,new Laya.Vector3(0,1,0),!0),n.transform.rotate(new Laya.Vector3(0,180,0),!0,!1),this._aimAssistHoriz=-1*(z.ClampEuler(n.transform.rotationEuler.y)-z.ClampEuler(this._curEuler.y)),this._aimAssistVertic=z.ClampEuler(n.transform.rotationEuler.x)-z.ClampEuler(this._curEuler.x),n.destroy()}}},this))):(this._aimAssistOn=!1,this._firstInAimAssist=!0,this._hitHead=null,1==F.Instance.curAccountData.levelId&&ee.Instance.trigger(te.PlayerBehav.GuideAim),this._clearHeadImg())}_rotateNoscope(){let e=F.Instance.curAccountData,t=(e.level.playerRange,wt.Instance.getLastDragOffset()),n=t.x*e.horizSensitivityNoscope,i=t.y*e.verticSensitivityNoscope;this._curEuler.x+=i,this._curEuler.y+=-1*n,this._clampCurEuler(),this._curEuler=dt.ClampEuler(this._curEuler),this._gameObject.transform.rotationEuler=new Laya.Vector3(this._curEuler.x,this._curEuler.y,this._curEuler.z)}_rotate(){let e=F.Instance.curAccountData.level,t=(e.playerRange,wt.Instance.getLastDragOffset()),n=t.x*e.horizSensitivity,i=t.y*e.verticSensitivity;this._aimAssistOn&&F.Instance.curAccountData.isAimAssistOn&&(this._isInHeadArea?(n=this._aimAssistHoriz,i=this._aimAssistVertic,this._aimAssistIgnore=!0,this._curFrame=Laya.timer.currFrame,this._isInHeadArea=!1):this._aimAssistIgnore&&(Laya.timer.currFrame<this._curFrame+F.Instance.curAccountData.aimAssistDelayFrame?(n=0,i=0):this._aimAssistIgnore=!1));let a=Ge.Instance.delta/1e3,s=Math.sin(this._curHorizShake)*e.horizShakeRange;this._curHorizShake+=Math.PI/4*a;let o=Math.sin(this._curVerticShake)*e.verticShakeRange;this._curVerticShake+=Math.PI/4*a,this._curEuler.x+=i,this._curEuler.y+=-1*n,this._clampCurEuler(),this._curEuler=dt.ClampEuler(this._curEuler),this._gameObject.transform.rotationEuler=new Laya.Vector3(this._curEuler.x+s,this._curEuler.y+o,this._curEuler.z)}_clampCurEuler(){let e=F.Instance.curAccountData.level.playerRange;this._curEuler.y>this._originEuler.y+e[0]&&(this._curEuler.y=this._originEuler.y+e[0]),this._curEuler.y<this._originEuler.y-e[1]&&(this._curEuler.y=this._originEuler.y-e[1]),this._curEuler.x<this._originEuler.x-e[2]&&(this._curEuler.x=this._originEuler.x-e[2]),this._curEuler.x>this._originEuler.x+e[3]&&(this._curEuler.x=this._originEuler.x+e[3])}_closeScope(){Hn.Instance.closeScope()}_fire(){this._clearHeadImg(),Hn.Instance.shootCnt++,Hn.Instance.curAmmo--,x.Instance.playSound(l.fire),ee.Instance.trigger(te.PlayerBehav.Fire);let e=new Laya.Vector2(Laya.stage.width/2,Laya.stage.height/2),t=new Laya.Ray(dt.Zero,dt.Zero);Un.Instance.camera.viewportPointToRay(e,t);let n=new Laya.HitResult;if(this._scene.physicsSimulation.rayCast(t,n,500,Ht.All,Ht.NPC)){let e=this._getColliderOwner(n.collider.owner)[ft.ActorIdProperty],t=zt.Instance.getActor(e);Hn.Instance.lastHitPoint=n.point,Hn.Instance.lastHitTarget=t,t.attacked(Hn.Instance.atk),zt.Instance.isAllTargetsDead?Hn.Instance.playKillCloseUp(Laya.Handler.create(this,()=>{t.actorStateCtrl.request(Ot.NoHp),Laya.timer.once(rt.Instance.winDelay,this,()=>{rt.Instance.win()})})):zt.Instance.isProtectedDead?(t.actorStateCtrl.request(Ot.NoHp),rt.Instance.lose(d.TargetEscape)):(t.isAlive||t.actorStateCtrl.request(Ot.NoHp),this._gunShoot())}else this._gunShoot()}_reload(){this._isReloading=!0,ee.Instance.trigger(te.PlayerBehav.HideCursor),Laya.timer.once(200,this,()=>{let e=Hn.Instance.arm.getComponent(Laya.Animator),t=Hn.Instance.reloadTime/wn*1;x.Instance.playSound(l.reload),xt.Play(e,n[n.Reload],!1,Laya.Handler.create(this,()=>{Hn.Instance.curAmmo=Hn.Instance.ammo,ee.Instance.trigger(te.PlayerBehav.Reload),ee.Instance.trigger(te.PlayerBehav.ShowCursor),1==F.Instance.curAccountData.levelId&&ee.Instance.trigger(te.GameGuide.CloseScope),this._isReloading=!1}),t)})}_idle1(){let e=Hn.Instance.arm.getComponent(Laya.Animator);xt.Play(e,n[n.Idle1],!0,null,.2)}_getColliderOwner(e){for(;null!=e&&null!=e.parent&&e.parent!=In.Instance.root;)e=e.parent;return e.parent==In.Instance.root?e:null}_gunShoot(){en.Instance.stopPart(),zt.Instance.getAllActors().forEach(e=>{e.actorStateCtrl.request(Ot.GunShoot)},this)}_showHeadAim(e,t){this._headCycleTime+=Ge.Instance.delta/1e3*Math.PI;let n=.1*Math.cos(this._headCycleTime+Math.PI)+1.1,i=new Laya.Image;Laya.stage.addChild(i),i.anchorX=i.anchorY=.5,i.width=i.height=t,i.pos(e.x,e.y),i.cacheAs="bitmap",i.graphics.drawCircle(0,0,t,"#66ccff","#ffffff",3),i.alpha=.25*Math.cos(this._headCycleTime)+.75;let a=new Laya.Image;i.addChild(a),a.anchorX=a.anchorY=.5,a.width=a.height=t-6,a.pos(0,0),a.graphics.drawCircle(0,0,t-3,"#ffffff"),a.blendMode="destination-out",i.scaleX=i.scaleY=n,xn._headImgArr.push(i)}_getScreenPoint(e){let t=dt.Zero;return Un.Instance.camera.worldToViewportPoint(e,t),t.z=0,t}_clearHeadImg(){for(;xn._headImgArr.length>0;){xn._headImgArr.pop().destroy()}}_shake(){this._isShake=!0;let e=0,t=0,n=()=>{(t+=Ge.Instance.delta/1e3*2*Math.PI)>Math.PI?(this._gameObject.transform.rotationEuler=new Laya.Vector3(this._curEuler.x,this._curEuler.y,this._curEuler.z),Laya.timer.clear(this,n),this._isShake=!1,0==Hn.Instance.curAmmo&&this._closeScope()):(e=-2*Math.sin(t),this._gameObject.transform.rotationEuler=new Laya.Vector3(this._curEuler.x+e,this._curEuler.y,this._curEuler.z))};Laya.timer.frameLoop(1,this,n)}}xn._headImgArr=[];const vn=500,kn=-20;class Mn extends Laya.Script3D{constructor(){super(),this._isReady=!1,this._cntTime=0}onAwake(){this._bullet=this.owner,this._originPos=this._bullet.transform.position.clone()}onUpdate(){if(!this._isReady)return;let e=new Laya.Vector3(0,0,0);if(this._cntTime+=Ge.Instance.delta/this._dura,this._cntTime>1){if(this._bullet.transform.position=this._targetPos.clone(),this._target.prefab.includes("fmale")||this._target.prefab.includes("male")){let e=new Laya.Sprite3D;e.transform.position=this._bullet.transform.position.clone(),e.transform.rotation=this._bullet.transform.rotation.clone(),e.transform.translate(new Laya.Vector3(0,0,kn),!0),Un.Instance.updateAOV(e.transform.position,this._bullet.transform.position),e.destroy()}else Un.Instance.followPlayer();this.owner.destroy(),this._complete&&this._complete.run()}else{Laya.Vector3.lerp(this._originPos,this._targetPos,this._cntTime,e),this._bullet.transform.position=e;let t=new Laya.Vector3(0,0,Ge.Instance.delta/1e3*vn);this._bullet.transform.rotate(t,!0,!1)}}setTarget(e,t,n){this._targetPos=e,this._target=t,this._complete=n;let i=F.Instance.curAccountData.bulletConfig,a=Laya.Vector3.distance(this._originPos,this._targetPos);console.log(`[LOG]射击距离:${a}`),this._dura=z.ClampRange(a,i[0],i[1],i[2],i[3]),this._isReady=!0}}const Ln=100,bn=.3;class Sn extends Laya.Script{constructor(){super(),this._t=0}onAwake(){this._sp=new Laya.Sprite,Laya.stage.addChild(this._sp),this._sp.graphics.drawRect(0,0,Laya.stage.width,Laya.stage.height,"#ff0000"),this._sp.alpha=0}onUpdate(){this._t+=Ge.Instance.delta,this._t<Ln?this._sp.alpha=this._t/Ln*bn:this._t<2*Ln?this._sp.alpha=(2*Ln-this._t)/Ln*bn:(this._sp.alpha=0,this._sp.destroy(),this.destroy())}}class An extends Laya.Script3D{constructor(){super(),this._t=0}onAwake(){this._cntTime=1e3*F.Instance.curAccountData.level.limitTime}onUpdate(){ot.Instance.state==st.InGame&&(this._t+=Ge.Instance.delta,this._t>this._cntTime&&(ee.Instance.trigger(te.PlayerCtrl.Dead),rt.Instance.lose(d.Timeout)))}}const Cn="Arms",Dn="Bone001",Tn="Player",Bn="muzzle",Nn="kaiqiang2",Gn="kaiqiang",En="BulletRifle";class Hn{static get Instance(){return null==this._Instance&&(this._Instance=new Hn),this._Instance}init(){if(null==this.player){let e=tt.Instance.getPref(Tn);this.player=Laya.Sprite3D.instantiate(e),In.Instance.root.addChild(this.player),this.arm=this.player.getChildByName(Cn),this._gunPos=kt.GetChildByName(this.player,Dn)}this.arm.active=!0;let e=F.Instance.curAccountData,t=e.equipGun;lt.IsInTryOut&&(t=e.getThemeById(lt.TryOutGunId)),this._gunPos.destroyChildren();let n=tt.Instance.getPref(t.model);this.gun=Laya.Sprite3D.instantiate(n),this._gunPos.addChild(this.gun),this.gun.transform.localPosition=dt.Zero,this.gun.transform.localRotationEuler=dt.Zero,this._muzzle=kt.GetChildByName(this.gun,Bn),this.player.transform.position=e.level.playerPos.clone(),this.player.transform.rotationEuler=e.level.playerRota.clone(),this.curHp=e.getGlobal(h.player_hp),this.atk=t.atk,this.ammo=this.curAmmo=t.ammo,this.reloadTime=t.reload_speed,this.isAlive=!0,this.shootCnt=0,this.isScopeOpen=!1,this.isPlayKillCloseup=!1}attacked(e){this.curHp-=e,this.curHp<=0&&(this.curHp=0,this.isAlive=!1),ee.Instance.trigger(te.PlayerCtrl.Dead),Laya.stage.addComponent(Sn),x.Instance.playSound(l.hurt)}enableControl(){this.player.addComponent(xn),F.Instance.curAccountData.level.limitTime>0&&this.player.addComponent(An)}disableControl(){let e=this.player.getComponent(xn);e&&e.destroy();let t=this.player.getComponent(An);t&&t.destroy()}playKillCloseUp(e=null){this.isPlayKillCloseup=!0,this.closeScope(),this._idle2();let t=this.lastHitTarget.sprite.getComponent(Tt);t&&t.destroy(),Un.Instance.stopFollow(),J.Instance.close(Q.Guide),zt.Instance.clearAtkScript(),this._clearCountDownBehav(),ee.Instance.trigger(te.PlayerBehav.HideCursor),ee.Instance.trigger(te.PlayerBehav.HideQuit),Laya.timer.frameOnce(1,this,()=>{let t=tt.Instance.getPref(En),n=Laya.Sprite3D.instantiate(t);In.Instance.root.addChild(n),n.transform.position=this._muzzle.transform.position.clone(),n.transform.rotation=this._muzzle.transform.rotation.clone(),n.transform.translate(new Laya.Vector3(0,0,.1),!0),rt.Instance.pause(),this._showFireCloseUp(),n.addComponent(Mn).setTarget(this.lastHitPoint,this.lastHitTarget,new Laya.Handler(this,()=>{rt.Instance.resume(),wt.Instance.off(),en.Instance.stopAll(),this.isPlayKillCloseup=!1,e&&e.run()})),Un.Instance.followBullet(n)})}_showFireCloseUp(){let e=new Laya.Sprite3D;e.transform.position=this._muzzle.transform.position.clone(),e.transform.rotation=this._muzzle.transform.rotation.clone(),e.transform.translate(new Laya.Vector3(1,0,0),!0),Un.Instance.updateAOV(e.transform.position,this._muzzle.transform.position),e.destroy()}playFireEffect(){this._muzzle.destroyChildren();let e=tt.Instance.getPref(Nn),t=Laya.Sprite3D.instantiate(e);this._muzzle.addChild(t),t.transform.localPosition=dt.Zero,t.transform.localRotationEuler=dt.Zero}playFireEffectSlow(){this._muzzle.destroyChildren();let e=tt.Instance.getPref(Gn),t=Laya.Sprite3D.instantiate(e);this._muzzle.addChild(t),t.transform.localPosition=dt.Zero,t.transform.localRotationEuler=dt.Zero}_clearCountDownBehav(){let e=this.player.getComponent(An);e&&e.destroy()}openScope(e){this.isScopeOpen=!0;let t=this.arm.getComponent(Laya.Animator);xt.Play(t,n[n.Aim],!1,Laya.Handler.create(this,()=>{Un.Instance.scopeOn(),this.arm.active=!1,this.gun.active=!1,e&&e.run()}))}closeScope(){Un.Instance.scopeOff(),this.arm.active=!0,this.gun.active=!0,this.isScopeOpen=!1,ee.Instance.trigger(te.PlayerBehav.CloseScope)}_idle2(){let e=this.arm.getComponent(Laya.Animator);xt.Play(e,n[n.Idle2],!0,null,1e-4)}}class Pn extends Laya.Script3D{constructor(){super()}onAwake(){this._camera=this.owner,this._mirror=new Laya.Sprite3D}onLateUpdate(){let e=Hn.Instance.player;this._mirror.transform.position=e.transform.position.clone(),this._mirror.transform.rotation=e.transform.rotation.clone(),this._mirror.transform.rotate(new Laya.Vector3(0,180,0),!0,!1);let t=new Laya.Vector3(0,0,0);Laya.Vector3.lerp(this._camera.transform.position,this._mirror.transform.position,.8,t),this._camera.transform.position=t;let n=new Laya.Quaternion;Laya.Quaternion.lerp(this._camera.transform.rotation,this._mirror.transform.rotation,.8,n),this._camera.transform.rotation=n}onDestroy(){this._mirror.destroy()}}class Rn extends Laya.Script3D{constructor(){super(),this.offsetZ=-.5,this.radius=.15,this.rotateSpeed=5,this._isReady=!1,this._t=0}onAwake(){this._camera=this.owner}setTarget(e){this._target=e,this._rota=this._target.transform.rotation.clone(),this._lookAtTarget(),this._isReady=!0}onLateUpdate(){this._isReady&&this._lookAtTarget()}_lookAtTarget(){if(this._target.destroyed)return;this._camera.transform.position=this._target.transform.position.clone(),this._camera.transform.rotation=this._rota.clone();let e=Math.sin(this._t)*this.radius,t=Math.cos(this._t)*this.radius;this._t+=2*Math.PI/this.rotateSpeed*Ge.Instance.delta/1e3;let n=new Laya.Vector3(e,t,this.offsetZ);this._camera.transform.translate(n,!0),this._camera.transform.lookAt(this._target.transform.position,dt.Up,!0)}}class Un{static get Instance(){return null==this._Instance&&(this._Instance=new Un),this._Instance}init(){let e=F.Instance.curAccountData.level;this.normalFov=pt.U3dToLayaFov(e.normalFov),this.scopeFov=pt.U3dToLayaFov(e.scopeFov),this._spawnPos=e.playerPos.clone(),this._spawnRota=e.playerRota.clone(),this.camera.fieldOfView=this.normalFov,this.camera.transform.position=this._spawnPos.clone(),this.camera.transform.rotationEuler=this._spawnRota.clone(),this.camera.transform.rotate(new Laya.Vector3(0,180,0),!0,!1)}stopFollow(){let e=this.camera.getComponent(Pn);e&&e.destroy();let t=this.camera.getComponent(Rn);t&&t.destroy()}followPlayer(){this.stopFollow(),this.camera.addComponent(Pn)}followBullet(e){this.stopFollow(),this.camera.addComponent(Rn).setTarget(e)}scopeOn(){this.camera.fieldOfView=this.scopeFov}scopeOff(){this.camera.fieldOfView=this.normalFov}updateAOV(e,t){this.camera.transform.position=e.clone(),this.camera.transform.lookAt(t,new Laya.Vector3(0,1,0),!0)}}class zn{constructor(){this.isLoaded=!1,this._sceneUrl="res/u3d/LayaScene_Main/Conventional/Main.ls"}static get Instance(){return null==this._Instance&&(this._Instance=new zn),this._Instance}load(e){Laya.loader.create(this._sceneUrl,Laya.Handler.create(this,()=>{this.scene=Laya.loader.getRes(this._sceneUrl),Laya.stage.addChildAt(this.scene,0),this.scene.visible=!1;let t=this.scene.getChildByName("Main Camera");t.enableHDR=!1,Un.Instance.camera=t,this._root=new Laya.Sprite3D,this.scene.addChild(this._root),In.Instance.root=this._root,In.Instance.regEvent(),this.isLoaded=!0,e&&e.run()}))}show(){this.scene.visible=!0}hide(){this.scene.visible=!1}_effectFirstUse(){let e=tt.Instance.getPref("boom"),t=Laya.Sprite3D.instantiate(e);this._root.addChild(t),t.transform.position=new Laya.Vector3(1e4,1e4,1e4),e=tt.Instance.getPref("kaiqiang2"),t=Laya.Sprite3D.instantiate(e),this._root.addChild(t),t.transform.position=new Laya.Vector3(1e4,1e4,1e4)}attachView(e,t){this.scene.removeSelf(),e.addChild(this.scene),Un.Instance.camera.viewport=t}detachView(){this.scene.removeSelf(),Laya.stage.addChildAt(this.scene,0),Un.Instance.camera.viewport=new Laya.Viewport(0,0,Laya.stage.width,Laya.stage.stage.height),this._effectFirstUse()}}const Vn=5;class On extends fe.GameUI{constructor(){super(),this._isHintEnable=!1}onOpen(e){se.Instance.stop(),rt.Instance.start(),zn.Instance.show(),We.startLevelCnt++,We.floatLvlCnt++,L.AldEvent("打开游戏界面"),L.AldStart(F.Instance.curAccountData.levelId.toString()),this._btnHandler(),this._initUI();let t=F.Instance.curAccountData.levelId;1!=t&&6!=t&&10!=t||J.Instance.open(Q.Guide)}onClose(){ee.Instance.off(te.PlayerBehav.Fire,this,this._refreshAmmo),ee.Instance.off(te.PlayerBehav.Reload,this,this._refreshAmmo),ee.Instance.off(te.PlayerBehav.CloseScope,this,this._closeScope),ee.Instance.off(te.PlayerBehav.HideCursor,this,this._hideCursor),ee.Instance.off(te.PlayerBehav.ShowCursor,this,this._showCursor),ee.Instance.off(te.GameGuide.EnableClickScope,this,this._bindClickScope),ee.Instance.off(te.PlayerBehav.HideQuit,this,this._hideQuit),zn.Instance.hide(),J.Instance.close(Q.Guide).close(Q.ExtraGuide),L.AldEvent("关闭游戏界面")}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_onWin(){Laya.timer.once(1e3,this,()=>{F.Instance.curAccountData.level.msgId>0?J.Instance.close(Q.Game).open(Q.Conversation):J.Instance.close(Q.Game).open(Q.Result,[!0])})}_onLose(e){Laya.timer.once(1e3,this,()=>{let t=zt.Instance.getAllActors(),n=!1;t.forEach(e=>{e.isAlive&&e.curHp<e.maxHp&&(n=!0)},this),n?J.Instance.open(Q.TryOut,[Laya.Handler.create(this,()=>{J.Instance.close(Q.Game).open(Q.Result,[!1,e])}),!0]):J.Instance.close(Q.Game).open(Q.Result,[!1,e])})}_btnHandler(){ee.Instance.on(te.GameCtrl.Win,this,this._onWin),ee.Instance.on(te.GameCtrl.Lose,this,this._onLose),ee.Instance.on(te.PlayerBehav.Fire,this,this._refreshAmmo),ee.Instance.on(te.PlayerBehav.Reload,this,this._refreshAmmo),ee.Instance.on(te.PlayerBehav.CloseScope,this,this._closeScope),ee.Instance.on(te.PlayerBehav.HideCursor,this,this._hideCursor),ee.Instance.on(te.PlayerBehav.ShowCursor,this,this._showCursor),ee.Instance.on(te.GameGuide.EnableClickScope,this,this._bindClickScope),ee.Instance.on(te.PlayerBehav.HideQuit,this,this._hideQuit),this.btnQuit.clickHandler=new Laya.Handler(this,this._quit),this.btnHint.clickHandler=new Laya.Handler(this,this._hint),1!=F.Instance.curAccountData.levelId&&(this.btnScope.clickHandler=new Laya.Handler(this,this._openScope))}_bindClickScope(){this.btnScope.clickHandler=new Laya.Handler(this,this._openScope)}_initUI(){let e=Hn.Instance.ammo,t=this.cartridge.getChildAt(0);for(let n=1;n<e;n++){let e=new Laya.Image;this.cartridge.addChild(e),e.skin=t.skin,e.centerY=0,e.x=t.x+(t.width+Vn)*n}this.cartridge.width=2*t.x+t.width*e+Vn*(e-1),this._refreshAmmo(),this._initScope(),this.btnGoal.label=`目标:${F.Instance.curAccountData.level.goal}`,this.btnGoal.width=50*(F.Instance.curAccountData.level.goal.length+3)}_refreshAmmo(){let e=Hn.Instance.curAmmo;for(let t=0;t<this.cartridge.numChildren;t++){let n=this.cartridge.getChildAt(t),i=[new Laya.ColorFilter([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0])];n.filters=t<e?null:i}}_initScope(){this.bg.cacheAs="bitmap";let e=new Laya.Sprite;e.blendMode="destination-out",this.bg.addChild(e),e.graphics.clear();let t=Math.floor(this.scope.width/2)-2;e.graphics.drawCircle(Math.floor(Laya.stage.width/2),Math.floor(Laya.stage.height/2),t,"#000000")}_openScope(){Hn.Instance.isScopeOpen||(ee.Instance.trigger(te.GameGuide.OpenScope),Hn.Instance.openScope(Laya.Handler.create(this,()=>{this.bg.visible=!0,this.scope.visible=!0,this.cursor.visible=!1,this.btnScope.visible=!1})))}_closeScope(){this.bg.visible=!1,this.scope.visible=!1,this.cursor.visible=!0,this.btnScope.visible=!0}_hideCursor(){this.cursor.visible=!1,this.btnScope.visible=!1}_hideQuit(){F.Instance.curAccountData.isDebugOn||(this.btnQuit.visible=!1)}_showCursor(){this.cursor.visible=!0,this.btnScope.visible=!0}_quit(){this._gameResult(Laya.Handler.create(this,()=>{In.Instance.quit(),se.Instance.start(),J.Instance.close(Q.Game).open(Q.Main)}))}_gameResult(e,t){L.AldEnd(F.Instance.curAccountData.levelId.toString(),!1);let n=[{t:F.Instance.ServerTime.toString()},{play_id:F.Instance.curAccountData.play_id.toString()},{win:"0"}];D.Instance.HttpPostRequest(C.Result,n,Laya.Handler.create(this,t=>{e&&e.run()}),Laya.Handler.create(this,e=>{t&&t.run()}))}_hint(){this.btnHint.mouseEnabled=!1,rt.Instance.pause(),this._isHintEnable?J.Instance.open(Q.Hint,Laya.Handler.create(this,()=>{rt.Instance.resume()})):(L.AldEvent("提示看视频"),M.showVideoAd(e=>{this.btnHint.mouseEnabled=!0,e?(this._isHintEnable=!0,J.Instance.open(Q.Hint,Laya.Handler.create(this,()=>{zt.Instance.showHint(),rt.Instance.resume()}))):(rt.Instance.resume(),S.ShowToast("只有观看完整视频才能获得提示哦!"))}))}}const Xn=1/3,qn=["没能一枪击晕敌人,快去升级枪支吧!","注意关卡的描述,不要误伤要保护的人。","注意关卡的描述,辨别人群中真正的目标。","还有剩余目标没有被击败。","要没体力了!去抽奖放松休息可以获得体力哦!"];class Yn extends fe.ResultUI{constructor(){super()}onOpen(e){let[t,n]=e;L.AldEvent("打开结算界面"),this._isWin=t,this._deathType=n,this._initUI(),this._btnHandler(),M.showBanner(),t&&lt.IsInTryOut&&(lt.TryTimes--,0==lt.TryTimes&&(lt.IsInTryOut=!1))}onClose(){L.AldEvent("关闭结算界面"),M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}static get _NextTip(){-1==this._curTipRange&&(this._curTipRange=this._TipArr.length-1);let e=z.RandInt(0,this._curTipRange),t=this._TipArr.splice(e,1)[0];return this._TipArr.push(t),this._curTipRange--,t}static get _SucNextTip(){-1==this._curSucTipRange&&(this._curSucTipRange=this._SucTipArr.length-1);let e=z.RandInt(0,this._curSucTipRange),t=this._SucTipArr.splice(e,1)[0];return this._SucTipArr.push(t),this._curSucTipRange--,t}_initUI(){this.imgWin.visible=this._isWin,this.imgLose.visible=!this._isWin,this.fcLevel.value=F.Instance.curAccountData.levelId.toString();let e=F.Instance.curAccountData.level.gold;if(this._money=this._isWin?e:Math.floor(e*Xn),this.fcCoins.value=Ie.ToKMB(this._money,2),this._isWin)this.imgCoins.visible=!0,this.imgReasonBg.visible=!1,this.imgPlayerDead.visible=!1,this.imgProtectedDead.visible=!1,this.imgTargetEscape.visible=!1,this.btnDiamond.visible=!0,this.txtDiamond.text=F.Instance.curAccountData.level.diamond.toString(),this.btnNext.visible=!0,this.btnBack.visible=!1,this.tipBox.visible=!1,this.btnSkipLevel.visible=!1,this.btnTriple.visible=!1,F.Instance.curAccountData.energy<2?this.tips.text=`提示:${qn[4]}`:this.tips.text=`提示:${Yn._SucNextTip}`;else{this.imgCoins.visible=!0,this.imgReasonBg.visible=!0,this.imgPlayerDead.visible=this._deathType==d.PlayerDead,this.imgProtectedDead.visible=this._deathType==d.ProtectDead,this.imgTargetEscape.visible=this._deathType==d.TargetEscape||this._deathType==d.Timeout,this.btnDiamond.visible=!1,this.btnNext.visible=!1,Laya.timer.once(F.Instance.curAccountData.backtime,this,()=>{this.btnBack.visible=!0}),Laya.timer.once(F.Instance.curAccountData.tiaoguotime,this,()=>{this.btnSkipLevel.visible=!0}),Laya.timer.once(F.Instance.curAccountData.sanbeitime,this,()=>{this.btnTriple.visible=!0}),this.tipBox.visible=!0,this.ani1.play(0,!0);let e=!1,t=!1,n=!1,i=!1,a=0,s=0;zt.Instance.getAllActors().forEach(i=>{i.npcType==r[r.target]&&(s++,i.isAlive||a++),i.npcType!=r[r.protect]||i.isAlive||(t=!0),i.isAlive&&i.curHp<i.maxHp&&(e=!0),i.npcType!=r[r.normal]||i.isAlive||(n=!0)},this),i=s>1&&a>0&&s>a,this.tips.text=e?`提示:${qn[0]}`:i?`提示:${qn[3]}`:t?`提示:${qn[1]}`:n?`提示:${qn[2]}`:`提示:${Yn._NextTip}`}}_btnHandler(){this.btnDiamond.clickHandler=new Laya.Handler(this,this._getDiamond),this.btnNext.clickHandler=new Laya.Handler(this,this._next),this.btnBack.clickHandler=new Laya.Handler(this,this._next),this.btnSkipLevel.clickHandler=new Laya.Handler(this,this._skipLevel),this.btnTriple.clickHandler=new Laya.Handler(this,this._tripleClick)}_next(){this._gameResult(Laya.Handler.create(this,()=>{se.Instance.start(),J.Instance.close(Q.Result).open(Q.Main)}))}_gameResult(e,t){let n=this._isWin?"1":"0";L.AldEnd(F.Instance.curAccountData.levelId.toString(),this._isWin);let i=[{t:F.Instance.ServerTime.toString()},{play_id:F.Instance.curAccountData.play_id.toString()},{win:n}];D.Instance.HttpPostRequest(C.Result,i,Laya.Handler.create(this,t=>{ie.Instance.updateMoney(this._money),e&&e.run()}),Laya.Handler.create(this,e=>{t&&t.run()}))}_getDiamond(){this.btnDiamond.mouseEnabled=!1,L.AldEvent("胜利界面领钻石看视频"),M.showVideoAd(e=>{if(e){let e=[{reward_item:"2000"},{reward_num:F.Instance.curAccountData.level.diamond.toString()},{t:F.Instance.ServerTime.toString()}];D.Instance.HttpPostRequest(C.Fission,e,Laya.Handler.create(this,e=>{this.btnDiamond.gray=!0;let t=e.rewards;t[2e3]&&J.Instance.open(Q.DiamondEffect,Laya.Handler.create(this,()=>{J.Instance.open(Q.Reward,[p.diamond,t[2e3],null])}))}),Laya.Handler.create(this,e=>{this.btnDiamond.mouseEnabled=!0}))}else S.ShowToast("只有观看完整视频才能领取哦!"),this.btnDiamond.mouseEnabled=!0})}_skipLevel(){L.AldEvent("跳关看视频"),M.showVideoAd(e=>{e?(this._isWin=!0,this._gameResult(Laya.Handler.create(this,()=>{se.Instance.start(),J.Instance.close(Q.Result).open(Q.Main)}))):S.ShowToast("只有观看完整视频才能跳关哦!")})}_tripleClick(){this.btnTriple.mouseEnabled=!1,M.showVideoAd(e=>{e?(this.btnTriple.gray=!0,ie.Instance.updateMoney(2*this._money)):this.btnTriple.mouseEnabled=!0})}}Yn._TipArr=["活用汽油桶,可以一次解决大量敌人。","有的目标不会立即出现,请耐心等待时机。"],Yn._SucTipArr=["合成枪的钱不够了!快去加速一下获取大量金币吧!","总部会派发补给箱支援你,记得打开哦!"],Yn._curTipRange=-1,Yn._curSucTipRange=-1;const Fn=!0;class Wn extends fe.SettingUI{constructor(){super()}onOpen(e){x.Instance.playSound(l.openview),this._initUI(),this._btnHandler(),L.AldEvent("打开设置界面"),M.showBanner()}onClose(){L.AldEvent("关闭设置界面"),M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){let e=x.Instance.isSoundOn,t=x.Instance.isVibrationOn;this.imgSoundon.visible=e,this.imgSoundoff.visible=!e,this.imgShakeon.visible=t,this.imgShakeoff.visible=!t,this.UID.text=`UID:${F.Instance.curAccountData.userId}`,this.btnDebug.visible=Fn}_btnHandler(){this.btnSound.clickHandler=new Laya.Handler(this,this._toggleSound),this.btnShake.clickHandler=new Laya.Handler(this,this._toggleShake),this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnDebug.clickHandler=new Laya.Handler(this,this._test)}_toggleSound(){let e=!x.Instance.isSoundOn;this.imgSoundon.visible=e,this.imgSoundoff.visible=!e,x.Instance.isSoundOn=e}_toggleShake(){let e=!x.Instance.isVibrationOn;this.imgShakeon.visible=e,this.imgShakeoff.visible=!e,x.Instance.isVibrationOn=e}_closeClick(){J.Instance.close(Q.Setting)}_test(){console.log("[Debug]"),console.log(F.Instance.curAccountData.user_invite),D.Instance.HttpPostRequest(C.Invite,[],Laya.Handler.create(this,e=>{console.log(e)}),Laya.Handler.create(this,e=>{console.log(e)}),!1,!0)}}class jn{static Get_Instance(){return jn.instance||(jn.instance=new jn)}yincang(){Laya.timer.clear(this,this.renderbyWX),this.uisprite.visible=!1}renderbyWX(){this.tex2d.loadImageSource(this.render_Canvas),this.tex1d.setTo(this.tex2d),this.uisprite.graphics.clear(),this.uisprite.graphics.drawTexture(this.tex1d,0,0,this.tex1d.width,this.tex1d.height)}xianshi(){Laya.timer.frameLoop(10,this,this.renderbyWX),this.uisprite.visible=!0}ChuShiHUa(e=720,t=1280){this.render_Canvas=Laya.Browser.window.sharedCanvas,this.uisprite=new Laya.Sprite,this.uisprite.zOrder=1008,this.uisprite.pos(0,0),this.uisprite.cacheAs="normal",Laya.stage.addChild(this.uisprite),this.tex2d=new Laya.Texture2D,this.tex1d=new Laya.Texture(this.tex2d),this.render_Canvas.width=e,this.render_Canvas.height=t}}class $n{CanvaInit(){Laya.Browser.onWeiXin&&(this.weixin=Laya.Browser.window.wx,this.shezhiWH(),jn.Get_Instance().ChuShiHUa())}rightPage(){Laya.Browser.onWeiXin&&this.sendMessage("","rightPage")}static get Instance(){return $n.instance||($n.instance=new $n)}shezhiWH(){let e={width:Laya.stage.width,height:Laya.stage.height};this.sendMessage("","canva_init",e)}xianshiFriend(e="score"){Laya.Browser.onWeiXin&&this.sendMessage(e,"show_friend_list")}xianshiCanva(){Laya.Browser.onWeiXin&&jn.Get_Instance().xianshi()}yincangCanva(){Laya.Browser.onWeiXin&&jn.Get_Instance().yincang()}sendMessage(e,t,n){this.weixin.postMessage({keyName:e,action:t,data:n})}shangchaunData(e,t=null,n="score"){Laya.Browser.onWeiXin&&this.setUserCloudStorage(n,e.toString(),t)}setUserCloudStorage(e,t,n=null){let i=[{key:e,value:t}];this.weixin.setUserCloudStorage({KVDataList:i,success:function(e){console.log("数据上传成功"+e),n&&n()},fail:function(e){console.log("数据上传失败"+e),n&&n()}})}leftPage(){Laya.Browser.onWeiXin&&this.sendMessage("","leftPage")}}class Kn extends fe.RankUI{constructor(){super()}onOpen(e){x.Instance.playSound(l.openview),this._initUI(),this._btnHandler(),L.AldEvent("打开排行榜界面"),M.showBanner()}onClose(){$n.Instance.yincangCanva(),L.AldEvent("关闭排行榜界面"),M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){$n.Instance.xianshiCanva(),$n.Instance.shangchaunData(F.Instance.curAccountData.levelId,()=>{$n.Instance.xianshiFriend()})}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnLeft.clickHandler=new Laya.Handler(this,this._prevPage),this.btnRight.clickHandler=new Laya.Handler(this,this._nextPage)}_closeClick(){J.Instance.close(Q.Rank)}_prevPage(){$n.Instance.leftPage()}_nextPage(){$n.Instance.rightPage()}}const Zn="Main/qiandao-0-2.png",Jn="Main/qiandao-0-3.png",Qn="Main/tl.png",ei="res/skin/",ti=".png";class ni{constructor(e,t,n){this.skin="",this.scale=1,this.desc="",this.skin=e,this.scale=t,this.desc=n}}class ii extends fe.SignUI{constructor(){super(),this._signing=0}onOpen(e){x.Instance.playSound(l.openview),this._initUI(),this._btnHandler(),L.AldEvent("打开签到界面"),M.showBanner()}onClose(){L.AldEvent("关闭签到界面"),M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){this._rewardDic=new T;let e=this._checkCanSign();this.btnSign.gray=!e,this.btnSign.mouseEnabled=e;let t,n=ai.GetSignReward();if(7==(t=F.Instance.curAccountData.sign?Number(F.Instance.curAccountData.getSign(X.sign_days)):0)||14==t)if(7==t&&e){n.splice(0,7),t-=7,this._signing=t;for(let e=1;e<=7;e++)this._setDayInfo(e,n[e-1],!1)}else if(7!=t||e){if(14==t&&e){n.splice(0,7),t-=14,this._signing=t;for(let e=1;e<=7;e++)this._setDayInfo(e,n[e-1],!1)}else if(14==t&&!e){n.splice(0,7);for(let e=1;e<=7;e++)this._setDayInfo(e,n[e-1],!0)}}else for(let e=1;e<=7;e++)this._setDayInfo(e,n[e-1],!0);else{t>7&&t<14&&(n.splice(0,7),t-=7),this._signing=t;for(let e=1;e<=7;e++)0!=t?(e<=t&&this._setDayInfo(e,n[e-1],!0),e>t&&this._setDayInfo(e,n[e-1],!1)):this._setDayInfo(e,n[e-1],!1)}}_checkCanSign(){if(!F.Instance.curAccountData.sign)return!0;let e=new Date(1e3*F.Instance.ServerTime);e.setHours(0,0,0,0);var t=1e3*Number(F.Instance.curAccountData.getSign(X.sign_time));return new Date(t).valueOf()<e.valueOf()}_setDayInfo(e,t,n){e-=1;var i=this.signList.getChildAt(e),a=t,s=a.keys();for(var o in s){var r=parseInt(s[o]);if(1==r){let e=a.get(r);i.getChildByName("name").text=e,(c=i.getChildByName("skin")).scaleX=c.scaleY=1,c.skin=Zn,this._rewardDic.set("1000",new ni(Zn,1.5,e))}else if(2==r){let e=a.get(r);i.getChildByName("name").text=e,(c=i.getChildByName("skin")).scaleX=c.scaleY=1,c.skin=Jn,this._rewardDic.set("2000",new ni(Jn,1,e))}else if(4==r){let e=a.get(r);i.getChildByName("name").text=e,(c=i.getChildByName("skin")).scaleX=c.scaleY=1,c.skin=Qn,this._rewardDic.set("4000",new ni(Qn,1.5,e))}else if(6==r){let e=a.get(r);var c;i.getChildByName("name").text=e.name,(c=i.getChildByName("skin")).skin=ei+a.get(r).icon+ti,c.scaleX=c.scaleY=.25;let t=6e3+e.id;this._rewardDic.set(t.toString(),new ni(c.skin,1,e.name))}}n?(i.getChildByName("signed").visible=!0,i.getChildByName("name").visible=!1):(i.getChildByName("signed").visible=!1,i.getChildByName("name").visible=!0)}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnSign.clickHandler=new Laya.Handler(this,this._signClick)}_closeClick(){J.Instance.close(Q.Sign)}_signClick(){F.Instance.curAccountData.sign?this._checkCanSign()?this._watchVideo():S.ShowToast("今日已领取!"):this._watchVideo()}_watchVideo(){this.btnSign.mouseEnabled=!1,L.AldEvent("签到看视频"),M.showVideoAd(e=>{e?(this.btnSign.gray=!1,this._sendRequest()):(this.btnSign.mouseEnabled=!0,S.ShowToast("只有观看完整视频才能领取哦!"))})}_sendRequest(){D.Instance.HttpPostRequest(C.Sign,[{video:"1"}],Laya.Handler.create(this,e=>{J.Instance.close(Q.Sign),ee.Instance.trigger(te.MainUIInfo.RedDotRefresh);let t=e.rewards;if(t)for(let e in t){let n;switch(e){case"1000":n=p.money;break;case"2000":n=p.diamond;break;case"4000":n=p.energy}n==p.diamond?J.Instance.open(Q.DiamondEffect,Laya.Handler.create(this,()=>{J.Instance.open(Q.Reward,[n,t[e],Laya.Handler.create(this,()=>{ie.Instance.refreshMoney()})])})):n==p.money?J.Instance.open(Q.Reward,[n,t[e],Laya.Handler.create(this,()=>{ie.Instance.updateMoney(t[e])})]):J.Instance.open(Q.Reward,[n,t[e],Laya.Handler.create(this,()=>{ie.Instance.refreshMoney()})])}}),Laya.Handler.create(this,e=>{S.ShowToast("今日已领取!")}),!1)}}class ai{static GetSignReward(){let e=new Array;null==this._SignCfg&&(this._SignCfg=F.Instance.curAccountData.getConfig(V.sign)),null==this._RewardCfg&&(this._RewardCfg=F.Instance.curAccountData.getConfig(V.rewards));for(let i=0;i<=13;i++){var t=this._SignCfg[i].rewards,n=this._GetRewardById(t);e.push(this._JudgeReward(Number(n.reward_item),Number(n.reward_num)))}return e}static _GetRewardById(e){if(this._RewardCfg)for(let t=0;t<this._RewardCfg.length;t++){let n=this._RewardCfg[t];if(n.id==e)return n}}static _JudgeReward(e,t){let n=parseInt((.001*e).toString()),i=e%1e3;n=Math.floor(n);let a=new T;switch(n){case 1:case 2:case 4:a.set(n,t);break;case 6:a.set(n,F.Instance.curAccountData.getThemeById(i))}return a}}class si extends fe.ShopUI{constructor(){super()}onOpen(e){x.Instance.playSound(l.openview),this._initUI(),this._btnHandler(),L.AldEvent("打开商店界面"),M.showBanner()}onClose(){L.AldEvent("关闭商店界面"),M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick)}_closeClick(){J.Instance.close(Q.Shop).open(Q.Main)}}class oi extends fe.AchievementUI{constructor(){super()}onOpen(e){x.Instance.playSound(l.openview),this._initUI(),this._btnHandler(),L.AldEvent("打开成就界面"),M.showBanner()}onClose(){L.AldEvent("关闭成就界面"),M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick)}_closeClick(){J.Instance.close(Q.Achievement)}}class ri{static get Instance(){return null==this._Instance&&(this._Instance=new ri),this._Instance}createScene(e,t){this._scene=new Laya.Scene3D,this._camera=new Laya.Camera,this._camera.transform.position=new Laya.Vector3(0,0,6),this._camera.clearFlag=2,this._camera.fieldOfView=7,this._scene.addChild(this._camera);let n=new Laya.DirectionLight;this._scene.addChild(n),n.transform.position=new Laya.Vector3(0,2,1),n.transform.rotationEuler=new Laya.Vector3(-60,0,0),this._gunPos=new Laya.Sprite3D,this._scene.addChild(this._gunPos),e.addChild(this._scene),this._camera.viewport=t}changeGun(e){this._gunPos.destroyChildren(),this._gunPos.transform.rotationEuler=dt.Zero;let t=tt.Instance.getPref(e),n=Laya.Sprite3D.instantiate(t),i=n.getChildAt(0);i.removeSelf(),n.destroy(),this._gunPos.addChild(i);let a=.15;switch(e){case"wpn_model_AWP":a=.3;break;case"wpn_model_Dragon":a=.4;break;case"wpn_model_FRF2":case"wpn_model_M82A1":case"wpn_model_SVD":a=.3}i.transform.localPosition=new Laya.Vector3(a,0,0),i.transform.localRotationEuler=new Laya.Vector3(-90,-90,0)}destroyScene(){this._scene.destroy(),this._scene=null,this._camera=null,this._gunPos=null}rotate(e){this._gunPos.transform.rotate(new Laya.Vector3(0,e,0),!0,!1)}}class ci extends fe.SkinUI{constructor(){super(),this._isMouseDown=!1}onOpen(e){x.Instance.playSound(l.openview),this._initSkinScene(),this._initData(),this._initUI(),this._btnHandler(),L.AldEvent("打开皮肤界面"),lt.IsInTryOut&&Laya.timer.once(500,this,()=>{S.ShowToast("有试用中的皮肤,切换将放弃试用机会")}),M.showBanner()}onClose(){this.off(Laya.Event.MOUSE_DOWN,this,this._mouseDown),ri.Instance.destroyScene(),L.AldEvent("关闭皮肤界面"),M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initSkinScene(){let e=new Laya.Viewport(this.gunModel.x,this.gunModel.y,this.gunModel.width,this.gunModel.height);ri.Instance.createScene(this.gunModel,e)}_initData(){let e=F.Instance.curAccountData;this._equipGunId=e.equipGunId,this._unlockGunId=Number(e.getUser(O.unlock_kun)),this._gunIdList=[],e.getConfig(V.gun).forEach(e=>{this._gunIdList.push(e.id)},this),this._gunIdList.sort((e,t)=>e-t)}_initUI(){this._refreshUI()}_refreshUI(){let e=F.Instance.curAccountData,t=this._equipGunId<=this._firstGunId,n=this._equipGunId>=this._unlockGunId;this._equipGunId,this._lastLastId;this.btnPrev.mouseEnabled=!t,this.btnPrev.gray=t,this.btnNext.mouseEnabled=!n,this.btnNext.gray=n;let i=e.getThemeById(this._equipGunId);this.txtName.text=`Lv ${i.id} - ${i.name}`,ri.Instance.changeGun(i.model);let a=e.getGlobal(h.min_wpn_atk),s=e.getGlobal(h.max_wpn_atk),o=e.getGlobal(h.min_wpn_ammo),r=e.getGlobal(h.max_wpn_ammo),c=e.getGlobal(h.min_wpn_reload_speed),l=e.getGlobal(h.max_wpn_reload_speed);this.txtAtk.text=i.atk,this.barAtk.value=z.ToPercentage(i.atk,a,s),this.txtAmmo.text=i.ammo,this.barAmmo.value=z.ToPercentage(i.ammo,o,r),this.txtReloadTime.text=i.reload_speed,this.barReloadTime.value=z.ToPercentage(i.reload_speed,l,c),this.btnInUse.visible=this._equipGunId==F.Instance.curAccountData.equipGunId,this.btnUse.visible=this._equipGunId!=F.Instance.curAccountData.equipGunId}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnPrev.clickHandler=new Laya.Handler(this,this._prevClick),this.btnNext.clickHandler=new Laya.Handler(this,this._nextClick),this.btnUse.clickHandler=new Laya.Handler(this,this._equipClick),this.on(Laya.Event.MOUSE_DOWN,this,this._mouseDown)}_prevClick(){this._equipGunId--,this._refreshUI()}_nextClick(){this._equipGunId++,this._refreshUI()}_closeClick(){J.Instance.close(Q.Skin).open(Q.Main)}_equipClick(){let e=this._equipGunId!=F.Instance.curAccountData.equipGunId,t=[{t:F.Instance.ServerTime.toString()},{id:this._equipGunId.toString()}];D.Instance.HttpPostRequest(C.Equip,t,Laya.Handler.create(this,t=>{lt.IsInTryOut&&e&&(lt.IsInTryOut=!1,lt.TryTimes=0),this._refreshUI()}),Laya.Handler.create(this,e=>{this._refreshUI()}))}get _firstGunId(){return this._gunIdList[0]}get _lastLastId(){return this._gunIdList[this._gunIdList.length-1]}_mouseDown(){this._isMouseDown=!0,this.on(Laya.Event.MOUSE_UP,this,this._mouseUp),Laya.timer.frameLoop(1,this,this._mouseMove),this._lastPoint=new Laya.Point(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY)}_mouseMove(){let e=new Laya.Point(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY),t=e.x-this._lastPoint.x;ri.Instance.rotate(t),this._lastPoint=e}_mouseUp(){this._isMouseDown=!1,this.off(Laya.Event.MOUSE_UP,this,this._mouseUp),Laya.timer.clear(this,this._mouseMove)}}class hi extends fe.ExtraGuideUI{constructor(){super(),this._step=1}onOpen(e){this.mouseEnabled=!0,this.mouseThrough=!0,this._step=e||1,this._createGuide()}onClose(){}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_createGuide(){this._gameContainer=new Laya.Sprite,this.addChild(this._gameContainer),this._guideContainer=new Laya.Sprite,this._guideContainer.cacheAs="bitmap",this.addChild(this._guideContainer);let e=new Laya.Sprite;e.alpha=.8,e.graphics.drawRect(0,0,Laya.stage.width,Laya.stage.height,"#000000"),this._guideContainer.addChild(e),this._interactionArea=new Laya.Sprite,this._interactionArea.blendMode="destination-out",this._guideContainer.addChild(this._interactionArea),this._hitArea=new Laya.HitArea,this._hitArea.hit.drawRect(0,0,Laya.stage.width,Laya.stage.height,"#000000"),this._guideContainer.hitArea=this._hitArea,this._guideContainer.mouseEnabled=!0,this._guideContainer.mouseThrough=!1,this._tipContainer=new Laya.Sprite,this.addChild(this._tipContainer),this._nextStep()}_nextStep(){switch(this._clearGuideContainer(),this._step){case 1:this._guideClick1();break;case 2:this._guideClick2();break;case 3:this._guideClick3();break;case 4:this._guideClick4();break;case 5:this._guideClick5();break;case 6:this._guideClick6();break;case 7:this._guideClick7();break;case 8:this._guideClick8();break;case 9:this._guideClick9();break;case 10:this._guideClick10()}}_endGuide(){this._clearGuideContainer(),Laya.stage.removeChild(this._guideContainer),Laya.stage.removeChild(this._tipContainer),J.Instance.close(Q.ExtraGuide)}_clearGuideContainer(){this._guideContainer.offAll(),this._hitArea.unHit.clear(),this._interactionArea.graphics.clear(),this._tipContainer.graphics.clear(),this._tipContainer.removeChildren()}_createTip(e,t,n=!1){let i=new Laya.Text;i.text=t,i.wordWrap=!0,i.width=240,i.height=80,i.bold=!0,i.fontSize=28,i.font="SimHei",i.valign="middle",i.color="#000000",i.leading=5;let a=new Laya.Image;a.skin="Main/bubble.png",a.sizeGrid="20,18,55,78",a.width=i.width+40,a.height=i.height+40+44,this._tipContainer.addChild(a),this._tipContainer.addChild(i),n?(a.skewY=180,e.x-=50,e.y-=a.height,a.pos(e.x,e.y),i.pos(e.x-a.width+20,e.y+20)):(e.x-=50,e.y-=a.height,a.pos(e.x,e.y),i.pos(e.x+20,e.y+20))}_guideClick1(){ie.Instance.updateMoney(40);let e=new Laya.Vector2(226,Laya.stage.height-137);this.guideHand.visible=!0,this.guideHand.pos(363,Laya.stage.height-68),this.ani1.play(0,!0),this._hitArea.unHit.drawRect(e.x,e.y,275,137,"#000000"),this._interactionArea.graphics.drawRect(e.x,e.y,275,137,"#000000"),this._createTip(new Laya.Vector2(e.x+170,e.y-20),"现在的枪难以应对接下来的敌人,让我们买一把新枪。",!0);let t=()=>{ee.Instance.off(te.MainUIGuide.BuyGun,this,t),this.guideHand.visible=!1,this.ani1.stop(),this._step++,this._nextStep()};ee.Instance.on(te.MainUIGuide.BuyGun,this,t)}_guideClick2(){let e=new Laya.Vector2(30,Laya.stage.height-657);this.guideHand.visible=!0,this.guideHand.pos(292,Laya.stage.height-574),this.ani2.play(0,!0),this._hitArea.unHit.drawRect(e.x,e.y,325,155,"#000000"),this._interactionArea.graphics.drawRect(e.x,e.y,325,155,"#000000"),this._createTip(new Laya.Vector2(e.x+162,e.y-20),"拖动枪支进行合成,可以获得更高级的枪。");let t=()=>{F.Instance.curAccountData.isGuideLv2Ended||(F.Instance.curAccountData.isGuideLv2Ended=!0),ee.Instance.off(te.MainUIGuide.Upgrade,this,t),this.guideHand.visible=!1,this.ani2.stop(),this._step++,this._nextStep()};ee.Instance.on(te.MainUIGuide.Upgrade,this,t)}_guideClick3(){let e=new Laya.Vector2(230,Laya.stage.height-780);this.guideHand.visible=!0,this.guideHand.pos(360,Laya.stage.height-720),this.ani1.play(0,!0),this._hitArea.unHit.drawRect(e.x,e.y,260,120,"#000000"),this._interactionArea.graphics.drawRect(e.x,e.y,260,120,"#000000"),this._createTip(new Laya.Vector2(e.x+40,e.y-20),"让我们试试新枪的威力!继续执行任务!");let t=()=>{ee.Instance.off(te.MainUIGuide.Start,this,t),this.guideHand.visible=!1,this.ani1.stop(),this._endGuide()};ee.Instance.on(te.MainUIGuide.Start,this,t)}_guideClick4(){let e=new Laya.Vector2(120,Laya.stage.height-110);this.guideHand.visible=!0,this.guideHand.pos(170,Laya.stage.height-55),this.ani1.play(0,!0),this._hitArea.unHit.drawRect(e.x,e.y,100,110,"#000000"),this._interactionArea.graphics.drawRect(e.x,e.y,100,110,"#000000"),this._createTip(new Laya.Vector2(e.x+40,e.y-20),"买枪的钱不够了?来试试加速功能!");let t=()=>{ee.Instance.off(te.MainUIGuide.Boost,this,t),this.guideHand.visible=!1,this.ani1.stop(),J.Instance.moveToTop(Q.ExtraGuide),this._step++,this._nextStep()};ee.Instance.on(te.MainUIGuide.Boost,this,t)}_guideClick5(){let e=new Laya.Vector2(251,850);this.guideHand.visible=!0,this.guideHand.pos(359,699),this.ani1.play(0,!0),this._hitArea.unHit.drawRect(e.x,e.y,210,85,"#000000"),this._interactionArea.graphics.drawRect(e.x,e.y,210,85,"#000000"),this._createTip(new Laya.Vector2(e.x+40,e.y-20),"点击领取,当前所有枪支获得五倍收益!");let t=()=>{F.Instance.curAccountData.isGuideLv4Ended||(F.Instance.curAccountData.isGuideLv4Ended=!0),ee.Instance.off(te.MainUIGuide.Share,this,t),this.guideHand.visible=!1,this.ani1.stop(),this._endGuide()};ee.Instance.on(te.MainUIGuide.Share,this,t)}_guideClick6(){let e=new Laya.Vector2(230,Laya.stage.height-780);this.guideHand.visible=!0,this.guideHand.pos(360,Laya.stage.height-720),this.ani1.play(0,!0),this._hitArea.unHit.drawRect(e.x,e.y,260,120,"#000000"),this._interactionArea.graphics.drawRect(e.x,e.y,260,120,"#000000"),this._createTip(new Laya.Vector2(e.x+40,e.y-20),"点击开始游戏,让我们开始执行任务吧!");let t=()=>{ee.Instance.off(te.MainUIGuide.Start,this,t),this.guideHand.visible=!1,this.ani1.stop(),this._endGuide()};ee.Instance.on(te.MainUIGuide.Start,this,t)}_guideClick7(){let e=new Laya.Vector2(360,921);this._hitArea.unHit.drawCircle(e.x,e.y,91,91,"#000000"),this._interactionArea.graphics.drawCircle(e.x,e.y,91,91,"#000000"),this._interactionArea.graphics.drawRect(0,190,720,68,"#000000"),this.arrowWhite.visible=!0,this.ani3.play(0,!0),this.arrowWhite.removeSelf(),this.addChild(this.arrowWhite),wt.Instance.off();let t=()=>{ee.Instance.off(te.GameGuide.OpenScope,this,t),this.arrowWhite.visible=!1,this.ani3.stop(),wt.Instance.on(),ee.Instance.trigger(te.PlayerBehav.GuideAim),this._endGuide()};ee.Instance.on(te.GameGuide.OpenScope,this,t)}_guideClick8(){hi.IsSpecialLottery=!0;let e=new Laya.Vector2(610,121);this.guideHand.visible=!0,this.guideHand.pos(655,177),this.ani1.play(0,!0),this._hitArea.unHit.drawRect(e.x,e.y,90,113,"#000000"),this._interactionArea.graphics.drawRect(e.x,e.y,90,113,"#000000"),this._createTip(new Laya.Vector2(e.x,e.y+100),"哎呀,任务太辛苦了,让我们去抽奖放松一下吧。",!0);let t=()=>{ee.Instance.off(te.MainUIGuide.Lottery,this,t),this.guideHand.visible=!1,this.ani1.stop(),this._step++,this._nextStep()};ee.Instance.on(te.MainUIGuide.Lottery,this,t)}_guideClick9(){let e=new Laya.Vector2(82,823);this.guideHand.visible=!0,this.guideHand.pos(207,873),this.ani1.play(0,!0),this._hitArea.unHit.drawRect(e.x,e.y,251,100,"#000000"),this._interactionArea.graphics.drawRect(e.x,e.y,251,100,"#000000"),this._createTip(new Laya.Vector2(e.x+275,e.y),"点击这里,可以进行抽奖。劳逸结合才能事半功倍哦!",!0),J.Instance.moveToTop(Q.ExtraGuide);let t=()=>{ee.Instance.off(te.MainUIGuide.GetEnergy,this,t),hi.IsSpecialLottery=!1,F.Instance.curAccountData.isGuideEnergyEnded=!0,this.guideHand.visible=!1,this.ani1.stop(),this._endGuide()};ee.Instance.on(te.MainUIGuide.GetEnergy,this,t)}_guideClick10(){this._hitArea.unHit.drawRect(0,0,Laya.stage.width,Laya.stage.height,"#000000"),this._interactionArea.graphics.drawRect(0,190,720,68,"#000000"),J.Instance.moveToTop(Q.ExtraGuide),this.guideCross.visible=!0,this.guideCross.removeSelf(),this.addChild(this.guideCross),this.ani4.play(0,!0);let e=()=>{ee.Instance.off(te.GameGuide.RotateNoscope,this,e),this.guideCross.visible=!1,this.ani4.stop(),this._endGuide()};ee.Instance.on(te.GameGuide.RotateNoscope,this,e)}}hi.IsSpecialLottery=!1;const li="reward",di="skin",pi="name",gi="res/skin/",ui=".png",yi="Main/",mi=5,_i=5e3;var Ii;!function(e){e[e.video=0]="video",e[e.diamond=1]="diamond"}(Ii||(Ii={}));class wi extends fe.LotteryUI{constructor(){super(),this._gunArr=[]}onOpen(e){x.Instance.playSound(l.openview),this._initUI(),this._btnHandler(),L.AldEvent("打开抽奖界面"),ee.Instance.trigger(te.MainUIGuide.Lottery),M.showBanner()}onClose(){L.AldEvent("关闭抽奖界面"),M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){this._refreshUI(),!F.Instance.curAccountData.isGuideEnergyEnded&&hi.IsSpecialLottery&&(this.btnVideo.mouseEnabled=!0,this.btnVideo.gray=!1);let e=F.Instance.curAccountData.getConfig(V.lottery),t=1;this._itemDic=new T,e&&e.forEach(e=>{this._itemDic.set(t,e);let n=Math.floor(.001*Number(e.reward_item)),i=this.dial.getChildByName(`${li}${t++}`);if(!i)return;let a=i.getChildByName(di),s=i.getChildByName(pi);1==n||2==n||4==n||9==n||10==n||11==n||12==n?(a.scaleX=a.scaleY=.7,a.skin=yi+e.icon+ui,s.text=e.name.toString()):6==n&&(a.scaleX=a.scaleY=.25,a.skin=gi+e.icon+ui,s.text=e.name.toString(),s.visible=!1)},this)}_refreshUI(){let e=F.Instance.curAccountData;this.dial.rotation=0,this.btnVideo.visible=!0,this.btnUseDiamond.visible=!0,this.txtDiamond.text=e.getGlobal(h.lottery_cost_diamond).toString();let t=e.lottery.day_video_times>0,n=e.lottery.day_diamond_times>0;this.btnVideo.mouseEnabled=t,this.btnVideo.gray=!t,this.btnUseDiamond.mouseEnabled=n,this.btnUseDiamond.gray=!n,this.btnClose.visible=!0}_disableUI(){this.btnVideo.visible=!1,this.btnUseDiamond.visible=!1,this.btnClose.visible=!1}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnVideo.clickHandler=new Laya.Handler(this,this._videoClick),this.btnUseDiamond.clickHandler=new Laya.Handler(this,this._useDiamond)}_closeClick(){J.Instance.close(Q.Lottery)}_videoClick(){if(!F.Instance.curAccountData.isGuideEnergyEnded&&hi.IsSpecialLottery){this._disableUI(),this._rotateDial({lottery_id:2});let e=[{reward_item:"4000"},{reward_num:this._itemDic.get(2).reward_num},{t:F.Instance.ServerTime.toString()}];return D.Instance.HttpPostRequest(C.Fission,e,null,null),void ee.Instance.trigger(te.MainUIGuide.GetEnergy)}this._disableUI(),this._watchVideo(Ii.video)}_useDiamond(){let e=Number(F.Instance.curAccountData.cfg.globalDic.get("lottery_cost_diamond"));ie.Instance.diamond<e?Ce.ShowToast("钻石不足!"):(this._disableUI(),this._sendRequest(Ii.diamond))}_watchVideo(e){L.AldEvent("抽奖看视频"),M.showVideoAd(t=>{t?this._sendRequest(e):(this._refreshUI(),S.ShowToast("只有观看完整视频才能抽奖哦!"))})}_sendRequest(e){let t=[{channel:Ii[e]},{t:F.Instance.ServerTime.toString()}];D.Instance.HttpPostRequest(C.Lottery,t,Laya.Handler.create(this,e=>{this._rotateDial(e)}),Laya.Handler.create(this,e=>{S.ShowToast("抽奖次数已经用完!",!1),this._refreshUI()}))}_rotateDial(e){x.Instance.playSound(l.dial);let t=360*mi-60*(e.lottery_id-1);Laya.Tween.to(this.dial,{rotation:t},_i,Laya.Ease.quadInOut,Laya.Handler.create(this,()=>{let t,n=this._itemDic.get(e.lottery_id);switch(Math.floor(.001*Number(n.reward_item))){case 1:t=p.money;break;case 2:t=p.diamond;break;case 4:t=p.energy;break;case 9:t=p.income_multiple;break;case 10:t=p.income_speedup;break;case 11:t=p.income_instant;break;case 12:t=p.gun}if(t==p.diamond)J.Instance.open(Q.DiamondEffect,Laya.Handler.create(this,()=>{J.Instance.open(Q.Reward,[t,n.reward_num,Laya.Handler.create(this,this._refresh)])}));else if(t==p.income_multiple)J.Instance.open(Q.Reward,[t,n.name,Laya.Handler.create(this,()=>{let e=he.Instance.getIncomeBuff(Number(n.id),le.Amount);e.effect=Number(n.reward_num),e.time+=F.Instance.curAccountData.getGlobal(h.buff_time),he.Instance.setIncomeBuff(e),this._refresh()})]);else if(t==p.income_speedup)J.Instance.open(Q.Reward,[t,n.name,Laya.Handler.create(this,()=>{let e=he.Instance.getIncomeBuff(Number(n.id),le.Time);e.effect=Number(n.reward_num),e.time+=F.Instance.curAccountData.getGlobal(h.buff_time),he.Instance.setIncomeBuff(e),this._refresh()})]);else if(t==p.income_instant){let e=se.Instance.totalOutPerSeconed*Number(n.reward_num);J.Instance.open(Q.Reward,[t,Ie.ToKMB(e,2),Laya.Handler.create(this,()=>{ie.Instance.updateMoney(e),this._refresh()})])}else t==p.gun?this._buyGun():J.Instance.open(Q.Reward,[t,n.reward_num,Laya.Handler.create(this,this._refresh)])}))}_refresh(){this._refreshUI(),ie.Instance.refreshMoney()}_buyGun(){let e=F.Instance.curAccountData.getUser(O.list_kun),t=0;e.forEach(e=>{0==e&&t++},this),t>4&&(t=4),this._buyOneGun(t)}_buyOneGun(e){if(0==e)return ee.Instance.trigger(te.MainUIInfo.GunListRefresh),J.Instance.open(Q.NewReward,[this._gunArr]),void this._refresh();let t,n=F.Instance.curAccountData.getUser(O.unlock_kun);if(n<=4)t=1;else{let e=n-4,i=n-6;i<1&&(i=1),t=z.RandInt(i,e)}let i=F.Instance.curAccountData.cfg.gunDic.get(t);this._gunArr.push(i);let a=[{t:F.Instance.ServerTime.toString()},{id:t.toString()}];D.Instance.HttpPostRequest(C.BuyGun,a,Laya.Handler.create(this,t=>{e--,this._buyOneGun(e)}),Laya.Handler.create(this,t=>{console.log(`[LOG]${t.message}`),e--,this._buyOneGun(e)}))}}const fi="Main/jb1.png",xi="Main/zs1.png",vi="Main/tili.png",ki="Main/money.png",Mi="Main/time.png",Li="Main/up.png";class bi extends fe.RewardUI{constructor(){super()}onOpen(e){x.Instance.playSound(l.reward);let[t,n,i]=e;this._rewardType=t,this._desc=n,this._complete=i,this._btnHandler(),this._initUI(),L.AldEvent("打开领取界面")}onClose(){this._complete&&this._complete.run(),L.AldEvent("关闭领取界面")}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){switch(this._rewardType){case p.money:this.icon.skin=fi,this.icon.scaleX=this.icon.scaleY=1.5;break;case p.diamond:this.icon.skin=xi,this.icon.scaleX=this.icon.scaleY=1;break;case p.energy:this.icon.skin=vi,this.icon.scaleX=this.icon.scaleY=1;break;case p.income_instant:this.icon.skin=ki,this.icon.scaleX=this.icon.scaleX=1;break;case p.income_multiple:this.icon.skin=Li,this.icon.scaleX=this.icon.scaleX=1;break;case p.income_speedup:this.icon.skin=Mi,this.icon.scaleX=this.icon.scaleX=1}this.desc.text=this._desc}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick)}_closeClick(){J.Instance.close(Q.Reward)}}class Si extends fe.OfflineIncomeUI{constructor(){super(),this._factor=1}onOpen(e){this._initUI(),this._btnHandler(),L.AldEvent("打开离线收益界面"),this._complete=e,M.showBanner()}onClose(){se.Instance.start(),L.AldEvent("关闭离线收益界面"),M.hideBanner(),this._complete&&this._complete.run()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){this.txtIncome.text=Ie.ToKMB(se.Instance.offlineIncome,2)}_btnHandler(){this.btnClose.visible=!1,Laya.timer.once(3e3,this,()=>{this.btnClose.visible=!0,this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick)}),this.btnOk.clickHandler=new Laya.Handler(this,this._shareClick)}_closeClick(){ie.Instance.updateMoney(se.Instance.offlineIncome*this._factor),ie.Instance.syncData(),J.Instance.close(Q.OfflineIncome)}_shareClick(){this.btnOk.gray=!0,this.btnOk.mouseEnabled=!1,M.showVideoAd(e=>{e?this._factor=3:(this.btnOk.gray=!1,this.btnOk.mouseEnabled=!0)})}}const Ai=200;class Ci extends fe.IncomeBoostUI{constructor(){super(),this._isCountingDown=!1}onOpen(e){x.Instance.playSound(l.openview),ee.Instance.on(te.IncomeMgr.BoostTikTok,this,this._tikTok),this._initUI(),this._btnHandler(),L.AldEvent("打开加速界面"),M.showBanner()}onClose(){ee.Instance.off(te.IncomeMgr.BoostTikTok,this,this._tikTok),this._isCountingDown=!1,L.AldEvent("关闭加速界面"),M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){this.desc.text=`获得${Ai}秒加速时间`,this._tikTok()}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnOk.clickHandler=new Laya.Handler(this,this._shareClick)}_closeClick(){J.Instance.close(Q.IncomeBoost)}_shareClick(){if(4==F.Instance.curAccountData.levelId&&!F.Instance.curAccountData.isGuideLv4Ended){ee.Instance.trigger(te.MainUIGuide.Share);let e=he.Instance.getIncomeBuff(de.ShareBoost,le.Amount);return e.effect=400,e.time+=Ai,he.Instance.setIncomeBuff(e),void this._tikTok()}L.AldEvent("收益看视频"),M.showVideoAd(e=>{if(e){let e=he.Instance.getIncomeBuff(de.ShareBoost,le.Amount);e.effect=400,e.time+=Ai,he.Instance.setIncomeBuff(e),this._tikTok()}else S.ShowToast("只有观看完整视频才能领取哦!")})}_tikTok(){let e=he.Instance.getIncomeBuff(de.ShareBoost,le.Amount);this._cntDown=e.time,this.txtTime.text=Ie.ToTimeMS(this._cntDown),this._updateProgressBar()}_updateProgressBar(){for(let e=0;e<this.barList.numChildren;e++){let t=this.barList.getChildAt(e),n=(this._cntDown-Ai*e)/Ai;n=z.Clamp(n,0,1),t.value=n}}}class Di extends fe.GunUpgradeUI{constructor(){super()}onOpen(e){x.Instance.playSound(l.upgrade);let[t,n,i]=e;this._complete=i,this._setImage(this.lgun,t),this._setImage(this.rgun,t),this._setImage(this.mgun,n),this.ani1.play(0,!1),this.ani2.play(0,!1),Laya.timer.once(1e3,this,()=>{J.Instance.close(Q.GunUpgrade)})}onClose(){this._complete&&this._complete.run()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_setImage(e,t){let n=new Laya.Image;e.addChild(n),n.skin=t,n.scaleX=n.scaleY=.5,n.centerX=0,n.centerY=0}}class Ti extends fe.GuideUI{constructor(){super()}onOpen(e){L.AldEvent("打开引导界面"),this._initUI(),ee.Instance.on(te.PlayerBehav.GuideAim,this,this._showGuide3),ee.Instance.on(te.PlayerBehav.GuideFire,this,this._showGuide4),ee.Instance.on(te.GameGuide.RotateNoscope,this,this._showGuide1),ee.Instance.on(te.GameGuide.CloseScope,this,this._onScopeClosed)}onClose(){L.AldEvent("关闭引导界面"),ee.Instance.off(te.PlayerBehav.GuideAim,this,this._showGuide3),ee.Instance.off(te.PlayerBehav.GuideFire,this,this._showGuide4),ee.Instance.off(te.GameGuide.RotateNoscope,this,this._showGuide1),ee.Instance.off(te.GameGuide.CloseScope,this,this._onScopeClosed)}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){1==F.Instance.curAccountData.levelId?(this._showGuide8(),wt.Instance.off(),Laya.timer.once(500,this,()=>{wt.Instance.on()})):6==F.Instance.curAccountData.levelId?this._showGuide5():10==F.Instance.curAccountData.levelId&&(this._showGuide6(),wt.Instance.off(),Laya.timer.once(3e3,this,()=>{wt.Instance.on(),this._showGuide7()}))}_hideAll(){this.guide1.visible=!1,this.guide2.visible=!1,this.guide3.visible=!1,this.guide4.visible=!1,this.guide5.visible=!1,this.guide6.visible=!1,this.guide7.visible=!1,this.guide8.visible=!1}_showGuide1(){this._hideAll(),this.guide1.visible=!0,zt.Instance.showHint(),Laya.timer.once(1500,this,()=>{this._showGuide2(),J.Instance.open(Q.ExtraGuide,7),ee.Instance.trigger(te.GameGuide.EnableClickScope)})}_showGuide2(){this._hideAll(),this.guide2.visible=!0,J.Instance.moveToTop(Q.Guide)}_showGuide3(){this._hideAll(),this.guide3.visible=!0,J.Instance.moveToTop(Q.Guide)}_showGuide4(){this._hideAll(),this.guide4.visible=!0,J.Instance.moveToTop(Q.Guide)}_showGuide5(){this._hideAll(),this.guide5.visible=!0}_showGuide6(){this._hideAll(),this.guide6.visible=!0}_showGuide7(){this._hideAll(),this.guide7.visible=!0}_showGuide8(){this._hideAll(),this.guide8.visible=!0,J.Instance.open(Q.ExtraGuide,10)}_onScopeClosed(){this._showGuide2(),J.Instance.open(Q.ExtraGuide,7),ee.Instance.trigger(te.GameGuide.EnableClickScope)}}class Bi extends fe.DiamondEffectUI{constructor(){super()}onOpen(e){this._complete=e,this.ani1.play(0,!1),x.Instance.playSound(l.diamond);let t=()=>{this.ani1.isPlaying||(Laya.timer.clear(this,t),J.Instance.close(Q.DiamondEffect))};Laya.timer.frameLoop(1,this,t)}onClose(){this._complete&&this._complete.run()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}}class Ni extends fe.DescUI{constructor(){super(),this._dynamicLoaded=!1,this._sceneLoaded=!1}onOpen(e){let t=Laya.stage.height-864-390,n=(Laya.stage.height-864-100)/2;this.dialog.y=Math.min(t,n);let i=this.dialog.localToGlobal(new Laya.Point(this.screenPos.x,this.screenPos.y),!0);this.imgScene.y=i.y,this.imgSnowFlake.y=i.y,x.Instance.playSound(l.openview),L.AldEvent("打开介绍界面"),this._initUI(),this._btnHandler(),M.showBanner()}onClose(){L.AldEvent("关闭介绍界面"),this._clearScene(),M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){this.txtLevel.text=`第${F.Instance.curAccountData.levelId}关`,this.txtGoal.text=`目标:${F.Instance.curAccountData.level.goal}`,this.txtRecommend.text=`${F.Instance.curAccountData.level.recommend}`,this._initDiv(),this._showLoading(),tt.Instance.dynamicLoadNpc(Laya.Handler.create(this,()=>{console.log("描述界面dynamicLoadNpc------"),this._dynamicLoaded=!0,this._loadingFinish()})),zn.Instance.isLoaded?(this._sceneLoaded=!0,this._loadingFinish(),this._sceneLoadEnd()):zn.Instance.load(Laya.Handler.create(this,()=>{this._sceneLoaded=!0,this._loadingFinish(),this._sceneLoadEnd()}))}_sceneLoadEnd(){this._initScene(),Laya.timer.once(500,this,()=>{this.imgSnowFlake.visible=!1})}_initScene(){let e=new Laya.Viewport(this.imgScene.x,this.imgScene.y,this.imgScene.width,this.imgScene.height);Un.Instance.init(),In.Instance.hide(),zn.Instance.attachView(this.imgScene,e),zn.Instance.show()}_clearScene(){zn.Instance.detachView(),zn.Instance.hide(),In.Instance.show()}_btnHandler(){this.btnStart.clickHandler=new Laya.Handler(this,this._startGame),this.btnClose.clickHandler=new Laya.Handler(this,this._quit)}_startGame(){ee.Instance.trigger(te.MainUIGuide.Start),this.btnStart.mouseEnabled=!1;let e=[{t:F.Instance.ServerTime.toString()}];D.Instance.HttpPostRequest(C.Start,e,Laya.Handler.create(this,e=>{F.Instance.curAccountData.play_id=e.play_id,this.btnStart.mouseEnabled=!0,J.Instance.close(Q.Desc).open(Q.Game)}),Laya.Handler.create(this,e=>{this.btnStart.mouseEnabled=!0,Ce.ShowToast("体力不足")}))}_quit(){J.Instance.close(Q.Desc).open(Q.Main)}_initDiv(){this.txtDesc.text=F.Instance.curAccountData.level.desc,this.btnStart.visible=!1,this.btnClose.visible=!1}_showLoading(){this._progressTween=Laya.Tween.to(this.progressBar,{value:.92,update:new Laya.Handler(this,()=>{let e=Math.floor(100*this.progressBar.value);this.progressVal.text=`${e}%`})},1e4,Laya.Ease.linearInOut,Laya.Handler.create(this,()=>{}))}_loadingFinish(){console.log("描述界面——_loadingFinish--"),this._dynamicLoaded&&this._sceneLoaded&&(this.progressVal.text="95%",this.progressBar.value=.95,Laya.timer.once(200,this,()=>{this._progressTween.clear(),this.progressVal.text="100%",this.progressBar.value=1,this.btnStart.visible=!0,this.btnClose.visible=!0,this.progressBar.visible=!1}))}}const Gi="MainMenuPlayer",Ei="leader",Hi="headPos";class Pi{static get Instance(){return null==this._Instance&&(this._Instance=new Pi),this._Instance}createScene(e,t){this._scene=new Laya.Scene3D,e.addChild(this._scene),this.camera=new Laya.Camera,this.camera.transform.position=new Laya.Vector3(0,1.3,8),this.camera.clearFlag=2,this.camera.fieldOfView=pt.U3dToLayaFov(20),this.camera.viewport=t,this._scene.addChild(this.camera);let n=new Laya.DirectionLight;this._scene.addChild(n);let i=tt.Instance.getPref(Ei);this._leader=Laya.Sprite3D.instantiate(i),this._scene.addChild(this._leader),this._leader.transform.localPosition=new Laya.Vector3(-1,0,0),this._leader.transform.localRotationEuler=new Laya.Vector3(0,60,0),this.leaderHead=kt.GetChildByName(this._leader,Hi).transform.position.clone();let a=tt.Instance.getPref(Gi);this._player=Laya.Sprite3D.instantiate(a),this._scene.addChild(this._player),this._player.transform.localPosition=new Laya.Vector3(1,0,0),this._player.transform.localRotationEuler=new Laya.Vector3(0,-60,0),this._playerAnimator=this._player.getComponent(Laya.Animator),xt.Play(this._playerAnimator,"talk"),this.playerHead=kt.GetChildByName(this._player,Hi).transform.position.clone(),this.playerHead.y=this.leaderHead.y,this.playerHead.z=this.leaderHead.z}destroyScene(){this._scene.destroy(),this._scene=null,this.camera=null,this._player=null,this._leader=null}}class Ri extends fe.ConverstaionUI{constructor(){super(),this._msgIdx=0,this._isPreMsg=!1}onOpen(e){this._isPreMsg=e||!1,this._initScene(),this._initData(),this._startConversation(),this.btnSkip.clickHandler=new Laya.Handler(this,this._skip)}onClose(){Pi.Instance.destroyScene()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initData(){let e=F.Instance.curAccountData,t=this._isPreMsg?e.level.preMsgId:e.level.msgId,n=e.cfg.msgDic.get(t);this._msgArr=n.msg.split(";")}_initScene(){let e=new Laya.Viewport(this.sceneContainer.x,this.sceneContainer.y,this.sceneContainer.width,this.sceneContainer.height);Pi.Instance.createScene(this.sceneContainer,e)}_startConversation(){this._moveNext()}_moveNext(){Laya.timer.once(1e3,this,()=>{if(this._msgIdx<this._msgArr.length){let e=this._msgArr[this._msgIdx++];this._createMsg(e)}else this._endConversationEnd()})}_endConversationEnd(){this._isPreMsg?lt.CanTryOut?J.Instance.close(Q.Conversation).open(Q.TryOut):J.Instance.close(Q.Conversation).open(Q.Desc):J.Instance.close(Q.Conversation).open(Q.Result,[!0])}_createMsg(e){let t=e.split(":");if(2!=t.length)return;let n="B"==t[0];this._bubbleImg&&this._bubbleImg.destroy(),this._bubbleText&&this._bubbleText.destroy();let i=new Laya.Text;i.font="Microsoft YaHei",i.fontSize=35,i.leading=10,i.color="#000000",i.wordWrap=!0,i.text=t[1],i.width=320,this._bubbleText=i;let a=new Laya.Image;if(this.addChild(a),a.skin="Main/bubble.png",a.sizeGrid="20,18,55,78",a.width=i.width+40,a.height=i.height+40+44,this._bubbleImg=a,this.addChild(i),n){a.skewY=180;let e=dt.Zero;Pi.Instance.camera.worldToViewportPoint(Pi.Instance.playerHead,e),e.x-=50,e.y-=a.height,a.pos(e.x,e.y),i.pos(e.x-a.width+20,e.y+20),this._displayMsg(t[1])}else{let e=dt.Zero;Pi.Instance.camera.worldToViewportPoint(Pi.Instance.leaderHead,e),e.x-=50,e.y-=a.height,a.pos(e.x,e.y),i.pos(e.x+20,e.y+20),this._displayMsg(t[1])}}_displayMsg(e){this._curMsg=e,this._curDisplayLen=1,this._bubbleText.text="",Laya.timer.loop(100,this,this._autoDisplayMsg),Laya.stage.on(Laya.Event.CLICK,this,this._screenClick)}_autoDisplayMsg(){this._curDisplayLen<=this._curMsg.length?(this._bubbleText.text=this._curMsg.substr(0,this._curDisplayLen),this._curDisplayLen++):(Laya.stage.off(Laya.Event.CLICK,this,this._screenClick),Laya.timer.clear(this,this._autoDisplayMsg),this._moveNext())}_screenClick(){Laya.stage.off(Laya.Event.CLICK,this,this._screenClick),Laya.timer.clear(this,this._autoDisplayMsg),this._bubbleText.text=this._curMsg,this._moveNext()}_skip(){Laya.stage.off(Laya.Event.CLICK,this,this._screenClick),Laya.timer.clear(this,this._autoDisplayMsg),this._endConversationEnd()}}const Ui="res/skin/",zi=".png";class Vi extends fe.NewWeaponUI{constructor(){super()}onOpen(e){this._gunId=e,x.Instance.playSound(l.reward),this._initUI(),this._btnHandler(),L.AldEvent("打开获得新武器界面")}onClose(){this._complete&&this._complete.run(),L.AldEvent("关闭获得新武器界面")}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){let e=F.Instance.curAccountData,t=e.getThemeById(this._gunId);this.icon.skin=Ui+t.icon+zi;let n=e.getGlobal(h.min_wpn_atk),i=e.getGlobal(h.max_wpn_atk),a=e.getGlobal(h.min_wpn_ammo),s=e.getGlobal(h.max_wpn_ammo),o=e.getGlobal(h.min_wpn_reload_speed),r=e.getGlobal(h.max_wpn_reload_speed);this.txtAtk.text=t.atk,this.barAtk.value=z.ToPercentage(t.atk,n,i),this.txtAmmo.text=t.ammo,this.barAmmo.value=z.ToPercentage(t.ammo,a,s),this.txtReloadTime.text=t.reload_speed,this.barReloadTime.value=z.ToPercentage(t.reload_speed,r,o),this.txtPrize.text=`领取${t.prize}`}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnShare.clickHandler=new Laya.Handler(this,this._shareClick)}_shareClick(){this.btnShare.mouseEnabled=!1,M.showVideoAd(e=>{if(e){let e=[{reward_item:"2000"},{reward_num:F.Instance.curAccountData.getThemeById(this._gunId).prize.toString()},{t:F.Instance.ServerTime.toString()}];D.Instance.HttpPostRequest(C.Fission,e,Laya.Handler.create(this,e=>{this.btnShare.gray=!0;let t=e.rewards;t[2e3]&&J.Instance.open(Q.DiamondEffect,Laya.Handler.create(this,()=>{J.Instance.open(Q.Reward,[p.diamond,t[2e3],null])}))}),Laya.Handler.create(this,e=>{this.btnShare.mouseEnabled=!0}))}else this.btnShare.mouseEnabled=!0})}_closeClick(){J.Instance.close(Q.NewWeapon);let e=F.Instance.curAccountData.getThemeById(this._gunId);gt.Instance.changeGun(e.model)}}class Oi extends fe.GetEnergyUI{constructor(){super()}onOpen(e){this._initUI(),this._btnHandler()}onClose(){ie.Instance.refreshMoney()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){this.desc.text=`+${F.Instance.curAccountData.energyRecoverAmount}`}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnShare.clickHandler=new Laya.Handler(this,this._shareClick)}_shareClick(){this.btnShare.mouseEnabled=!1,M.showVideoAd(e=>{if(e){let e=[{reward_item:"4000"},{reward_num:F.Instance.curAccountData.energyRecoverAmount},{t:F.Instance.ServerTime.toString()}];D.Instance.HttpPostRequest(C.Fission,e,Laya.Handler.create(this,e=>{e.rewards[4e3]&&Ce.ShowToast("领取成功!"),this._closeClick()}),Laya.Handler.create(this,e=>{this.btnShare.mouseEnabled=!0}))}else this.btnShare.mouseEnabled=!0})}_closeClick(){J.Instance.close(Q.GetEnergy)}}const Xi="res/skin/",qi=".png";class Yi extends fe.NewRewardUI{constructor(){super()}onOpen(e){x.Instance.playSound(l.reward);let[t,n]=e;this._gunArr=t,this._complete=n,this._btnHandler(),this._initUI(),L.AldEvent("打开空投领取界面")}onClose(){this._complete&&this._complete.run(),L.AldEvent("关闭空投领取界面")}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){this.gunList.vScrollBarSkin="",this.gunList.renderHandler=new Laya.Handler(this,this._updateItem),this.gunList.array=this._gunArr,this.gunList.refresh()}_updateItem(e,t){let n=e.getChildByName("skinFrame").getChildByName("skin"),i=e.getChildByName("name"),a=e.getChildByName("level"),s=e.dataSource;n.skin=Xi+s.icon+qi,i.text=s.name,a.value=s.id}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnShowoff.clickHandler=new Laya.Handler(this,this._showoff)}_closeClick(){J.Instance.close(Q.NewReward)}_showoff(){this.btnShowoff.mouseEnabled=!1,M.showVideoAd(e=>{this.btnShowoff.mouseEnabled=!0})}}const Fi="res/skin/",Wi=".png";class ji extends fe.ExtraUpgradeUI{constructor(){super()}onOpen(e){let[t,n]=e;this._slotIndex=n,this._curGun=F.Instance.curAccountData.cfg.gunDic.get(t),this._nextGun=F.Instance.curAccountData.cfg.gunDic.get(t+1),this._initUI(),this._btnHandler()}onClose(){}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){this.imgLeft.skin=Fi+this._curGun.icon+Wi,this.imgLeft.scaleX=this.imgLeft.scaleY=.4,this.imgRight.skin=Fi+this._nextGun.icon+Wi,this.imgRight.scaleX=this.imgRight.scaleY=.4}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnUpgrade.clickHandler=new Laya.Handler(this,this._upgradeClick)}_closeClick(){J.Instance.close(Q.ExtraUpgrade)}_upgradeClick(){this.btnUpgrade.mouseEnabled=!1,L.AldEvent("跳级升枪看视频"),M.showVideoAd(e=>{if(this.btnUpgrade.mouseEnabled=!0,e){let e=F.Instance.curAccountData.getUser(O.list_kun);for(let t=0;t<e.length;t++)if(0==e[t]){this._newGunIndex=t;break}let t=[{t:F.Instance.ServerTime.toString()},{id:this._curGun.id.toString()}];D.Instance.HttpPostRequest(C.BuyGun,t,Laya.Handler.create(this,()=>{let e=[{from:this._newGunIndex.toString()},{to:this._slotIndex.toString()},{t:F.Instance.ServerTime.toString()}];D.Instance.HttpPostRequest(C.MoveGun,e,Laya.Handler.create(this,e=>{this.btnUpgrade.mouseEnabled=!1,this.btnUpgrade.gray=!0,ee.Instance.trigger(te.MainUIInfo.GunListRefresh)}),Laya.Handler.create(this,e=>{}))}),Laya.Handler.create(this,()=>{}))}else S.ShowToast("只有观看完整视频才能升级哦!")})}}class $i extends fe.DailyGiftUI{constructor(){super()}onOpen(e){this._initUI(),this._btnHandler(),M.showBanner()}onClose(){M.hideBanner()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){let e=F.Instance.curAccountData.leftDailyGiftCnt,t=new Date(1e3*F.Instance.curAccountData.lastDailyGiftTime),n=new Date(1e3*F.Instance.ServerTime);n.setHours(0,0,0,0),t.valueOf()<n.valueOf()&&(e=F.Instance.curAccountData.leftDailyGiftCnt=F.Instance.curAccountData.dailyGiftMaxCnt),this.txtAmount.text=e.toString(),this.btnOpen.mouseEnabled=e>0,this.btnOpen.gray=e<=0,this.txtDiamond.text=F.Instance.curAccountData.dailyGiftDiamondReward.toString()}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick),this.btnOpen.clickHandler=new Laya.Handler(this,this._openClick)}_closeClick(){J.Instance.close(Q.DailyGift)}_openClick(){L.AldEvent("每日礼包看视频"),this.btnOpen.mouseEnabled=!1,M.showVideoAd(e=>{if(e){let e=[{reward_item:"2000"},{reward_num:F.Instance.curAccountData.dailyGiftDiamondReward.toString()},{t:F.Instance.ServerTime.toString()}];D.Instance.HttpPostRequest(C.Fission,e,Laya.Handler.create(this,e=>{this.btnOpen.mouseEnabled=!0,F.Instance.curAccountData.leftDailyGiftCnt--,F.Instance.curAccountData.lastDailyGiftTime=F.Instance.ServerTime,this._refreshCnt();let t=e.rewards;t[2e3]&&J.Instance.open(Q.DiamondEffect,Laya.Handler.create(this,()=>{J.Instance.open(Q.Reward,[p.diamond,t[2e3],Laya.Handler.create(this,()=>{ie.Instance.refreshMoney()})])}))}),Laya.Handler.create(this,e=>{this.btnOpen.mouseEnabled=!0}))}else S.ShowToast("只有观看完整视频才能领取哦!"),this.btnOpen.mouseEnabled=!0})}_refreshCnt(){let e=F.Instance.curAccountData.leftDailyGiftCnt;this.txtAmount.text=e.toString(),this.btnOpen.mouseEnabled=e>0,this.btnOpen.gray=e<=0}}class Ki extends fe.HintUI{constructor(){super()}onOpen(e){this._complete=e,this._initUI(),this._btnHandler()}onClose(){this._complete&&this._complete.run()}onActive(){}onInactive(){}onResize(){this.height=Laya.stage.height}_initUI(){this.txtDesc.text=F.Instance.curAccountData.level.hint}_btnHandler(){this.btnClose.clickHandler=new Laya.Handler(this,this._closeClick)}_closeClick(){J.Instance.close(Q.Hint)}}new class{constructor(){window.Config3D&&(window.Config3D._default._defaultPhysicsMemory=64),window.Laya3D?Laya3D.init(et.width,et.height):Laya.init(et.width,et.height,Laya.WebGL),Laya.Physics&&Laya.Physics.enable(),Laya.DebugPanel&&Laya.DebugPanel.enable(),Laya.stage.scaleMode=et.scaleMode,Laya.stage.screenMode=et.screenMode,Laya.stage.alignV=et.alignV,Laya.stage.alignH=et.alignH,Laya.URL.exportSceneToJson=et.exportSceneToJson,(et.debug||"true"==Laya.Utils.getQueryString("debug"))&&Laya.enableDebugPanel(),et.physicsDebug&&Laya.PhysicsDebugDraw&&Laya.PhysicsDebugDraw.enable(),et.stat&&Laya.Stat.show(),Laya.alertGlobalError=!0,S.Init(),this._init(),this._regView(),console.log(`[LOG]版本:${k.Ver}`),Laya.ResourceVersion.enable("version.json",Laya.Handler.create(this,this._onVersionLoaded),Laya.ResourceVersion.FILENAME_VERSION)}_init(){Laya.MouseManager.multiTouchEnabled=!1,Laya.loader.retryNum=5,Laya.loader.retryDelay=100,Laya.loader.maxLoader=3,Laya.loader.on(Laya.Event.ERROR,null,e=>{console.log(e+"加载出错")})}_regView(){let e=new T;e.set(Q.Loading,at),e.set(Q.Main,_t),e.set(Q.Game,On),e.set(Q.Guide,Ti),e.set(Q.Result,Yn),e.set(Q.Setting,Wn),e.set(Q.Rank,Kn),e.set(Q.Sign,ii),e.set(Q.Shop,si),e.set(Q.Achievement,oi),e.set(Q.Skin,ci),e.set(Q.Lottery,wi),e.set(Q.Reward,bi),e.set(Q.OfflineIncome,Si),e.set(Q.IncomeBoost,Ci),e.set(Q.GunUpgrade,Di),e.set(Q.ExtraGuide,hi),e.set(Q.DiamondEffect,Bi),e.set(Q.Desc,Ni),e.set(Q.Conversation,Ri),e.set(Q.NewWeapon,Vi),e.set(Q.GetEnergy,Oi),e.set(Q.AirDrop,We),e.set(Q.NewReward,Yi),e.set(Q.ExtraUpgrade,ji),e.set(Q.TryOut,lt),e.set(Q.DailyGift,$i),e.set(Q.Hint,Ki),e.set(Q.FriendAssist,ve),Z.Reg(e)}_onVersionLoaded(){Laya.AtlasInfoManager.enable("fileconfig.json",Laya.Handler.create(this,this._onConfigLoaded))}_onConfigLoaded(){S.LoadSubPackage("atlas",Laya.Handler.create(this,e=>{J.Instance.open(Q.Loading)}))}}}();