1 |
- !function(){"use strict";class e{constructor(){}static hitTest(e,t){if(null==e||null==t)return!1;if(null==e.texture||null==t.texture)return!1;log("hittest1");let i=e.localToGlobal(Laya.Point.create());for(let s=0;s<e.width;s++)for(let a=0;a<e.height;a++){let n=e.texture.getPixels(s,a,1,1);if(n&&(log("hittest",n),"0000"!=n.join("")&&this.pointHitTest(t,i.x+s,i.y+a)))return!0}return!1}static pointHitTest(e,t,i){if(null==e)return!1;if(null==e.texture)return!1;log("pointHitTest");let s=e.localToGlobal(Laya.Point.create()),a=Math.floor(t-s.x),n=Math.floor(i-s.y),o=e.texture;if(a<0||a>=o.width||n<0||n>=o.height)return!1;let r=o.getPixels(a,n,1,1);return log("pointHitTestttt",r),!(!r||"0000"==r.join(""))}static dynamicChangePivot(e,t){if(e&&t&&2==t.length){var i=e.pivotX,s=e.pivotY,a=t[0]*e.width,n=t[1]*e.height;e.x+=a-i,e.y+=n-s,e.pivot(a,n)}}}class t extends Laya.Script{constructor(){super(...arguments),this.shakeCtr=!0}onMouseDown(){this._mouseDown=!0,Laya.Tween.to(this.owner,{scaleX:1.2,scaleY:1.2},200,Laya.Ease.backOut,null,null,!1)}onMouseUp(e){this._mouseDown=!1,Laya.Tween.to(this.owner,{scaleX:1,scaleY:1},200,Laya.Ease.elasticOut,null,null,!1)}onMouseOut(){this._mouseDown&&(this._mouseDown=!1,Laya.Tween.to(this.owner,{scaleX:1,scaleY:1},200,Laya.Ease.elasticOut,null,null,!1))}onAwake(){if(!this.owner||!this.anchorV||!this.anchorH)return;let t=this.owner;e.dynamicChangePivot(t,[this.anchorH,this.anchorV])}onEnable(){super.onEnable(),this.needShake&&(this.originScaleX=this.owner.scaleX,this.originScaleY=this.owner.scaleY,this.shakeTimer())}shakeTimer(){this.shakeTimeLine?(this.shakeTimeLine.destroy(),this.shakeTimeLine=null,this.shakeTimer()):(this.shakeTimeLine=new core.TweenTimeLine(1,Laya.Handler.create(this,this.shakeTimer)),this.shakeTimeLine.addToTween(this.owner,{scaleX:1.1*this.originScaleX,scaleY:.9*this.originScaleY},200,Laya.Ease.circInOut),this.shakeTimeLine.addToTween(this.owner,{scaleX:this.originScaleX,scaleY:this.originScaleY},200,Laya.Ease.circInOut),this.shakeTimeLine.addToTween(this.owner,{scaleX:1.1*this.originScaleX,scaleY:.9*this.originScaleY},200,Laya.Ease.circInOut),this.shakeTimeLine.addToTween(this.owner,{scaleX:this.originScaleX,scaleY:this.originScaleY},200,Laya.Ease.circInOut),this.shakeTimeLine.start(),this.shakeTimeLine.pause(),Laya.timer.once(1e3*Math.ceil(4*Math.random()),this,this.playShakeAni))}playShakeAni(){this.shakeCtr&&this.shakeTimeLine.resume()}onDisable(){this.shakeTimeLine&&this.shakeTimeLine.destroy(),this.shakeTimeLine=null,Laya.timer.clearAll(this),super.onDisable()}}var i,s=Laya.View,a=Laya.Scene,n=Laya.ClassUtils.regClass;!function(e){!function(e){class t extends s{constructor(){super()}createChildren(){super.createChildren(),this.createView(t.uiView)}}t.uiView={type:"View",props:{width:1920,top:0,right:0,left:0,height:1080,bottom:0},compId:2,child:[{type:"Image",props:{skin:"res/imgs/game/bg/bg.jpg",right:0,left:0,centerY:0},compId:200},{type:"Box",props:{width:1920,var:"gameBox",height:1080,centerY:0,centerX:0},compId:218,child:[{type:"Sprite",props:{y:306,x:380,texture:"res/imgs/game/bg/wpydd.png"},compId:201},{type:"Sprite",props:{y:779,x:1,texture:"res/imgs/game/bg/pd.png"},compId:202},{type:"Image",props:{y:1015,x:245.5,var:"pd_LigthImg",skin:"res/imgs/game/bg/pd_bright.png"},compId:235},{type:"Sprite",props:{y:787,x:140},compId:184,child:[{type:"Image",props:{y:73,x:1455,skin:"res/imgs/game/bg/pdjt.png"},compId:173},{type:"Image",props:{y:73,x:1120,skin:"res/imgs/game/bg/pdjt.png"},compId:178},{type:"Image",props:{y:73,x:785,skin:"res/imgs/game/bg/pdjt.png"},compId:179},{type:"Image",props:{y:73,x:450,skin:"res/imgs/game/bg/pdjt.png"},compId:180},{type:"Image",props:{y:73,x:116,skin:"res/imgs/game/bg/pdjt.png"},compId:181},{type:"Image",props:{y:73,x:-224,skin:"res/imgs/game/bg/pdjt.png"},compId:182},{type:"Image",props:{y:-21,x:-139,width:1920,skin:"res/imgs/game/new_back_black.png",renderType:"mask",height:252,alpha:1,sizeGrid:"5,5,5,5"},compId:228}]},{type:"Image",props:{y:858,x:226,width:435,var:"startPosImg",skin:"res/imgs/game/bg/hl_left.png",pivotY:297,pivotX:227,height:436},compId:75,child:[{type:"SkeletonPlayer",props:{y:202,x:140,var:"huaryUpAniL",url:"res/ani/board_glow.sk",scaleX:-1,runtime:"Laya.Skeleton"},compId:243},{type:"Image",props:{y:206,x:146,width:161,skin:"res/imgs/game/bg/hu_left.png",height:181,anchorY:.5,anchorX:.5},compId:236}]},{type:"Image",props:{y:564,x:1655,var:"stopPosImg",skin:"res/imgs/game/bg/hl_right.png"},compId:203,child:[{type:"SkeletonPlayer",props:{y:202,x:128,var:"huaryUpAniR",url:"res/ani/board_glow.sk",runtime:"Laya.Skeleton"},compId:242},{type:"Image",props:{y:204,x:125,width:161,skin:"res/imgs/game/bg/hu_right.png",height:181,anchorY:.5,anchorX:.5},compId:237}]},{type:"Image",props:{y:849,x:1694,width:455,var:"jumpBtn",scaleY:1,scaleX:1,height:455,anchorY:.5,anchorX:.5},compId:56},{type:"Image",props:{y:878,x:203,width:405,var:"runBtn",scaleY:1,scaleX:1,height:405,anchorY:.5,anchorX:.5},compId:53},{type:"Image",props:{y:82,x:782,var:"createBox",skin:"res/imgs/game/bg/bg_led.png"},compId:78,child:[{type:"Image",props:{y:185,x:49,var:"createPos1",skin:"res/imgs/game/bg/led_bright.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:94},{type:"Image",props:{y:185,x:133,var:"createPos2",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:95},{type:"Image",props:{y:186,x:217,var:"createPos3",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:96},{type:"Image",props:{y:186,x:301,var:"createPos4",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:97},{type:"Image",props:{y:114,x:49,var:"createPos5",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:86},{type:"Image",props:{y:114,x:133,var:"createPos6",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:87},{type:"Image",props:{y:115,x:217,var:"createPos7",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:88},{type:"Image",props:{y:115,x:301,var:"createPos8",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:89},{type:"Image",props:{y:43,x:49,var:"createPos9",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:74},{type:"Image",props:{y:43,x:133,var:"createPos10",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:79},{type:"Image",props:{y:43,x:217,var:"createPos11",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:80},{type:"Image",props:{y:42,x:301,var:"createPos12",skin:"res/imgs/game/bg/led_dark.png",pivotY:40,pivotX:50,anchorY:.5,anchorX:.5},compId:81},{type:"Image",props:{y:792,x:-346,width:50,var:"endPos1",name:"",height:50,anchorY:.5,anchorX:.5},compId:137},{type:"Image",props:{y:792,x:11,width:50,var:"endPos2",height:50,anchorY:.5,anchorX:.5},compId:143},{type:"Image",props:{y:782,x:351,width:50,var:"endPos3",name:"",height:50,anchorY:.5,anchorX:.5},compId:149},{type:"Image",props:{y:782,x:720,width:50,var:"endPos4",height:50,anchorY:.5,anchorX:.5},compId:155},{type:"Image",props:{y:468,x:-346,width:50,var:"endPos5",name:"",height:50,anchorY:.5,anchorX:.5},compId:139},{type:"Image",props:{y:468,x:11,width:50,var:"endPos6",height:50,anchorY:.5,anchorX:.5},compId:145},{type:"Image",props:{y:458,x:351,width:50,var:"endPos7",name:"",height:50,anchorY:.5,anchorX:.5},compId:151},{type:"Image",props:{y:459,x:720,width:50,var:"endPos8",height:50,anchorY:.5,anchorX:.5},compId:157},{type:"Image",props:{y:144,x:-346,width:50,var:"endPos9",name:"",height:50,anchorY:.5,anchorX:.5},compId:141},{type:"Image",props:{y:144,x:11,width:50,var:"endPos10",height:50,anchorY:.5,anchorX:.5},compId:147},{type:"Image",props:{y:134,x:351,width:50,var:"endPos11",name:"",height:50,anchorY:.5,anchorX:.5},compId:153},{type:"Image",props:{y:135,x:720,width:50,var:"endPos12",height:50,anchorY:.5,anchorX:.5},compId:159},{type:"Image",props:{y:227.5,x:46,width:50,var:"sdStartPos1",name:"",height:50,anchorY:.5,anchorX:.5},compId:246},{type:"Image",props:{y:915,x:-376,width:50,var:"sdEndPos1",name:"",height:50,anchorY:.5,anchorX:.5},compId:247},{type:"Image",props:{y:227,x:133,width:50,var:"sdStartPos2",name:"",height:50,anchorY:.5,anchorX:.5},compId:248},{type:"Image",props:{y:915,x:-11,width:50,var:"sdEndPos2",name:"",height:50,anchorY:.5,anchorX:.5},compId:249},{type:"Image",props:{y:227,x:217,width:50,var:"sdStartPos3",name:"",height:50,anchorY:.5,anchorX:.5},compId:250},{type:"Image",props:{y:915,x:364,width:50,var:"sdEndPos3",name:"",height:50,anchorY:.5,anchorX:.5},compId:251},{type:"Image",props:{y:227,x:302,width:50,var:"sdStartPos4",name:"",height:50,anchorY:.5,anchorX:.5},compId:252},{type:"Image",props:{y:915,x:738,width:50,var:"sdEndPos4",name:"",height:50,anchorY:.5,anchorX:.5},compId:253}]},{type:"Box",props:{width:1920,var:"playBox",height:1080,centerY:0,centerX:0},compId:136},{type:"Image",props:{y:507,x:957,width:389,visible:!1,var:"startBtn",skin:"res/imgs/game/icon_qp.png",scaleY:1,scaleX:1,height:389,anchorY:.5,anchorX:.5},compId:131,child:[{type:"Text",props:{y:136,x:105.5,text:"开始",fontSize:90,font:"Microsoft YaHei",color:"#ffffff",runtime:"Laya.Text"},compId:132}]},{type:"Image",props:{zOrder:200,y:500.5,x:1315,width:418,visible:!1,var:"scoreGrade",height:97},compId:216,child:[{type:"Image",props:{y:170,x:247,var:"gradeImg",skin:"res/imgs/game/great.png",scaleY:1,scaleX:1,centerY:0,centerX:0,anchorY:.5,anchorX:.5,alpha:0},compId:217}]}]},{type:"Image",props:{y:59,x:1785,var:"settingBtn",top:10,skin:"res/home/bg_dzts_2.png",right:0,name:"",label:"label",anchorY:.5,anchorX:.5},compId:268,child:[{type:"Sprite",props:{y:29,x:26,texture:"res/home/icon_fh.png"},compId:269},{type:"Text",props:{y:30,x:75,width:200,valign:"middle",text:"左踮脚 • 暂停",height:50,fontSize:28,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:270}]},{type:"Image",props:{y:77,x:50,var:"timeBg",skin:"res/imgs/game/djs.png",name:"",left:50},compId:209,child:[{type:"Text",props:{y:126,x:15,width:193,var:"timeTxt",valign:"middle",text:"01:23`56",italic:!0,height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:60}]},{type:"Image",props:{y:129,x:1446,var:"scoreBg",skin:"res/imgs/game/bg_fs.png",right:40,name:""},compId:211,child:[{type:"Text",props:{y:83,x:104,width:238,var:"scoreTxt",valign:"middle",text:"100",strokeColor:"#000000",height:57,fontSize:45,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"right",runtime:"Laya.Text"},compId:61},{type:"Text",props:{y:83,x:345,width:38,valign:"middle",text:"分",strokeColor:"#000000",height:57,fontSize:30,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"right",runtime:"Laya.Text"},compId:260},{type:"Sprite",props:{y:167,x:73,width:36,texture:"res/imgs/rank/icon_df.png",height:29},compId:112},{type:"Text",props:{y:169,x:116,width:49,valign:"middle",text:"最佳",height:39,fontSize:24,font:"Microsoft YaHei",color:"#ffd748",bold:!0,align:"right",runtime:"Laya.Text"},compId:113},{type:"Text",props:{y:163,x:181,width:161,var:"highScoreTxt",valign:"middle",text:"1000",height:50,fontSize:32,font:"Microsoft YaHei",color:"#ffd748",bold:!0,align:"right",runtime:"Laya.Text"},compId:62},{type:"Text",props:{y:160,x:336,width:38,valign:"middle",text:"分",strokeColor:"#000000",height:57,fontSize:24,font:"Microsoft YaHei",color:"#ffd748",bold:!0,align:"right",runtime:"Laya.Text"},compId:261},{type:"Text",props:{y:16,x:103,width:142,valign:"middle",text:"当前模式:",strokeColor:"#000000",height:57,fontSize:20,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"right",runtime:"Laya.Text"},compId:262},{type:"Text",props:{y:16,x:249,width:142,var:"gametypeTxt",valign:"middle",text:"简单",strokeColor:"#000000",height:57,fontSize:30,font:"Microsoft YaHei",color:"#f19149",bold:!0,align:"left",runtime:"Laya.Text"},compId:263}]},{type:"Image",props:{y:0,x:0,var:"startBg",top:0,skin:"res/imgs/game/new_back_black.png",right:0,left:0,bottom:0,alpha:.35,sizeGrid:"5,5,5,5"},compId:133},{type:"Image",props:{y:276,x:-1920,visible:!1,var:"startOrOverBg",skin:"res/imgs/game/bg_ksjs.png",centerY:-135},compId:215,child:[{type:"Image",props:{y:129,x:907,var:"startOrOverImg",skin:"res/imgs/game/text_go.png",centerY:0,centerX:0,anchorY:.5,anchorX:.5},compId:214}]}],animations:[{nodes:[{target:173,keyframes:{x:[{value:1784,tweenMethod:"linearNone",tween:!0,target:173,key:"x",index:0},{value:1455,tweenMethod:"linearNone",tween:!0,target:173,key:"x",index:30}]}},{target:178,keyframes:{x:[{value:1449,tweenMethod:"linearNone",tween:!0,target:178,key:"x",index:0},{value:1120,tweenMethod:"linearNone",tween:!0,target:178,key:"x",index:30}]}},{target:179,keyframes:{x:[{value:1115,tweenMethod:"linearNone",tween:!0,target:179,key:"x",index:0},{value:785,tweenMethod:"linearNone",tween:!0,target:179,key:"x",index:30}]}},{target:180,keyframes:{x:[{value:780,tweenMethod:"linearNone",tween:!0,target:180,key:"x",index:0},{value:450,tweenMethod:"linearNone",tween:!0,target:180,key:"x",index:30}]}},{target:181,keyframes:{x:[{value:445,tweenMethod:"linearNone",tween:!0,target:181,key:"x",index:0},{value:116,tweenMethod:"linearNone",tween:!0,target:181,key:"x",index:30}]}},{target:182,keyframes:{x:[{value:111,tweenMethod:"linearNone",tween:!0,target:182,key:"x",index:0},{value:-224,tweenMethod:"linearNone",tween:!0,target:182,key:"x",index:30}]}}],name:"runWayAni",id:1,frameRate:60,action:0},{nodes:[{target:215,keyframes:{centerX:[{value:-2e3,tweenMethod:"linearNone",tween:!0,target:215,key:"centerX",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:215,key:"centerX",index:20}]}}],name:"openAni",id:2,frameRate:60,action:0},{nodes:[{target:215,keyframes:{centerX:[{value:0,tweenMethod:"linearNone",tween:!0,target:215,key:"centerX",index:0},{value:2e3,tweenMethod:"linearNone",tween:!0,target:215,key:"centerX",index:20}]}}],name:"goAni",id:3,frameRate:60,action:0},{nodes:[{target:215,keyframes:{centerX:[{value:2e3,tweenMethod:"linearNone",tween:!0,target:215,key:"centerX",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:215,key:"centerX",index:20}]}}],name:"gameOverAni",id:4,frameRate:60,action:0},{nodes:[{target:217,keyframes:{scaleY:[{value:0,tweenMethod:"linearNone",tween:!0,target:217,key:"scaleY",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:217,key:"scaleY",index:25}],scaleX:[{value:0,tweenMethod:"linearNone",tween:!0,target:217,key:"scaleX",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:217,key:"scaleX",index:25}],alpha:[{value:1,tweenMethod:"linearNone",tween:!0,target:217,key:"alpha",index:0},{value:1,tweenMethod:"linearNone",tween:!0,target:217,key:"alpha",index:25},{value:1,tweenMethod:"linearNone",tween:!0,target:217,label:null,key:"alpha",index:50},{value:0,tweenMethod:"linearNone",tween:!0,target:217,key:"alpha",index:60}]}},{target:216,keyframes:{visible:[{value:!0,tweenMethod:"linearNone",tween:!1,target:216,key:"visible",index:0},{value:!1,tweenMethod:"linearNone",tween:!1,target:216,key:"visible",index:60}]}}],name:"gradeAni",id:5,frameRate:60,action:0},{nodes:[{target:214,keyframes:{scaleY:[{value:0,tweenMethod:"linearNone",tween:!0,target:214,key:"scaleY",index:0},{value:1.2,tweenMethod:"linearNone",tween:!0,target:214,key:"scaleY",index:20},{value:1,tweenMethod:"linearNone",tween:!0,target:214,key:"scaleY",index:25}],scaleX:[{value:0,tweenMethod:"linearNone",tween:!0,target:214,key:"scaleX",index:0},{value:1.2,tweenMethod:"linearNone",tween:!0,target:214,key:"scaleX",index:20},{value:1,tweenMethod:"linearNone",tween:!0,target:214,key:"scaleX",index:25}]}}],name:"countAni",id:6,frameRate:60,action:0}],loadList:["res/imgs/game/bg/bg.jpg","res/imgs/game/bg/wpydd.png","res/imgs/game/bg/pd.png","res/imgs/game/bg/pd_bright.png","res/imgs/game/bg/pdjt.png","res/imgs/game/new_back_black.png","res/imgs/game/bg/hl_left.png","res/ani/board_glow.sk","res/imgs/game/bg/hu_left.png","res/imgs/game/bg/hl_right.png","res/imgs/game/bg/hu_right.png","res/imgs/game/bg/bg_led.png","res/imgs/game/bg/led_bright.png","res/imgs/game/bg/led_dark.png","res/imgs/game/icon_qp.png","res/imgs/game/great.png","res/home/bg_dzts_2.png","res/home/icon_fh.png","res/imgs/game/djs.png","res/imgs/game/bg_fs.png","res/imgs/rank/icon_df.png","res/imgs/game/bg_ksjs.png","res/imgs/game/text_go.png"],loadList3D:[]},e.GameViewUI=t,n("game.ui.GameViewUI",t);class i extends s{constructor(){super()}createChildren(){super.createChildren(),this.createView(i.uiView)}}i.uiView={type:"View",props:{width:1920,top:0,right:0,left:0,height:1080,bottom:0},compId:2,child:[{type:"Image",props:{top:0,skin:"res/home/bj_sy.jpg",right:0,left:0,bottom:0},compId:21},{type:"Box",props:{width:1920,height:1080,centerY:0,centerX:0},compId:58,child:[{type:"Image",props:{y:220,x:0,skin:"res/home/logo.png"},compId:25},{type:"Image",props:{y:63,x:-1e3,skin:"res/home/juese.png",left:80},compId:167},{type:"Image",props:{y:896,skin:"res/home/msxz_1.png",centerX:0,alpha:1},compId:134,child:[{type:"Image",props:{skin:"res/home/msxz_2.png",centerY:0,centerX:0},compId:166}]},{type:"Image",props:{y:715,x:400,var:"level1",skin:"res/home/simple_1.png",scaleY:1.1,scaleX:1.1,anchorY:.5,anchorX:.5},compId:15,child:[{type:"Image",props:{y:76,x:87,text:"text",skin:"res/home/simple_2.png"},compId:27},{type:"Sprite",props:{y:170,x:76,texture:"res/home/simple_3.png"},compId:104},{type:"Sprite",props:{y:231,x:74,texture:"res/home/simple_4.png"},compId:39},{type:"Text",props:{y:192,x:131,width:46,text:"时间",strokeColor:"#fbfbfb",height:17,fontSize:22,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:102},{type:"Text",props:{y:253,x:131,width:76,text:"历史最高",strokeColor:"#fbfbfb",height:18,fontSize:22,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"left",runtime:"Laya.Text"},compId:103},{type:"Text",props:{y:186,x:263,width:183,var:"level1TimeTxt",text:"02:35:01",strokeColor:"#fbfbfb",italic:!0,height:31,fontSize:33,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"left",runtime:"Laya.Text"},compId:41},{type:"Text",props:{y:248,x:263,width:190,var:"level1ScoreTxt",text:"9999",strokeColor:"#fbfbfb",italic:!0,height:29,fontSize:33,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"left",runtime:"Laya.Text"},compId:42}]},{type:"Image",props:{y:715,var:"level2",skin:"res/home/normal_1.png",scaleY:1.1,scaleX:1.1,centerX:0,anchorY:.5,anchorX:.5},compId:106,child:[{type:"Image",props:{y:76,x:87,text:"text",skin:"res/home/normal_2.png"},compId:152},{type:"Sprite",props:{y:170,x:76,texture:"res/home/normal_3.png"},compId:153},{type:"Sprite",props:{y:231,x:74,texture:"res/home/normal_4.png"},compId:154},{type:"Text",props:{y:192,x:131,width:46,text:"时间",strokeColor:"#fbfbfb",height:17,fontSize:22,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:155},{type:"Text",props:{y:253,x:131,width:76,text:"历史最高",strokeColor:"#fbfbfb",height:18,fontSize:22,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"left",runtime:"Laya.Text"},compId:156},{type:"Text",props:{y:186,x:263,width:183,var:"level2TimeTxt",text:"02:35:01",strokeColor:"#fbfbfb",italic:!0,height:31,fontSize:33,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"left",runtime:"Laya.Text"},compId:157},{type:"Text",props:{y:248,x:263,width:190,var:"level2ScoreTxt",text:"9999",strokeColor:"#fbfbfb",italic:!0,height:29,fontSize:33,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"left",runtime:"Laya.Text"},compId:158}]},{type:"Image",props:{y:715,x:1520,var:"level3",skin:"res/home/difficulty_1.png",scaleY:1.1,scaleX:1.1,anchorY:.5,anchorX:.5},compId:118,child:[{type:"Image",props:{y:76,x:87,text:"text",skin:"res/home/difficulty_2.png"},compId:159},{type:"Sprite",props:{y:170,x:76,texture:"res/home/difficulty_3.png"},compId:160},{type:"Sprite",props:{y:231,x:74,texture:"res/home/difficulty_4.png"},compId:161},{type:"Text",props:{y:192,x:131,width:46,text:"时间",strokeColor:"#fbfbfb",height:17,fontSize:22,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:162},{type:"Text",props:{y:253,x:131,width:76,text:"历史最高",strokeColor:"#fbfbfb",height:18,fontSize:22,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"left",runtime:"Laya.Text"},compId:163},{type:"Text",props:{y:186,x:263,width:183,var:"level3TimeTxt",text:"02:35:01",strokeColor:"#fbfbfb",italic:!0,height:31,fontSize:33,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"left",runtime:"Laya.Text"},compId:164},{type:"Text",props:{y:248,x:263,width:190,var:"level3ScoreTxt",text:"9999",strokeColor:"#fbfbfb",italic:!0,height:29,fontSize:33,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"left",runtime:"Laya.Text"},compId:165}]}]},{type:"Image",props:{width:1920,skin:"res/imgs/game/new_back_black.png",right:0,left:0,height:65,bottom:0,anchorY:.5,anchorX:.5,sizeGrid:"5,5,5,5"},compId:60,child:[{type:"Box",props:{y:33,width:1560,scaleY:.8,scaleX:.8,height:60,centerX:0,anchorY:.5,anchorX:.5},compId:77,child:[{type:"Sprite",props:{x:0,texture:"res/imgs/game/icon_zc1.png"},compId:61,child:[{type:"Text",props:{y:10,x:47,width:211,valign:"middle",text:"左踏 • 上一项",height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:62}]},{type:"Sprite",props:{x:630,texture:"res/imgs/game/icon_yc1.png"},compId:63,child:[{type:"Text",props:{y:10,x:51,width:211,valign:"middle",text:"右踏 • 下一项",height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:64}]},{type:"Sprite",props:{y:0,x:1264,texture:"res/imgs/game/icon_right_yellow@3x1.png"},compId:65,child:[{type:"Text",props:{y:10,x:79,width:211,valign:"middle",text:"右踮脚 • 确定",height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:66}]}]}]},{type:"Image",props:{visible:!1,var:"exitBg",top:0,skin:"res/imgs/game/new_back_black.png",right:0,left:0,bottom:0,alpha:.5,sizeGrid:"5,5,5,5"},compId:93},{type:"Image",props:{y:493,x:960,width:507,visible:!1,var:"exitBtnBg",skin:"res/imgs/game/img_sz.png",scaleY:1.2,scaleX:1.2,height:456,centerY:-47,centerX:0,anchorY:.5,anchorX:.5},compId:78,child:[{type:"Image",props:{y:26,skin:"res/imgs/game/tittle_ts.png",centerX:0},compId:79},{type:"Text",props:{y:189,x:69.5,width:368,valign:"middle",text:"您确定要返回大厅界面?",height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:98},{type:"Image",props:{y:321,x:39,var:"noBtn",skin:"res/imgs/game/btn_tyxz.png"},compId:94,child:[{type:"Image",props:{var:"noTxtImg",text:"text",skin:"res/imgs/game/text_qx1.png",centerY:0,centerX:0},compId:95}]},{type:"Image",props:{y:321,x:269,var:"yesBtn",skin:"res/imgs/game/btn_tywxz.png"},compId:96,child:[{type:"Image",props:{var:"yesTxtImg",text:"text",skin:"res/imgs/game/text_qd2.png",centerY:0,centerX:0},compId:97}]}]},{type:"Box",props:{y:37,x:1920,width:553,right:0,height:107},compId:148,child:[{type:"Image",props:{y:47,x:52,var:"rankBtn",skin:"res/home/iocn_rank.png",name:"",label:"label",anchorY:.5,anchorX:.5},compId:38,child:[{type:"Sprite",props:{texture:"res/home/iocn_rank.png",renderType:"mask"},compId:56}]},{type:"Image",props:{y:48,x:194,var:"settingBtn",skin:"res/home/icon_setting.png",name:"",anchorY:.5,anchorX:.5},compId:20,child:[{type:"Sprite",props:{y:0,x:0,texture:"res/home/icon_setting.png",renderType:"mask"},compId:54}]},{type:"Image",props:{y:48,x:421,var:"homeBtn",skin:"res/home/bg_dzts_2.png",label:"label",anchorY:.5,anchorX:.5},compId:74,child:[{type:"Sprite",props:{y:29,x:26,texture:"res/home/icon_fh.png"},compId:149},{type:"Text",props:{y:30,x:75,width:200,valign:"middle",text:"左踮脚 • 退出",height:50,fontSize:28,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:150}]}]},{type:"Box",props:{y:82,x:-196,width:334,var:"selfIInfoBox",pivotY:49,pivotX:167,left:75,height:98},compId:147,child:[{type:"Image",props:{y:18,x:60,skin:"res/home/bg_name.png"},compId:146,child:[{type:"Text",props:{y:21.5,x:62,width:212,var:"nameTxt",valign:"middle",text:"昵称最多七个字",strokeColor:"#000000",height:51,fontSize:28,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:136}]},{type:"Image",props:{y:0,x:0,skin:"res/home/bg_txk.png"},compId:139,child:[{type:"Image",props:{width:120,var:"avatarImg",skin:"res/imgs/rank/biaoqing3.png",height:120,centerY:0,centerX:0},compId:135,child:[{type:"Image",props:{y:0,x:0,width:120,skin:"res/home/bg_txk.png",renderType:"mask",height:120,centerY:0,centerX:-1},compId:145}]}]}]}],animations:[{nodes:[{target:25,keyframes:{y:[{value:-437,tweenMethod:"linearNone",tween:!0,target:25,key:"y",index:0},{value:220,tweenMethod:"linearNone",tween:!0,target:25,key:"y",index:20},{value:200,tweenMethod:"linearNone",tween:!0,target:25,key:"y",index:25},{value:220,tweenMethod:"linearNone",tween:!0,target:25,key:"y",index:30}]}},{target:15,keyframes:{x:[{value:-350,tweenMethod:"linearNone",tween:!0,target:15,key:"x",index:0},{value:-239,tweenMethod:"linearNone",tween:!0,target:15,key:"x",index:5},{value:400,tweenMethod:"linearNone",tween:!0,target:15,key:"x",index:20},{value:390,tweenMethod:"linearNone",tween:!0,target:15,key:"x",index:25},{value:400,tweenMethod:"linearNone",tween:!0,target:15,key:"x",index:30}]}},{target:118,keyframes:{x:[{value:2146,tweenMethod:"linearNone",tween:!0,target:118,key:"x",index:0},{value:2146,tweenMethod:"linearNone",tween:!0,target:118,label:null,key:"x",index:5},{value:1520,tweenMethod:"linearNone",tween:!0,target:118,key:"x",index:20},{value:1530,tweenMethod:"linearNone",tween:!0,target:118,key:"x",index:25},{value:1520,tweenMethod:"linearNone",tween:!0,target:118,key:"x",index:30}]}},{target:106,keyframes:{y:[{value:1210,tweenMethod:"linearNone",tween:!0,target:106,key:"y",index:0},{value:695,tweenMethod:"linearNone",tween:!0,target:106,key:"y",index:20},{value:725,tweenMethod:"linearNone",tween:!0,target:106,key:"y",index:25},{value:715,tweenMethod:"linearNone",tween:!0,target:106,key:"y",index:30}]}},{target:134,keyframes:{alpha:[{value:0,tweenMethod:"linearNone",tween:!0,target:134,key:"alpha",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:134,key:"alpha",index:20},{value:1,tweenMethod:"linearNone",tween:!0,target:134,key:"alpha",index:40}]}},{target:147,keyframes:{left:[{value:-363,tweenMethod:"linearNone",tween:!0,target:147,key:"left",index:0},{value:75,tweenMethod:"linearNone",tween:!0,target:147,key:"left",index:40}]}},{target:148,keyframes:{right:[{value:-553,tweenMethod:"linearNone",tween:!1,target:148,key:"right",index:0},{value:-553,tweenMethod:"linearNone",tween:!0,target:148,key:"right",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:148,key:"right",index:40}]}},{target:60,keyframes:{bottom:[{value:-80,tweenMethod:"linearNone",tween:!1,target:60,key:"bottom",index:0},{value:-80,tweenMethod:"linearNone",tween:!0,target:60,key:"bottom",index:20},{value:0,tweenMethod:"linearNone",tween:!0,target:60,key:"bottom",index:40}]}},{target:61,keyframes:{x:[{value:0,tweenMethod:"linearNone",tween:!0,target:61,key:"x",index:0}]}},{target:77,keyframes:{width:[{value:1560,tweenMethod:"linearNone",tween:!0,target:77,key:"width",index:0}]}},{target:65,keyframes:{x:[{value:1264,tweenMethod:"linearNone",tween:!0,target:65,key:"x",index:0}]}},{target:63,keyframes:{x:[{value:630,tweenMethod:"linearNone",tween:!0,target:63,key:"x",index:0}]}},{target:167,keyframes:{left:[{value:-1e3,tweenMethod:"linearNone",tween:!0,target:167,key:"left",index:0},{value:80,tweenMethod:"linearNone",tween:!0,target:167,key:"left",index:30}]}}],name:"openAni",id:1,frameRate:60,action:0}],loadList:["res/home/bj_sy.jpg","res/home/logo.png","res/home/juese.png","res/home/msxz_1.png","res/home/msxz_2.png","res/home/simple_1.png","res/home/simple_2.png","res/home/simple_3.png","res/home/simple_4.png","res/home/normal_1.png","res/home/normal_2.png","res/home/normal_3.png","res/home/normal_4.png","res/home/difficulty_1.png","res/home/difficulty_2.png","res/home/difficulty_3.png","res/home/difficulty_4.png","res/imgs/game/new_back_black.png","res/imgs/game/icon_zc1.png","res/imgs/game/icon_yc1.png","res/imgs/game/icon_right_yellow@3x1.png","res/imgs/game/img_sz.png","res/imgs/game/tittle_ts.png","res/imgs/game/btn_tyxz.png","res/imgs/game/text_qx1.png","res/imgs/game/btn_tywxz.png","res/imgs/game/text_qd2.png","res/home/iocn_rank.png","res/home/icon_setting.png","res/home/bg_dzts_2.png","res/home/icon_fh.png","res/home/bg_name.png","res/home/bg_txk.png","res/imgs/rank/biaoqing3.png"],loadList3D:[]},e.HomeViewUI=i,n("game.ui.HomeViewUI",i);class a extends s{constructor(){super()}createChildren(){super.createChildren(),this.createView(a.uiView)}}a.uiView={type:"View",props:{width:1920,top:0,right:0,left:0,height:1080,bottom:0},compId:2,child:[{type:"Image",props:{top:0,skin:"res/imgs/result/bj_mh.jpg",right:0,left:0,bottom:0},compId:197},{type:"Image",props:{top:0,skin:"res/imgs/game/new_back_black.png",right:0,left:0,bottom:0,alpha:.5,sizeGrid:"5,5,5,5"},compId:196},{type:"Image",props:{y:278,var:"continueBtn",skin:"res/imgs/game/btom_bright.png",centerX:0,anchorY:.5,anchorX:.5},compId:131,child:[{type:"Image",props:{var:"continueImg",text:"text",skin:"res/imgs/game/text_jxb.png",centerY:0,centerX:0},compId:198},{type:"Script",props:{runtime:"game/script/ButtonScript.ts"},compId:217}]},{type:"Image",props:{y:530,var:"resetBtn",skin:"res/imgs/game/btom_dark.png",scaleY:1,scaleX:1,centerX:0,anchorY:.5,anchorX:.5},compId:192,child:[{type:"Image",props:{y:0,x:0,var:"resetImg",text:"text",skin:"res/imgs/game/text_ckd.png",centerY:0,centerX:0},compId:199},{type:"Script",props:{runtime:"game/script/ButtonScript.ts"},compId:218}]},{type:"Image",props:{y:781,var:"exitBtn",skin:"res/imgs/game/btom_dark.png",scaleY:1,scaleX:1,centerX:0,anchorY:.5,anchorX:.5},compId:194,child:[{type:"Image",props:{y:0,x:0,var:"exitImg",text:"text",skin:"res/imgs/game/text_tcd.png",centerY:0,centerX:0},compId:200},{type:"Script",props:{runtime:"game/script/ButtonScript.ts"},compId:219}]},{type:"Image",props:{y:0,x:0,width:1920,skin:"res/imgs/game/new_back_black.png",right:0,left:0,height:65,bottom:0,anchorY:.5,anchorX:.5,sizeGrid:"5,5,5,5"},compId:209,child:[{type:"Box",props:{y:33,width:1560,scaleY:.8,scaleX:.8,height:60,centerX:0,anchorY:.5,anchorX:.5},compId:210,child:[{type:"Sprite",props:{x:0,texture:"res/imgs/game/icon_zc1.png"},compId:211,child:[{type:"Text",props:{y:10,x:47,width:211,valign:"middle",text:"左踏 • 上一项",height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:212}]},{type:"Sprite",props:{x:630,texture:"res/imgs/game/icon_yc1.png"},compId:213,child:[{type:"Text",props:{y:10,x:51,width:211,valign:"middle",text:"右踏 • 下一项",height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:214}]},{type:"Sprite",props:{y:0,x:1264,texture:"res/imgs/game/icon_right_yellow@3x1.png"},compId:215,child:[{type:"Text",props:{y:10,x:79,width:211,valign:"middle",text:"右踮脚 • 确定",height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:216}]}]}]}],animations:[{nodes:[{target:173,keyframes:{x:[{value:1762,tweenMethod:"linearNone",tween:!0,target:173,key:"x",index:0},{value:1583,tweenMethod:"linearNone",tween:!0,target:173,key:"x",index:30}]}},{target:175,keyframes:{x:[{value:1581,tweenMethod:"linearNone",tween:!0,target:175,key:"x",index:0},{value:1402,tweenMethod:"linearNone",tween:!0,target:175,key:"x",index:30}]}},{target:178,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:178,key:"y",index:0},{value:2,tweenMethod:"linearNone",tween:!0,target:178,key:"y",index:30}],x:[{value:1400,tweenMethod:"linearNone",tween:!0,target:178,key:"x",index:0},{value:1221,tweenMethod:"linearNone",tween:!0,target:178,key:"x",index:30}]}},{target:177,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:177,key:"y",index:0},{value:2,tweenMethod:"linearNone",tween:!0,target:177,key:"y",index:30}],x:[{value:1219,tweenMethod:"linearNone",tween:!0,target:177,key:"x",index:0},{value:1040,tweenMethod:"linearNone",tween:!0,target:177,key:"x",index:30}]}},{target:179,keyframes:{x:[{value:1038,tweenMethod:"linearNone",tween:!0,target:179,key:"x",index:0},{value:859,tweenMethod:"linearNone",tween:!0,target:179,key:"x",index:30}]}},{target:180,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:180,key:"y",index:0},{value:2,tweenMethod:"linearNone",tween:!0,target:180,key:"y",index:30}],x:[{value:857,tweenMethod:"linearNone",tween:!0,target:180,key:"x",index:0},{value:678,tweenMethod:"linearNone",tween:!0,target:180,key:"x",index:30}]}},{target:181,keyframes:{x:[{value:676,tweenMethod:"linearNone",tween:!0,target:181,key:"x",index:0},{value:495,tweenMethod:"linearNone",tween:!0,target:181,key:"x",index:30}]}},{target:182,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:182,key:"y",index:0},{value:2,tweenMethod:"linearNone",tween:!0,target:182,key:"y",index:30}],x:[{value:495,tweenMethod:"linearNone",tween:!0,target:182,key:"x",index:0},{value:316,tweenMethod:"linearNone",tween:!0,target:182,key:"x",index:30}]}},{target:183,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:183,key:"y",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:183,key:"y",index:19},{value:3.1999999999999886,tweenMethod:"linearNone",tween:!0,target:183,key:"y",index:20},{value:2,tweenMethod:"linearNone",tween:!0,target:183,key:"y",index:30}],x:[{value:314,tweenMethod:"linearNone",tween:!0,target:183,key:"x",index:0},{value:204,tweenMethod:"linearNone",tween:!0,target:183,key:"x",index:19},{value:1822,tweenMethod:"linearNone",tween:!0,target:183,key:"x",index:20},{value:1762,tweenMethod:"linearNone",tween:!0,target:183,key:"x",index:30}]}}],name:"runWayAni",id:1,frameRate:60,action:0}],loadList:["res/imgs/result/bj_mh.jpg","res/imgs/game/new_back_black.png","res/imgs/game/btom_bright.png","res/imgs/game/text_jxb.png","res/imgs/game/btom_dark.png","res/imgs/game/text_ckd.png","res/imgs/game/text_tcd.png","res/imgs/game/icon_zc1.png","res/imgs/game/icon_yc1.png","res/imgs/game/icon_right_yellow@3x1.png"],loadList3D:[]},e.PauseViewUI=a,n("game.ui.PauseViewUI",a);class o extends s{constructor(){super()}createChildren(){super.createChildren(),this.createView(o.uiView)}}o.uiView={type:"View",props:{width:1545,height:200},compId:2,child:[{type:"Image",props:{y:29,x:0,skin:"res/imgs/rank/bg_ph.png"},compId:3},{type:"Image",props:{y:-9,x:67,var:"winImg",skin:"res/imgs/rank/icon_diyi.png"},compId:4},{type:"FontClip",props:{y:71,x:67,width:155,visible:!1,var:"rankTxt",value:"1",skin:"res/imgs/rank/num_ph.png",sheet:"0123456789",height:51,align:"center"},compId:24},{type:"Image",props:{y:42,x:274,width:115,var:"avatarImg",skin:"res/imgs/rank/biaoqing3.png",height:115},compId:19,child:[{type:"Image",props:{y:0,x:0,width:115,skin:"res/imgs/rank/biaoqing3.png",renderType:"mask",height:115},compId:20}]},{type:"Text",props:{y:71,x:435,width:289,var:"nameTxt",valign:"middle",text:"婷子",strokeColor:"#000000",height:57,fontSize:40,font:"Microsoft YaHei",color:"#000000",bold:!0,align:"center",runtime:"Laya.Text"},compId:21},{type:"Image",props:{y:68,x:1001,skin:"res/imgs/rank/icon_df.png"},compId:22},{type:"Text",props:{y:71,x:1099,width:326,var:"scoreTxt",valign:"middle",text:"0",strokeColor:"#000000",italic:!0,height:65,fontSize:70,font:"Microsoft YaHei",color:"#ff9005",bold:!0,align:"right",runtime:"Laya.Text"},compId:23},{type:"Text",props:{y:73,x:1434,width:57,var:"scoreTxt1",valign:"middle",text:"分",strokeColor:"#000000",italic:!0,height:65,fontSize:50,font:"Microsoft YaHei",color:"#ff9005",bold:!0,align:"right",runtime:"Laya.Text"},compId:27}],loadList:["res/imgs/rank/bg_ph.png","res/imgs/rank/icon_diyi.png","res/imgs/rank/num_ph.png","res/imgs/rank/biaoqing3.png","res/imgs/rank/icon_df.png"],loadList3D:[]},e.RankItemUI=o,n("game.ui.RankItemUI",o);class r extends s{constructor(){super()}createChildren(){super.createChildren(),this.createView(r.uiView)}}r.uiView={type:"View",props:{width:1920,top:0,right:0,left:0,height:1080,bottom:0},compId:2,child:[{type:"Image",props:{top:0,skin:"res/imgs/result/bj_mh.jpg",right:0,left:0,bottom:0},compId:3},{type:"Image",props:{top:75,skin:"res/imgs/rank/bg_phbsl.png",left:0,bottom:0},compId:4},{type:"Image",props:{top:0,skin:"res/imgs/rank/bg_phbhl.png",right:0,left:0},compId:6},{type:"Image",props:{x:141,top:18,skin:"res/imgs/rank/icon_phb.png"},compId:8},{type:"Image",props:{x:203,top:18,skin:"res/imgs/rank/tittle_phb.png"},compId:9},{type:"Image",props:{var:"closeBtn",top:5,skin:"res/imgs/rank/btn_back.png",right:80,label:"label"},compId:7},{type:"Image",props:{y:75,x:0,width:267,var:"friendBtn",label:"label",height:152},compId:11,child:[{type:"Image",props:{var:"friendBg",skin:"res/imgs/rank/btn_phbxz.png",label:"label",centerY:0,centerX:0},compId:17},{type:"Image",props:{text:"text",skin:"res/imgs/rank/text_hyb.png",centerY:0,centerX:0},compId:10},{type:"Sprite",props:{y:151,x:-1,width:268,texture:"res/imgs/rank/phbfgx.png"},compId:13}]},{type:"Image",props:{y:229,x:0,width:267,var:"wordBtn",label:"label",height:152},compId:18,child:[{type:"Sprite",props:{y:-3,x:-1,width:268,texture:"res/imgs/rank/phbfgx.png"},compId:56},{type:"Image",props:{var:"wordBg",skin:"res/imgs/rank/btn_phbxz.png",label:"label",centerY:0,centerX:0},compId:19},{type:"Image",props:{text:"text",skin:"res/imgs/rank/btn_sjb.png",centerY:0,centerX:0},compId:20},{type:"Sprite",props:{y:151,x:-1,width:268,texture:"res/imgs/rank/phbfgx.png"},compId:21}]},{type:"Image",props:{top:75,right:0,left:263,bottom:160},compId:57,child:[{type:"List",props:{y:0,width:1617,visible:!1,var:"rankList",repeatY:4,height:800,centerX:0},compId:33,child:[{type:"RankItem",props:{y:27,x:56,runtime:"game/view/common/RankItem.ts",renderType:"render"},compId:34}]}]},{type:"Image",props:{var:"selfBg",skin:"res/imgs/rank/bg_wdph.png",right:0,left:264,bottom:0},compId:32,child:[{type:"Box",props:{y:69,width:1648,height:150,centerX:0},compId:58,child:[{type:"Image",props:{width:109,var:"winImg",skin:"res/imgs/rank/icon_diyi.png",height:124},compId:35},{type:"Image",props:{y:46,x:148,text:"text",skin:"res/imgs/rank/text_wdph.png"},compId:41},{type:"Image",props:{y:92,x:116,var:"loseImg",text:"text",skin:"res/imgs/rank/text_wsb.png"},compId:42},{type:"FontClip",props:{y:93,x:178,var:"rankTxt",value:"1",skin:"res/imgs/rank/num_ph.png",sheet:"0123456789"},compId:44},{type:"Image",props:{y:35,x:340,width:115,var:"avatarImg",skin:"res/imgs/rank/biaoqing3.png",height:115},compId:36,child:[{type:"Image",props:{y:0,x:0,width:115,skin:"res/imgs/rank/biaoqing3.png",renderType:"mask",height:115},compId:40}]},{type:"Text",props:{y:64,x:501,width:289,var:"nameTxt",valign:"middle",text:"婷子",strokeColor:"#000000",height:57,fontSize:40,font:"Microsoft YaHei",color:"#000000",bold:!0,align:"center",runtime:"Laya.Text"},compId:37},{type:"Image",props:{y:61,x:1069,skin:"res/imgs/rank/icon_df.png"},compId:38},{type:"Text",props:{y:64,x:1159,width:340,var:"scoreTxt",valign:"middle",text:"0",strokeColor:"#000000",italic:!0,height:65,fontSize:70,font:"Microsoft YaHei",color:"#000000",bold:!0,align:"right",runtime:"Laya.Text"},compId:39},{type:"Text",props:{y:68,x:1496,width:57,var:"scoreTxt1",valign:"middle",text:"分",strokeColor:"#000000",italic:!0,height:65,fontSize:50,font:"Microsoft YaHei",color:"#050200",bold:!0,align:"right",runtime:"Laya.Text"},compId:59}]}]}],animations:[{nodes:[{target:33,keyframes:{y:[{value:1085,tweenMethod:"linearNone",tween:!0,target:33,key:"y",index:0},{value:27,tweenMethod:"linearNone",tween:!0,target:33,key:"y",index:30}]}}],name:"openAni",id:1,frameRate:60,action:0}],loadList:["res/imgs/result/bj_mh.jpg","res/imgs/rank/bg_phbsl.png","res/imgs/rank/bg_phbhl.png","res/imgs/rank/icon_phb.png","res/imgs/rank/tittle_phb.png","res/imgs/rank/btn_back.png","res/imgs/rank/btn_phbxz.png","res/imgs/rank/text_hyb.png","res/imgs/rank/phbfgx.png","res/imgs/rank/btn_sjb.png","res/imgs/rank/bg_wdph.png","res/imgs/rank/icon_diyi.png","res/imgs/rank/text_wdph.png","res/imgs/rank/text_wsb.png","res/imgs/rank/num_ph.png","res/imgs/rank/biaoqing3.png","res/imgs/rank/icon_df.png"],loadList3D:[]},e.RankViewUI=r,n("game.ui.RankViewUI",r);class h extends s{constructor(){super()}createChildren(){super.createChildren(),this.createView(h.uiView)}}h.uiView={type:"View",props:{width:1920,top:0,right:0,left:0,height:1080,bottom:0},compId:2,child:[{type:"Image",props:{top:0,skin:"res/imgs/game/new_back_black.png",right:0,left:0,bottom:0,alpha:.9,sizeGrid:"5,5,5,5"},compId:198},{type:"Box",props:{width:1920,height:1080,centerX:0},compId:207,child:[{type:"Image",props:{y:844,var:"homeBtn",skin:"res/imgs/result/btom_bright.png",centerX:-253,anchorY:.5,anchorX:.5},compId:215,child:[{type:"Image",props:{var:"homeImg",text:"text",skin:"res/imgs/result/text_an_fhb.png",centerY:0,centerX:0},compId:217},{type:"Script",props:{runtime:"game/script/ButtonScript.ts"},compId:289}]},{type:"Image",props:{y:844,var:"resetBtn",skin:"res/imgs/result/btom_dark.png",scaleY:1,scaleX:1,centerX:260,anchorY:.5,anchorX:.5},compId:216,child:[{type:"Image",props:{y:0,x:0,var:"resetImg",text:"text",skin:"res/imgs/result/text_an_zld.png",centerY:0,centerX:0},compId:218},{type:"Script",props:{runtime:"game/script/ButtonScript.ts"},compId:290}]},{type:"Image",props:{y:118,x:470,skin:"res/imgs/result/tittle_js_bjdf.png",anchorY:.5,anchorX:.5},compId:264},{type:"Sprite",props:{y:156,x:113.5,texture:"res/imgs/result/bg_js_bjdf.png"},compId:265},{type:"Text",props:{y:229,x:87,width:191,valign:"middle",text:"您本局消耗",height:44,fontSize:38,font:"Microsoft YaHei",color:"#ffffff",align:"left",runtime:"Laya.Text"},compId:227,child:[{type:"Text",props:{y:-2,x:230,width:398,var:"caloriesTxt",valign:"middle",text:"999.99",italic:!0,height:49,fontSize:60,font:"Microsoft YaHei",color:"#ffd748",align:"right",runtime:"Laya.Text"},compId:229},{type:"Text",props:{y:5,x:663,width:73,valign:"middle",text:"大卡",height:39,fontSize:36,font:"Microsoft YaHei",color:"#ffffff",align:"left",runtime:"Laya.Text"},compId:275}]},{type:"Text",props:{y:312,x:88,width:190,valign:"middle",text:"相当于步行",height:42,fontSize:38,font:"Microsoft YaHei",color:"#ffffff",align:"left",runtime:"Laya.Text"},compId:230,child:[{type:"Text",props:{y:-6,x:230,width:398,var:"stepTxt",valign:"middle",text:"99999",italic:!0,height:49,fontSize:60,font:"Microsoft YaHei",color:"#ffd748",align:"right",runtime:"Laya.Text"},compId:231},{type:"Text",props:{y:-1,x:699,width:36,valign:"middle",text:"步",height:39,fontSize:36,font:"Microsoft YaHei",color:"#ffffff",align:"left",runtime:"Laya.Text"},compId:277}]},{type:"Sprite",props:{y:383,x:221.5,texture:"res/imgs/result/bg_js_sjbdfgx.png"},compId:266},{type:"Text",props:{y:419,x:200,width:76,valign:"middle",text:"得分",height:39,fontSize:38,font:"Microsoft YaHei",color:"#ffffff",align:"left",runtime:"Laya.Text"},compId:232,child:[{type:"Text",props:{y:2,x:116,width:144,valign:"middle",text:"金币积分",height:28,fontSize:36,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"Laya.Text"},compId:268,child:[{type:"Text",props:{y:-3,x:176,width:271,var:"addScoreTxt",valign:"middle",text:"+10000",italic:!0,height:35,fontSize:45,font:"Microsoft YaHei",color:"#00ffff",align:"right",runtime:"Laya.Text"},compId:269},{type:"Text",props:{y:1,x:464,width:38,valign:"middle",text:"分",italic:!0,height:29,fontSize:36,font:"Microsoft YaHei",color:"#00ffff",align:"center",runtime:"Laya.Text"},compId:270}]},{type:"Text",props:{y:58,x:116,width:144,valign:"middle",text:"炸弹扣分",height:29,fontSize:36,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"Laya.Text"},compId:272,child:[{type:"Text",props:{y:-3,x:179,width:269,var:"subScoreTxt",valign:"middle",text:"-10000",italic:!0,height:29,fontSize:45,font:"Microsoft YaHei",color:"#ff156d",align:"right",runtime:"Laya.Text"},compId:235},{type:"Text",props:{y:0,x:465,width:37,valign:"middle",text:"分",rotation:0,name:"",italic:!0,height:29,fontSize:36,font:"Microsoft YaHei",color:"#ff156d",align:"center",runtime:"Laya.Text"},compId:271}]}]},{type:"Text",props:{y:555,x:198,width:78,valign:"middle",text:"总分",name:"",height:39,fontSize:38,font:"Microsoft YaHei",color:"#ffffff",align:"left",runtime:"Laya.Text"},compId:274,child:[{type:"Text",props:{y:-1,x:306,width:259,var:"scoreTxt",valign:"middle",text:"99999",name:"",italic:!0,height:39,fontSize:50,font:"Microsoft YaHei",color:"#ffd905",align:"right",runtime:"Laya.Text"},compId:233},{type:"Text",props:{y:6,x:583,width:36,valign:"middle",text:"分",rotation:0,name:"",italic:!0,height:29,fontSize:36,font:"Microsoft YaHei",color:"#ffd905",align:"center",runtime:"Laya.Text"},compId:273}]},{type:"Text",props:{y:628,x:198,width:76,valign:"middle",text:"用时",name:"",height:39,fontSize:38,font:"Microsoft YaHei",color:"#ffffff",align:"left",runtime:"Laya.Text"},compId:285,child:[{type:"Text",props:{y:4,x:314,width:301,var:"timeTxt",valign:"middle",text:"00:00",name:"",italic:!0,height:31,fontSize:45,font:"Microsoft YaHei",color:"#ffd905",align:"right",runtime:"Laya.Text"},compId:286}]},{type:"Sprite",props:{y:156,x:908,var:"rankBg",texture:"res/imgs/result/bg_js_sjbd.png"},compId:236,child:[{type:"Image",props:{y:-34,x:484,skin:"res/imgs/result/tittle_js_sjbd.png",anchorY:.5,anchorX:.5},compId:237},{type:"Box",props:{y:64,x:96,visible:!1,var:"rank1"},compId:248,child:[{type:"Image",props:{x:-42,visible:!1,var:"pmImg1",skin:"res/imgs/result/icon_pmxj.png",centerY:0},compId:247},{type:"Image",props:{x:-7.5,visible:!1,var:"noRank1",text:"text",skin:"res/imgs/result/text_pm_wsb.png",centerY:0},compId:281},{type:"FontClip",props:{x:46,width:75,var:"pmFontClip1",value:"2",skin:"res/imgs/result/text_pm_num2.png",sheet:"0123456789",height:40,centerY:0,anchorY:.5,anchorX:.5,align:"center"},compId:245},{type:"Image",props:{x:129,width:100,var:"avatarImg1",skin:"res/imgs/rank/biaoqing3.png",height:100},compId:241,child:[{type:"Image",props:{y:0,x:0,width:100,skin:"res/home/001.png",renderType:"mask",height:100,centerY:0,centerX:-1},compId:242}]},{type:"Text",props:{y:24.5,x:250,width:271,var:"nameTxt1",valign:"middle",text:"婷子",strokeColor:"#000000",height:51,fontSize:35,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"Laya.Text"},compId:240},{type:"Text",props:{y:30.5,x:543,width:305,var:"rankScore1",valign:"middle",text:"10000分",italic:!0,height:39,fontSize:42,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:244}]},{type:"Sprite",props:{y:194,x:240,texture:"res/imgs/result/bg_js_sjbdfgx.png"},compId:243},{type:"Box",props:{y:232.5,x:96,visible:!1,var:"rank2"},compId:249,child:[{type:"Image",props:{x:-42,visible:!1,var:"pmImg2",skin:"res/imgs/result/icon_pmss.png",centerY:0},compId:251},{type:"Image",props:{x:-7.5,visible:!1,var:"noRank2",text:"text",skin:"res/imgs/result/text_pm_wsb.png",centerY:0},compId:280},{type:"FontClip",props:{x:46,width:75,var:"pmFontClip2",value:"2",skin:"res/imgs/result/text_pm_num2.png",sheet:"0123456789",height:40,centerY:0,anchorY:.5,anchorX:.5,align:"center"},compId:252},{type:"Image",props:{x:129,width:100,var:"avatarImg2",skin:"res/imgs/rank/biaoqing3.png",height:100},compId:253,child:[{type:"Image",props:{y:0,x:0,width:100,skin:"res/home/001.png",renderType:"mask",height:100,centerY:0,centerX:-1},compId:254}]},{type:"Text",props:{y:24.5,x:250,width:271,var:"nameTxt2",valign:"middle",text:"婷子",strokeColor:"#000000",height:51,fontSize:35,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"Laya.Text"},compId:255},{type:"Text",props:{y:30.5,x:544,width:305,var:"rankScore2",valign:"middle",text:"10000分",italic:!0,height:39,fontSize:42,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:256}]},{type:"Sprite",props:{y:370,x:240,texture:"res/imgs/result/bg_js_sjbdfgx.png"},compId:250},{type:"Box",props:{y:405,x:96,visible:!1,var:"rank3"},compId:257,child:[{type:"Image",props:{x:-42,visible:!1,var:"pmImg3",skin:"res/imgs/result/icon_pmwsb.png",centerY:0},compId:258},{type:"Image",props:{x:-7.5,visible:!1,var:"noRank3",text:"text",skin:"res/imgs/result/text_pm_wsb.png",centerY:0},compId:279},{type:"FontClip",props:{y:37,x:46,width:75,var:"pmFontClip3",value:"3",skin:"res/imgs/result/text_pm_num2.png",sheet:"0123456789",height:40,centerY:0,anchorY:.5,anchorX:.5,align:"center"},compId:259},{type:"Image",props:{x:129,width:100,var:"avatarImg3",skin:"res/imgs/rank/biaoqing3.png",height:100},compId:260,child:[{type:"Image",props:{y:0,x:0,width:100,skin:"res/home/001.png",renderType:"mask",height:100,centerY:0,centerX:-1},compId:261}]},{type:"Text",props:{y:24.5,x:250,width:271,var:"nameTxt3",valign:"middle",text:"nikeName",strokeColor:"#000000",height:51,fontSize:35,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"Laya.Text"},compId:262},{type:"Text",props:{y:30.5,x:544,width:305,var:"rankScore3",valign:"middle",text:"0分",italic:!0,height:39,fontSize:42,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:263}]}]},{type:"Image",props:{y:1048,right:0,left:0,height:65,bottom:0,anchorY:.5,anchorX:.5},compId:219,child:[{type:"Box",props:{y:33,x:0,width:1560,scaleY:.8,scaleX:.8,height:60,centerX:0,anchorY:.5,anchorX:.5},compId:220,child:[{type:"Sprite",props:{x:0,texture:"res/imgs/game/icon_zc1.png"},compId:221,child:[{type:"Text",props:{y:10,x:47,width:211,valign:"middle",text:"左踏 • 上一项",height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:222}]},{type:"Sprite",props:{x:630,texture:"res/imgs/game/icon_yc1.png"},compId:223,child:[{type:"Text",props:{y:10,x:51,width:211,valign:"middle",text:"右踏 • 下一项",height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:224}]},{type:"Sprite",props:{y:0,x:1264,texture:"res/imgs/game/icon_right_yellow@3x1.png"},compId:225,child:[{type:"Text",props:{y:10,x:79,width:211,valign:"middle",text:"右踮脚 • 确定",height:50,fontSize:34,font:"Microsoft YaHei",color:"#ffffff",bold:!0,align:"center",runtime:"Laya.Text"},compId:226}]}]}]}]}],animations:[{nodes:[{target:173,keyframes:{x:[{value:1762,tweenMethod:"linearNone",tween:!0,target:173,key:"x",index:0},{value:1583,tweenMethod:"linearNone",tween:!0,target:173,key:"x",index:30}]}},{target:175,keyframes:{x:[{value:1581,tweenMethod:"linearNone",tween:!0,target:175,key:"x",index:0},{value:1402,tweenMethod:"linearNone",tween:!0,target:175,key:"x",index:30}]}},{target:178,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:178,key:"y",index:0},{value:2,tweenMethod:"linearNone",tween:!0,target:178,key:"y",index:30}],x:[{value:1400,tweenMethod:"linearNone",tween:!0,target:178,key:"x",index:0},{value:1221,tweenMethod:"linearNone",tween:!0,target:178,key:"x",index:30}]}},{target:177,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:177,key:"y",index:0},{value:2,tweenMethod:"linearNone",tween:!0,target:177,key:"y",index:30}],x:[{value:1219,tweenMethod:"linearNone",tween:!0,target:177,key:"x",index:0},{value:1040,tweenMethod:"linearNone",tween:!0,target:177,key:"x",index:30}]}},{target:179,keyframes:{x:[{value:1038,tweenMethod:"linearNone",tween:!0,target:179,key:"x",index:0},{value:859,tweenMethod:"linearNone",tween:!0,target:179,key:"x",index:30}]}},{target:180,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:180,key:"y",index:0},{value:2,tweenMethod:"linearNone",tween:!0,target:180,key:"y",index:30}],x:[{value:857,tweenMethod:"linearNone",tween:!0,target:180,key:"x",index:0},{value:678,tweenMethod:"linearNone",tween:!0,target:180,key:"x",index:30}]}},{target:181,keyframes:{x:[{value:676,tweenMethod:"linearNone",tween:!0,target:181,key:"x",index:0},{value:495,tweenMethod:"linearNone",tween:!0,target:181,key:"x",index:30}]}},{target:182,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:182,key:"y",index:0},{value:2,tweenMethod:"linearNone",tween:!0,target:182,key:"y",index:30}],x:[{value:495,tweenMethod:"linearNone",tween:!0,target:182,key:"x",index:0},{value:316,tweenMethod:"linearNone",tween:!0,target:182,key:"x",index:30}]}},{target:183,keyframes:{y:[{value:2,tweenMethod:"linearNone",tween:!0,target:183,key:"y",index:0},{value:0,tweenMethod:"linearNone",tween:!0,target:183,key:"y",index:19},{value:3.1999999999999886,tweenMethod:"linearNone",tween:!0,target:183,key:"y",index:20},{value:2,tweenMethod:"linearNone",tween:!0,target:183,key:"y",index:30}],x:[{value:314,tweenMethod:"linearNone",tween:!0,target:183,key:"x",index:0},{value:204,tweenMethod:"linearNone",tween:!0,target:183,key:"x",index:19},{value:1822,tweenMethod:"linearNone",tween:!0,target:183,key:"x",index:20},{value:1762,tweenMethod:"linearNone",tween:!0,target:183,key:"x",index:30}]}}],name:"runWayAni",id:1,frameRate:60,action:0}],loadList:["res/imgs/game/new_back_black.png","res/imgs/result/btom_bright.png","res/imgs/result/text_an_fhb.png","res/imgs/result/btom_dark.png","res/imgs/result/text_an_zld.png","res/imgs/result/tittle_js_bjdf.png","res/imgs/result/bg_js_bjdf.png","res/imgs/result/bg_js_sjbdfgx.png","res/imgs/result/bg_js_sjbd.png","res/imgs/result/tittle_js_sjbd.png","res/imgs/result/icon_pmxj.png","res/imgs/result/text_pm_wsb.png","res/imgs/result/text_pm_num2.png","res/imgs/rank/biaoqing3.png","res/home/001.png","res/imgs/result/icon_pmss.png","res/imgs/result/icon_pmwsb.png","res/imgs/game/icon_zc1.png","res/imgs/game/icon_yc1.png","res/imgs/game/icon_right_yellow@3x1.png"],loadList3D:[]},e.ResultViewUI=h,n("game.ui.ResultViewUI",h);class l extends s{constructor(){super()}createChildren(){super.createChildren(),this.createView(l.uiView)}}l.uiView={type:"View",props:{width:1920,top:0,right:0,left:0,height:1080,bottom:0},compId:2,child:[{type:"Image",props:{top:0,skin:"res/imgs/result/bj_mh.jpg",right:0,left:0,bottom:0},compId:3},{type:"Image",props:{width:507,var:"bg",skin:"res/imgs/game/img_sz.png",scaleY:1.2,scaleX:1.2,height:456,centerY:-47,centerX:0},compId:4,child:[{type:"Sprite",props:{y:28,x:30,texture:"res/imgs/game/tittle_sysz.png"},compId:5},{type:"Image",props:{y:24.5,x:429,var:"closeBtn",skin:"res/imgs/game/btn_close.png",label:"label"},compId:6},{type:"Text",props:{y:164,x:36,text:"音乐",fontSize:26,font:"Microsoft YaHei",color:"#ffffff",runtime:"Laya.Text"},compId:8},{type:"Image",props:{y:210,x:36,width:366,var:"musicBar",skin:"res/imgs/game/progress_sz.png",height:15,sizeGrid:"5,5,5,5"},compId:7,child:[{type:"Image",props:{width:366,var:"musicBg",skin:"res/imgs/game/progressbar_sz.png",height:15,sizeGrid:"5,5,5,5"},compId:9,child:[{type:"Image",props:{y:0,x:0,width:366,var:"musicBarMask",skin:"res/imgs/game/progressbar_sz.png",renderType:"mask",height:15,sizeGrid:"5,5,5,5"},compId:11}]},{type:"Image",props:{y:7.5,x:0,width:45,var:"btnMusic",skin:"res/imgs/game/hdan.png",height:45,anchorY:.5,anchorX:.5},compId:10},{type:"Text",props:{y:-3,x:379,width:64,var:"musicTxt",valign:"middle",text:"100%",height:26,fontSize:24,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"Laya.Text"},compId:18}]},{type:"Text",props:{y:284,x:36,text:"音效",fontSize:26,font:"Microsoft YaHei",color:"#ffffff",runtime:"Laya.Text"},compId:13},{type:"Image",props:{y:330,x:36,width:366,var:"soundBar",skin:"res/imgs/game/progress_sz.png",height:15,sizeGrid:"5,5,5,5"},compId:14,child:[{type:"Image",props:{width:366,var:"soundBg",skin:"res/imgs/game/progressbar_sz.png",height:15,sizeGrid:"5,5,5,5"},compId:15,child:[{type:"Image",props:{y:0,x:0,width:366,var:"soundBarMask",skin:"res/imgs/game/progressbar_sz.png",renderType:"mask",height:15,sizeGrid:"5,5,5,5"},compId:16}]},{type:"Image",props:{y:7.5,x:0,width:45,var:"btnSound",skin:"res/imgs/game/hdan.png",height:45,anchorY:.5,anchorX:.5},compId:17},{type:"Text",props:{y:-3,x:379,width:64,var:"soundTxt",valign:"middle",text:"100%",height:26,fontSize:24,font:"Microsoft YaHei",color:"#ffffff",align:"center",runtime:"Laya.Text"},compId:20}]}]}],loadList:["res/imgs/result/bj_mh.jpg","res/imgs/game/img_sz.png","res/imgs/game/tittle_sysz.png","res/imgs/game/btn_close.png","res/imgs/game/progress_sz.png","res/imgs/game/progressbar_sz.png","res/imgs/game/hdan.png"],loadList3D:[]},e.SettingViewUI=l,n("game.ui.SettingViewUI",l)}(e.ui||(e.ui={}))}(i||(i={})),function(e){!function(e){!function(e){class t extends a{constructor(){super()}createChildren(){super.createChildren(),this.createView(t.uiView)}}t.uiView={type:"Scene",props:{width:240,height:240},loadList:[],loadList3D:[]},e.PropItemUI=t,n("game.ui.res.PropItemUI",t)}(e.res||(e.res={}))}(e.ui||(e.ui={}))}(i||(i={})),function(e){!function(e){!function(e){!function(e){class t extends s{constructor(){super()}createChildren(){super.createChildren(),this.createView(t.uiView)}}t.uiView={type:"View",props:{top:0,right:0,left:0,bottom:0},compId:2,child:[{type:"Image",props:{y:0,x:0,top:0,skin:"res/home/bj_sy.jpg",right:0,left:0,bottom:0},compId:25},{type:"Box",props:{y:724,width:1258,height:127,centerX:0},compId:22,child:[{type:"Image",props:{y:-491,x:-345,skin:"res/home/logo.png",centerX:0},compId:26},{type:"Image",props:{y:-663,x:-336,skin:"res/home/juese.png"},compId:33},{type:"Image",props:{y:-2,var:"barBg",skin:"res/home/progress1.png",sizeGrid:"0,161,0,161",centerX:0},compId:4},{type:"Image",props:{y:58,x:-146,width:1566,var:"loadingBar",skin:"res/home/progress0.png",height:52},compId:5},{type:"Sprite",props:{y:48,x:652,name:"circle"},compId:8},{type:"Text",props:{y:138,x:486,width:287,var:"loadingTxt",valign:"middle",text:"0%",height:56,fontSize:50,font:"Helvetica",color:"#fbffd5",bold:!0,align:"center",runtime:"Laya.Text"},compId:11}]}],loadList:["res/home/bj_sy.jpg","res/home/logo.png","res/home/juese.png","res/home/progress1.png","res/home/progress0.png"],loadList3D:[]},e.LoadingViewUI=t,n("game.ui.res.scenes.LoadingViewUI",t)}(e.scenes||(e.scenes={}))}(e.res||(e.res={}))}(e.ui||(e.ui={}))}(i||(i={}));class o extends i.ui.RankItemUI{constructor(){super()}onEnable(){super.onEnable()}set dataSource(e){e&&(this.index=e.index,this.name=e.name,this.gender=e.gender,this.avatar=e.avatar,this.score=e.score,this.rank=e.rank,this.updataView())}updataView(){1==this.rank?(this.winImg.skin="res/imgs/rank/icon_diyi.png",this.winImg.visible=!0,this.rankTxt.visible=!1,this.scoreTxt.color="#ff9005",this.scoreTxt1.color="#ff9005"):2==this.rank?(this.winImg.skin="res/imgs/rank/icon_dier.png",this.winImg.visible=!0,this.rankTxt.visible=!1,this.scoreTxt.color="#ff9005",this.scoreTxt1.color="#ff9005"):3==this.rank?(this.winImg.skin="res/imgs/rank/icon_disan.png",this.winImg.visible=!0,this.rankTxt.visible=!1,this.scoreTxt.color="#ff9005",this.scoreTxt1.color="#ff9005"):(this.scoreTxt.color="#000000",this.scoreTxt1.color="#000000",this.winImg.visible=!1,this.rankTxt.visible=!0,this.rankTxt.value=this.rank.toString()),this.nameTxt.text=this.name,this.scoreTxt.text=this.score.toString(),this.avatar&&(this.avatarImg.skin=this.avatar)}onDisable(){super.onDisable()}destroy(){super.destroy()}}class r{constructor(){}static init(){var e=Laya.ClassUtils.regClass;e("game/script/ButtonScript.ts",t),e("game/view/common/RankItem.ts",o)}}r.width=1920,r.height=1080,r.scaleMode="fixedauto",r.screenMode="horizontal",r.alignV="middle",r.alignH="center",r.startScene="GameView.scene",r.sceneRoot="",r.debug=!0,r.stat=!1,r.physicsDebug=!1,r.exportSceneToJson=!1,r.init();class h{static getSound(e){return"res/sound/"+e+".mp3"}static getGameUI(e){return"res/imgs/game/"+e+".png"}}h.fonts=[],h.preLoadUrls=["res/atlas/res/imgs/game.atlas","res/atlas/res/imgs/game.png","res/atlas/res/home.atlas","res/atlas/res/home.png","res/atlas/res/imgs/rank.atlas","res/atlas/res/imgs/rank.png","res/atlas/res/imgs/result.atlas","res/atlas/res/imgs/result.png","res/atlas/res/imgs/game/bg.atlas","res/atlas/res/imgs/game/bg.png","res/json/LevelConfig1.json","res/json/LevelConfig2.json","res/json/LevelConfig3.json","res/ani/Shield_after.sk","res/ani/Shield_after.png","res/ani/nv2.sk","res/ani/nv2.png","res/ani/Coin.sk","res/ani/Coin.png","res/ani/nv22.png","res/ani/nv23.png","res/ani/nv24.png","res/ani/nv25.png","res/ani/nv26.png","res/ani/nv27.png","res/ani/nv28.png","res/ani/nv29.png","res/ani/nv210.png","res/ani/nv211.png","res/ani/nv212.png","res/ani/nv213.png","res/ani/nv214.png","res/ani/nv215.png","res/ani/nv216.png","res/ani/nv217.png","res/ani/nv218.png","res/ani/gold.atlas","res/ani/gold.png","res/ani/board_glow.sk","res/ani/board_glow.png","res/ani/boom.atlas","res/ani/boom.png","res/ani/boomAni.atlas","res/ani/boomAni.png","res/home/bj_sy.jpg","res/home/difficulty_1.png","res/home/juese.png","res/home/logo.png","res/home/msxz_1.png","res/home/normal_1.png","res/home/simple_1.png","res/imgs/game/bg/bg.jpg","res/imgs/game/bg/pd.png","res/imgs/game/bg/wpydd.png","res/imgs/game/bg_ksjs.png","res/imgs/game/text_finsh.png","res/imgs/result/bg_js.png","res/imgs/result/bg_js_bjdf.png","res/imgs/result/bg_js_sjbd.png","res/imgs/result/jsfgx.png","res/imgs/rank/bg_ph.png","res/imgs/rank/bg_ph.png","res/imgs/rank/bg_ph.png","res/imgs/rank/bg_phbhl.png","res/imgs/rank/bg_phbsl.png","res/imgs/rank/bg_wdph.png"],h.preLoadUrls2=[],h.sound={readyGo:"readygo",bgm:"bgm",combo:"combo",jump:"jump"};const l=1e3/60;var g,p,m;!function(e){e[e.NONE_INTERATION=2e3]="NONE_INTERATION",e[e.FRONT_LEFT=2001]="FRONT_LEFT",e[e.FRONT_RIGHT=2002]="FRONT_RIGHT",e[e.BACK_LEFT=2003]="BACK_LEFT",e[e.BACK_RIGHT=2004]="BACK_RIGHT",e[e.ENTER_KEY=2005]="ENTER_KEY",e[e.CANCLE_KEY=2006]="CANCLE_KEY"}(g||(g={})),function(e){e[e.MOTION_STOP=0]="MOTION_STOP",e[e.MOTION_RUN=1]="MOTION_RUN",e[e.MOTION_JUMP=2]="MOTION_JUMP",e[e.MOTION_DOWN=3]="MOTION_DOWN",e[e.MOTION_LEFT=4]="MOTION_LEFT",e[e.MOTION_RIGHT=5]="MOTION_RIGHT",e[e.MOTION_FRONT=6]="MOTION_FRONT",e[e.MOTION_BACK=7]="MOTION_BACK",e[e.MOTION_LEFT_UP=8]="MOTION_LEFT_UP",e[e.MOTION_LEFT_DOWN=9]="MOTION_LEFT_DOWN",e[e.MOTION_RIGHT_UP=10]="MOTION_RIGHT_UP",e[e.MOTION_RIGHT_DOWN=11]="MOTION_RIGHT_DOWN",e[e.MOTION_STEP=12]="MOTION_STEP",e[e.MOTION_JUMP_OC=13]="MOTION_JUMP_OC",e[e.MOTION_JUMP_VERTICAL=14]="MOTION_JUMP_VERTICAL",e[e.MOTION_ROCK=15]="MOTION_ROCK",e[e.MOTION_SCISSORS=16]="MOTION_SCISSORS",e[e.MOTION_PAPER=17]="MOTION_PAPER",e[e.MOTION_STRETCH_LEFT=18]="MOTION_STRETCH_LEFT",e[e.MOTION_LIFT_LEFT=19]="MOTION_LIFT_LEFT",e[e.MOTION_STRETCH_RIGHT=20]="MOTION_STRETCH_RIGHT",e[e.MOTION_LIFT_RIGHT=21]="MOTION_LIFT_RIGHT",e[e.MOTION_STRETCH_FRONT_LEFT=22]="MOTION_STRETCH_FRONT_LEFT",e[e.MOTION_STRETCH_FRONT_RIGHT=23]="MOTION_STRETCH_FRONT_RIGHT",e[e.MOTION_DOWN_FRONT=24]="MOTION_DOWN_FRONT",e[e.NUMBERS_OF_MOTION=25]="NUMBERS_OF_MOTION"}(p||(p={})),function(e){e[e.FREQ=1e3]="FREQ"}(m||(m={}));class d{constructor(e,t){this._target=e,this._fn=t}}const c=new class{constructor(){this._ver=1,this._events={},this._motion=[0,0,0,0],this._motionTime=[0,0,0,0],this._stepFreq=0,this._stepCount=0,this._responseCallMap={string:Function},this._inited=!1}callback(e,t){console.log("callback "+e+" "+t);const i=this._responseCallMap[e];i&&i.call(i,t)}isMotion(e,t){let i=new Date,s=this._motion[e]>0&&i.getTime()-this._motionTime[e]<=t;return s&&(this._motion[e]=0),s}isLeftFootDown(e=l){return this.isMotion(0,e)}isRightFootDown(e=l){return this.isMotion(1,e)}getCmd(){let e=this._cmd;return e>0&&(this._cmd=0),e}cmd(e,t){this._cmd=t+g.NONE_INTERATION;let i=(new Date).getTime();i-this._cmdTime<500||(this._cmdTime=i,console.log("cmd set "+t+" "+this._cmd),this.emit(this._cmd.toString(),i))}getMotion(){return this._motion}motion(e,t,i,s,a,n){this._motion[0]=i,this._motion[1]=s,this._motion[2]=a,this._motion[3]=n,console.log("motion set "+this._motion);let o=(new Date).getTime(),r=this._motion;for(let e=0;e<r.length;e++)if(r[e]>0){if(o-this._motionTime[e]<10)continue;this._motionTime[e]=o;let t=r[e],i=t.toString();this.emit(i,o),console.log("motion set "+t+" -> "+i+" "+p[t])}}getStepFreq(){return this._stepFreq}getStepCount(){return this._stepCount}getVelocity(){return this._velocity}stepFreq(e){this._stepFreq=e,console.log("step freq "+e),this.emit(m.FREQ.toString(),e)}step(e,t){this.stepFreq(e),this._stepCount=t,console.log("step count "+t)}stepData(e,t,i){this.stepFreq(e),this._stepCount=t,this._velocity=i}emit(e,...t){let i=this._events[e]||[];return i.length>0&&(console.log("motion emit "+e+", "+i.length),i.forEach(e=>e._fn.apply(e._target||e._fn,t))),this}on(e,t,i){this._inited||(this._inited=!0,this.onSdkLoaded());let s=this._events[e]||[];return t&&s.push(new d(i||this,t)),console.log("motion set on "+e+", "+s.length),this._events[e]=s,this}once(e,t,i){let s=(...a)=>{t&&t.apply(i||this,a),this.off(e,s)};return this.on(e,s),this}off(e,t){let i=this._events[e]||[];return this._events[e]=i.filter(e=>e._fn!==t),this}remove(e,t){return this._events[e]=[],t&&t(),this}onSdkLoaded(){this._callsdk("onLoad",{ver:this._ver})}onBackPressed(e=!1){this._callsdk("onBackPressed",{foot:e})}onGameStart(){this._stepFreq=0,this._stepCount=0,this._callsdk("onGameStart",{})}onGameEnd(e=0,t=0,i=0,s=0,a=0,n){if(n){let e="onGameEnd_callback";this._responseCallMap[e]=n}this._callsdk("onGameEnd",{level:e,score:t,record:i,mode:s,opponentId:a})}getUserInfo(e){let t="getUserInfo_callback";this._responseCallMap[t]=e,this._callsdk(t,{callback:t})}getRank(e,t){let i="getRank_callback";this._responseCallMap[i]=t,this._callsdk(i,{callback:i,type:e})}vibrate(e,t=0){this._callsdk("vibrate",{duration:e,leftOrRight:t})}openGameData(e,t){this._gameDataCallback=t,this._callsdk("openGameData",{open:e})}gameData(e){this._gameDataCallback&&this._gameDataCallback.call(this._gameDataCallback,e)}_callsdk(e,t){console.log("sdk call "+e),window.SDKBridge&&window.SDKBridge.postMessage(JSON.stringify({method:e,args:t}))}};window.SHOES_SDK=c;class y extends i.ui.res.scenes.LoadingViewUI{constructor(){super(),this._baseProgress=0,this._targetProgress=1,this._curProgress=0,this.loadingPreload=["res/home/bj_sy.jpg","res/home/juese.png","res/home/progress0.png","res/home/progress1.png"],this.size(Laya.stage.width,Laya.stage.height)}static get instance(){return this._instance||(this._instance=new y),this._instance}onAwake(){super.onAwake(),core.SoundManager.setMusicVolume(.7),core.SoundManager.setSoundVolume(.7)}onEnable(){super.onEnable()}preLoad(e){Laya.loader.load(this.loadingPreload,Laya.Handler.create(this,()=>{e.run()}))}setProgress(e,t=!1){let i=this._baseProgress+(this._targetProgress-this._baseProgress)*e;!t&&i<this._curProgress||(this._curProgress=i,this.loadingBar.width=1258*this._curProgress,this.loadingTxt.text=Math.floor(100*this._curProgress)+"%",window.platform&&this._curProgress<1&&platform.progress({percent:Math.floor(100*this._curProgress)}))}show(){this.parent||Laya.stage.addChild(this)}hide(){this.parent&&y._instance.destroy(),y._instance=null}onDisable(){super.onDisable()}destroy(){this.loadingPreload=null,super.destroy(),window.platform&&platform.progress({percent:100})}}class f extends Laya.EventDispatcher{constructor(){super(),this.initW=1920,this.initH=1080,this.gameTime=18e4,this.onceAddSpeed=100,this.forwordSpeed=10,this.forwordSpeedMax=6,this.backSpeed=15,this.addSpeed=1,this.runCountTime=100,this.jumpCountTime=1500,this.onceAddJump=270,this.jumpSpeed=15,this.jumpCount=0,this.onceTime=55,this.isStarGame=!1,this.isPlaying=!1,this.selfInfo={id:1,nickname:"昵称最多七个字",gender:1,avatar:""}}init(){Laya.SoundManager.useAudioMusic=!1,this.getAllHighScoreData(),this.getLevel1HighScoreData(),this.getLevel2HighScoreData(),this.getLevel3HighScoreData(),window.SDKBridge?c.getUserInfo(e=>{this.selfInfo=e,log("selfInfo",e),R.view.homeView.show(),y.instance.hide()}):(R.view.homeView.show(),y.instance.hide())}reset(){this.score=0}getAllHighScoreData(){this.allHighScoreData=Laya.LocalStorage.getJSON("JumpallHighScoreData"),this.allHighScoreData||this.setAllHighSocreData(0),log("获取总最高分数",this.allHighScoreData)}setAllHighSocreData(e){this.allHighScoreData=e,this.saveALlHighSocreData()}saveALlHighSocreData(){Laya.LocalStorage.setJSON("JumpallHighScoreData",this.allHighScoreData)}getLevel1HighScoreData(){this.level1HighScoreData=Laya.LocalStorage.getJSON("Jumplevel1HighScoreData"),this.level1HighScoreData||this.setLevel1HighSocreData(0),log("获取简单模式最高分数",this.level1HighScoreData)}setLevel1HighSocreData(e){this.level1HighScoreData=e,this.saveLevel1HighSocreData(),e>this.allHighScoreData&&this.setAllHighSocreData(e)}saveLevel1HighSocreData(){Laya.LocalStorage.setJSON("Jumplevel1HighScoreData",this.level1HighScoreData)}getLevel2HighScoreData(){this.level2HighScoreData=Laya.LocalStorage.getJSON("Jumplevel2HighScoreData"),this.level2HighScoreData||this.setLevel2HighSocreData(0),log("获取简单模式最高分数",this.level2HighScoreData)}setLevel2HighSocreData(e){this.level2HighScoreData=e,this.saveLevel2HighSocreData(),e>this.allHighScoreData&&this.setAllHighSocreData(e)}saveLevel2HighSocreData(){Laya.LocalStorage.setJSON("Jumplevel2HighScoreData",this.level2HighScoreData)}getLevel3HighScoreData(){this.level3HighScoreData=Laya.LocalStorage.getJSON("Jumplevel3HighScoreData"),this.level3HighScoreData||this.setLevel3HighSocreData(0),log("获取简单模式最高分数",this.level3HighScoreData)}setLevel3HighSocreData(e){this.level3HighScoreData=e,this.saveLevel3HighSocreData(),e>this.allHighScoreData&&this.setAllHighSocreData(e)}saveLevel3HighSocreData(){Laya.LocalStorage.setJSON("Jumplevel3HighScoreData",this.level3HighScoreData)}}class x{constructor(){this.levelConfig1=[],this.levelConfig2=[],this.levelConfig3=[],this.init()}init(){Laya.loader.load("res/json/LevelConfig1.json",Laya.Handler.create(this,this.getLevelConfig1)),Laya.loader.load("res/json/LevelConfig2.json",Laya.Handler.create(this,this.getLevelConfig2)),Laya.loader.load("res/json/LevelConfig3.json",Laya.Handler.create(this,this.getLevelConfig3)),this.levelConfig1=Laya.loader.getRes("res/json/LevelConfig1.json"),this.levelConfig2=Laya.loader.getRes("res/json/LevelConfig2.json"),this.levelConfig3=Laya.loader.getRes("res/json/LevelConfig3.json")}getLevelConfig(e,t){let i;1==e?i=this.levelConfig1:2==e?i=this.levelConfig2:3==e&&(i=this.levelConfig3);for(let e=i.length-1;e>=0;e--)if(i[e].id==t)return i[e];return null}getLevelConfig1(){this.goldCountArr1=[];for(let e=0;e<this.levelConfig1.length;e++)if(this.levelConfig1[e].indexArr>=this.goldCountArr1.length)for(let t=0;t<this.levelConfig1[e].type.length;t++)1!=this.levelConfig1[e].type[t]&&3!=this.levelConfig1[e].type[t]||(this.goldCountArr1[this.levelConfig1[e].indexArr-1]||(this.goldCountArr1[this.levelConfig1[e].indexArr-1]=0),this.goldCountArr1[this.levelConfig1[e].indexArr-1]++);log("goldCountArr1",this.goldCountArr1)}getLevelConfig2(){this.goldCountArr2=[];for(let e=0;e<this.levelConfig1.length;e++)if(this.levelConfig1[e].indexArr>=this.goldCountArr2.length)for(let t=0;t<this.levelConfig1[e].type.length;t++)1!=this.levelConfig1[e].type[t]&&3!=this.levelConfig1[e].type[t]||(this.goldCountArr2[this.levelConfig1[e].indexArr-1]||(this.goldCountArr2[this.levelConfig1[e].indexArr-1]=0),this.goldCountArr2[this.levelConfig1[e].indexArr-1]++);log("goldCountArr2",this.goldCountArr2)}getLevelConfig3(e){this.goldCountArr3=[];for(let e=0;e<this.levelConfig1.length;e++)if(this.levelConfig1[e].indexArr>=this.goldCountArr3.length)for(let t=0;t<this.levelConfig1[e].type.length;t++)1!=this.levelConfig1[e].type[t]&&3!=this.levelConfig1[e].type[t]||(this.goldCountArr3[this.levelConfig1[e].indexArr-1]||(this.goldCountArr3[this.levelConfig1[e].indexArr-1]=0),this.goldCountArr3[this.levelConfig1[e].indexArr-1]++);log("goldCountArr3",this.goldCountArr3)}}class u extends Laya.Image{constructor(){super(),this.width=47,this.height=20,this.skin="res/imgs/game/shadow.png",this.anchorX=this.anchorY=.5}onEnable(){Laya.timer.once(1e3,this,()=>{this.sdAlphaTween=Laya.TimeLine.to(this,{alpha:1},1e3),this.sdAlphaTween.play()})}startMove(){let e=Laya.Point.create();e.x=R.view.gameView.sdEndPosArr[this.index].x,e.y=R.view.gameView.sdEndPosArr[this.index].y,e=R.view.gameView.createBox.localToGlobal(e),this.sdMoveTween=Laya.TimeLine.to(this,{x:e.x-R.view.gameView.gameBox.x,y:e.y-R.view.gameView.gameBox.y},5900,Laya.Ease.expoIn),this.sdMoveTween.play(),this.sdScaleTween=Laya.TimeLine.to(this,{scaleX:3,scaleY:3},5900,Laya.Ease.expoIn),this.sdScaleTween.play(),this.sdMoveTween.on(Laya.Event.COMPLETE,this,()=>{this.destroy()})}destroy(){super.destroy(),this.removeSelf(),this.sdMoveTween&&this.sdMoveTween.destroy(),this.sdScaleTween&&this.sdScaleTween.destroy(),this.sdAlphaTween&&this.sdAlphaTween.destroy(),this.sdMoveTween=null,this.sdScaleTween=null,this.sdAlphaTween=null,Laya.Tween.clearAll(this),this.timer.clearAll(this)}recover(){Laya.Pool.recover("EnemieShadow",this)}static create(e,t,i){let s=new u;return s.x=e,s.y=t,s.index=i,s}}class w extends Laya.Image{constructor(){super(),this.dx=1,this.dy=1,this.isDeath=!1,this.width=this.height=240,this.anchorX=this.anchorY=.5,this.alpha=1,this.scale(.1,.1)}onEnable(){Laya.timer.once(1e3,this,()=>{this.alphaTween=Laya.TimeLine.to(this,{alpha:1},1e3),this.alphaTween.play()}),this.creatShadow()}creatShadow(){let e=Laya.Point.create(),t=this.index%4;0==t&&(t=4),e.x=R.view.gameView.sdStartPosArr[t].x,e.y=R.view.gameView.sdStartPosArr[t].y,e=R.view.gameView.createBox.localToGlobal(e);let i=u.create(e.x-R.view.gameView.gameBox.x,e.y-R.view.gameView.gameBox.y,t);i.alpha=0,i.scale(.5,.5),R.view.gameView.playBox.addChild(i),i.startMove(),this.shadow=i}creatCoinAni(){this.goldAni?(this.goldAni.visible=!0,1==this.type?this.goldAni.play("Sliver",!0,!0):this.goldAni.play("Golden",!0,!0)):(this.goldAni=new Laya.Skeleton,this.goldAni.load("res/ani/Coin.sk",Laya.Handler.create(this,()=>{this.goldAni.pos(120,250),this.goldAni.scale(1.8,1.8),this.addChild(this.goldAni),1==this.type?this.goldAni.play("Sliver",!0,!0):this.goldAni.play("Golden",!0,!0)})))}creatBoomAni(){this.boomAni?(this.boomAni.visible=!0,this.boomAni.play(0,!0)):(this.boomAni=new Laya.Animation,this.boomAni.loadAtlas("res/ani/boomAni.atlas",Laya.Handler.create(this,()=>{this.boomAni.interval=70,this.boomAni.source="res/ani/boomAni.atlas",this.boomAni.pivotX=70,this.boomAni.pivotY=109,this.boomAni.scale(2,2),this.boomAni.pos(126,141),this.addChild(this.boomAni),this.boomAni.play(0,!0)})))}startMove(){let e=Laya.Point.create();e.x=R.view.gameView.endPosArr[this.index].x,e.y=R.view.gameView.endPosArr[this.index].y,e=R.view.gameView.createBox.localToGlobal(e),this.moveTween=Laya.TimeLine.to(this,{x:e.x-R.view.gameView.gameBox.x,y:e.y-R.view.gameView.gameBox.y},6e3,Laya.Ease.expoIn),this.moveTween.play(),this.scaleTween=Laya.TimeLine.to(this,{scaleX:1,scaleY:1},6e3,Laya.Ease.expoIn),this.scaleTween.play(),this.moveTween.on(Laya.Event.COMPLETE,this,()=>{this.isDeath=!0,1==this.type?R.view.gameView.showGrade(!0,!1,!1):3==this.type&&R.view.gameView.showGrade(!0,!1,!1),this.destroy()})}destroy(){this.alpha=1,this.goldAni&&(this.goldAni.visible=!1),this.boomAni&&(this.boomAni.visible=!1),this.scale(.1,.1),this.removeSelf(),R.view.gameView.enemies=R.view.gameView.enemies.filter(e=>!e.isDeath),this.moveTween&&this.moveTween.destroy(),this.scaleTween&&this.scaleTween.destroy(),this.alphaTween&&this.alphaTween.destroy(),this.shadow&&this.shadow.destroy(),this.moveTween=null,this.scaleTween=null,this.alphaTween=null,Laya.Tween.clearAll(this),this.timer.clearAll(this),this.recover()}recover(){Laya.Pool.recover("Enemie",this)}static create(e,t,i,s,a){let n=Laya.Pool.getItemByClass("Enemie",w);return n.x=e,n.y=t,n.skin=i,n.type=s,n.index=a,n.scale(.2,.2),n.isDeath=!1,2==s?n.creatBoomAni():n.creatCoinAni(),n}}class k{}k.Standby="daiji",k.ReadyRun="manpaoqibu",k.Run="manpao",k.StopRun="manpaotingzhi",k.ReadyRun1="kuaipaoqibu",k.Run1="kuaipao",k.StopRun1="kuaipaotingzhi",k.Jump="yijitiao",k.Jump2="erjitiao",k.Dead="jiluo";class v extends Laya.Sprite{constructor(){super(),this.gravity=.05,this.dx=0,this.dy=0,this.isFalling=!1,this.isJumping=!1,this.isRuning=!1,this.isDeath=!1,this.isStand=!1,this.downDy=0,this.jumpSpeed=0,this.runRate=1,this.stepRate=0,this.stepRateTarget=0,this.isGO=!1,this.count=0,this.speed=0,this.addSpeed=0,this.createRole(),this.reset()}get width(){return 160}get height(){return 240}createRole(){this.role&&(this.role.destroy(),this.role=null);this.role=new Laya.Skeleton,this.role.load("res/ani/nv2.sk",Laya.Handler.create(this,()=>{this.addChild(this.role),this.playStandby()}))}playStandby(){this.isStand&&(this.role.playbackRate(1),this.role.play(k.Standby,!0,!1),this.isRuning=!1,this.isStand=!0)}playReadyRun(){this.role.playbackRate(1),this.role.play(k.ReadyRun,!1),Laya.timer.once(100,this,()=>{this.isRuning=!0,this.isStand=!1})}playRun(){this.role.playbackRate(this.runRate),this.role.play(k.Run,!0,!1),this.isStand=!1}playStopRun(){this.role.playbackRate(1),this.role.play(k.StopRun,!1,!1),this.isRuning=!1}playJump(){this.role.playbackRate(1),this.role.play(k.Jump,!1,!0),this.isJumping=!0,this.isStand=!1}playJump2(){this.role.playbackRate(.8),this.role.play(k.Jump2,!1,!0),this.isJumping=!0,this.isStand=!1}playDead(){this.role.playbackRate(1),this.role.play(k.Dead,!1,!0),this.role.on(Laya.Event.STOPPED,null,()=>{this.role.off(Laya.Event.STOPPED,null,null),this.count++,this.isDeath=!1,this.isRuning=!1,this.isStand=!0,this.isJumping=!1,this.isFalling=!1,this.dy=0,this.dx=0,this.playReadyRun(),R.model.jumpCount=0,R.view.gameView.jumpCountTime=R.model.jumpCountTime})}update(){let e=1/16*Laya.timer.delta;this.dy>0&&!this.isDeath&&(this.dx=0,this.downDy=0,this.runRate=.8,this.y-=this.jumpSpeed*e,this.jumpSpeed>2*e?this.jumpSpeed-=.4*e:this.jumpSpeed=2*e,this.y-this.dy<=5*e&&(this.jumpSpeed=.3*e),this.isFalling=!1,this.y<=this.dy&&(this.y=this.dy,this.dy=0,2==R.model.jumpCount?Laya.timer.once(150*e,this,()=>{this.isFalling=!0}):this.isFalling=!0),this.isJumping||this.playJump()),this.isFalling&&this.isJumping&&(this.downDy+=this.gravity*Laya.timer.delta,this.y+=this.downDy,this.jumpSpeed+=.4*Laya.timer.delta,this.y>=R.view.gameView.startPosImg.y&&(this.y=R.view.gameView.startPosImg.y,this.isJumping=!1,this.isFalling=!1,this.curBackSpeed=0,R.model.jumpCount=0,R.view.gameView.jumpCountTime=R.model.jumpCountTime)),this.dx>0&&!this.isDeath&&this.isRuning?(this.isGO?this.speed+=this.addSpeed*Math.min(1,this.stepRate/this.stepRateTarget)*e:this.speed+=.6*e,this.speed>R.model.forwordSpeedMax*e&&(this.speed=R.model.forwordSpeedMax*e),this.x+=this.speed,this.dx-=R.model.forwordSpeed/2*e,this.x>=1450&&(this.x=1450),this.x>=460&&!this.isGO&&(this.isGO=!0,this.speed=0)):this.speed>0&&(this.speed=0),this.x<=460&&this.isGO?(this.x=460,!R.model.isPlaying||this.isFalling||this.isJumping||this.isDeath||this.isRuning&&this.playRun()):this.x>R.view.gameView.startPosImg.x?this.isFalling||this.isJumping||this.isDeath||(this.curBackSpeed<this.backSpeed&&(this.curBackSpeed+=.2*e),this.x-=this.curBackSpeed*e,this.runRate-=.05*e,this.runRate<=1&&(this.runRate=1),this.role.playbackRate(this.runRate),this.isRuning&&this.playRun()):(this.x=R.view.gameView.startPosImg.x,!R.model.isPlaying||!this.isRuning&&(this.isStand||this.y!=R.view.gameView.startPosImg.y||this.isFalling||this.isJumping)||(this.isStand=!0,this.playStopRun(),Laya.timer.once(300,this,()=>{this.playStandby()})))}showHit(){this.hitTween=Laya.TimeLine.to(this,{alpha:.3},200),this.hitTween.play(0,!0)}hideHit(){this.alpha=1,this.hitTween.pause()}reset(){this.dx=0,this.dy=0,this.isFalling=!1,this.isJumping=!1,this.isRuning=!1,this.isStand=!0,this.runRate=1,this.isDeath=!1,this.isGO=!1,this.hitTween&&this.hideHit(),this.role.templet&&this.playStandby(),1==R.model.gameType?(this.backSpeed=R.model.backSpeed,this.addSpeed=.3,this.stepRateTarget=100):2==R.model.gameType?(this.backSpeed=R.model.backSpeed,this.addSpeed=.2,this.stepRateTarget=150):3==R.model.gameType&&(this.backSpeed=R.model.backSpeed,this.addSpeed=.2*.7,this.stepRateTarget=200)}showProtectLight(){this.protectLight?(this.protectLight.visible=!0,this.protectLight.play("Play",!0)):(this.protectLight=new Laya.Skeleton,this.protectLight.load("res/ani/Shield_after.sk",Laya.Handler.create(this,()=>{this.protectLight.pos(0,20),this.protectLight.scale(3,3),this.addChild(this.protectLight),this.protectLight.play("Play",!0)})))}stopProtectLight(){this.protectLight&&(this.protectLight.stop(),this.protectLight.visible=!1)}destroy(){this.role&&this.role.destroy(),this.role=null,super.destroy()}}class I extends Laya.FontClip{constructor(){super(),this.width=300,this.height=65,this.anchorX=this.anchorY=.5}onEnable(){this.starMove()}starMove(){let e=this.y-50;this.scaleTween=Laya.TimeLine.to(this,{scaleX:1,scaleY:1},1e3,Laya.Ease.elasticOut).to(this,{y:e},1e3),this.scaleTween.play(),this.timer.once(1e3,this,()=>{this.alphaTween=Laya.TimeLine.to(this,{alpha:0},500),this.alphaTween.play()}),this.scaleTween.on(Laya.Event.COMPLETE,this,()=>{this.destroy()})}destroy(){this.removeSelf(),R.view.gameView.socreTxtArr=R.view.gameView.socreTxtArr.filter(e=>e.parent),this.scaleTween&&this.scaleTween.destroy(),this.alphaTween&&this.alphaTween.destroy(),this.scaleTween=null,this.alphaTween=null,this.timer.clearAll(this),this.recover()}recover(){Laya.Pool.recover("ScoreTxt",this)}static create(e,t,i,s){let a=Laya.Pool.getItemByClass("ScoreTxt",I);return a.x=e,a.y=t,a.alpha=1,a.scaleX=a.scaleY=0,a.value=s,1==i?(a.sheet="+0123456789",a.skin="res/imgs/game/num_1.png"):2==i?(a.sheet="+0123456789",a.skin="res/imgs/game/num_2.png"):3==i&&(a.sheet="-0123456789",a.skin="res/imgs/game/num_3.png"),a}}class b extends Laya.Animation{static createOnceAni(e,t,i,s,a,n,o,r=15,h){let l=Laya.Pool.getItemByClass("FuritAnimation",b);return l.autoPlay=!0,l.interval=r,l.source=n,l.pivotX=i,l.pivotY=s,l.scale(a,a),l.pos(e,t),l.on(Laya.Event.COMPLETE,this,()=>{Laya.Pool.recover("FuritAnimation",l.removeSelf()),h&&h.run()}),o.addChild(l),l}}class T extends i.ui.GameViewUI{constructor(){super(),this.curTime=0,this.countNum=1,this.runCountTime=0,this.jumpCountTime=0,this.isProtect=!1,this.isScoreHigh=!1,this.goldIndex=0,this.goldNum=0,this.gradeCount=0,this.stepCount=0,this.creatCount=0,this.tirggerUp=200,this.tirggerDOWN=-100,this.tirggerLeft=150,this.tirggerRight=-150,this.model=R.model}onAwake(){super.onAwake(),this.player=new v,this.player.zOrder=1e3,this.player.pos(this.startPosImg.x,this.startPosImg.y),this.playBox.addChild(this.player),this.playerShadow=new Laya.Image("res/imgs/game/shadow.png"),this.playerShadow.pos(this.player.x-80,this.startPosImg.y-20),this.playerShadow.scale(3,3),this.playBox.addChild(this.playerShadow)}onEnable(){super.onEnable(),this.createPosArr=[],this.endPosArr=[];for(let e=1;e<=12;e++)this.createPosArr[e]=this[`${"createPos"+e}`],this.endPosArr[e]=this[`${"endPos"+e}`];this.sdStartPosArr=[],this.sdEndPosArr=[];for(let e=1;e<=4;e++)this.sdStartPosArr[e]=this[`${"sdStartPos"+e}`],this.sdEndPosArr[e]=this[`${"sdEndPos"+e}`];document.addEventListener("visibilitychange",function(){!0===document.hidden&&R.view.gameView.showPauseView()})}addEvent(){this.startBtn.on(Laya.Event.CLICK,this,this.onClick),this.settingBtn.on(Laya.Event.CLICK,this,this.onClick)}removeEvent(){this.startBtn.off(Laya.Event.CLICK,this,this.onClick),this.settingBtn.off(Laya.Event.CLICK,this,this.onClick)}addJumpEvent(){Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown),Laya.stage.on(Laya.Event.KEY_UP,this,this.onKeyUp),this.runBtn.on(Laya.Event.CLICK,this,this.playRun),this.jumpBtn.on(Laya.Event.CLICK,this,this.playJump),c.on(p.MOTION_JUMP.toString(),this.playJump,this),c.on(g.CANCLE_KEY.toString(),this.showPauseView,this)}removeJumpEvent(){Laya.stage.off(Laya.Event.KEY_DOWN,this,this.onkeydown),Laya.stage.off(Laya.Event.KEY_UP,this,this.onKeyUp),this.runBtn.off(Laya.Event.CLICK,this,this.playRun),this.jumpBtn.off(Laya.Event.CLICK,this,this.playJump),c.off(p.MOTION_JUMP.toString(),this.playJump),c.off(g.CANCLE_KEY.toString(),this.showPauseView)}onClick(e){switch(e.currentTarget){case this.startBtn:this.startGame();break;case this.settingBtn:this.showPauseView()}}showPauseView(){this.pauseGame(),R.view.pauseViewView.show()}onkeydown(e){Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.RIGHT)&&!this.keyDownList[e.keyCode]&&c.step(c.getStepFreq(),this.stepCount+1),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.UP)&&!this.keyDownList[e.keyCode]&&this.playJump(),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.NUMBER_1)&&!this.keyDownList[e.keyCode]&&c.stepFreq(100),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.NUMBER_2)&&!this.keyDownList[e.keyCode]&&c.stepFreq(200),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.NUMBER_3)&&!this.keyDownList[e.keyCode]&&c.stepFreq(300),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.NUMBER_0)&&!this.keyDownList[e.keyCode]&&c.stepFreq(0),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.NUMPAD_ADD)&&!this.keyDownList[e.keyCode]&&c.stepFreq(c.getStepFreq()+10),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.NUMPAD_SUBTRACT)&&!this.keyDownList[e.keyCode]&&c.stepFreq(c.getStepFreq()-10),this.keyDownList[e.keyCode]=!0}onKeyUp(e){delete this.keyDownList[e.keyCode]}updateRun(){if(c.getStepCount()>this.stepCount){if(this.stepCount++,this.player.isFalling||this.player.isJumping||!this.model.isPlaying||this.player.isDeath)return;this.player.stepRate=c.getStepFreq(),this.player.dx=this.model.onceAddSpeed,this.player.curBackSpeed=0,this.player.runRate<=1.5&&(this.player.runRate+=.2),this.player.isRuning||this.player.playReadyRun()}}playRun(){this.player.isFalling||this.player.isJumping||!this.model.isPlaying||this.player.isDeath||(this.player.dx=this.model.onceAddSpeed,this.player.curBackSpeed=0,this.player.runRate<=1.5&&(this.player.runRate+=.2),this.player.isRuning||this.player.playReadyRun())}playJump(){if(this.model.isPlaying&&!this.player.isDeath&&this.player.isGO&&this.model.jumpCount<2){if(1==this.model.jumpCount&&this.jumpCountTime<=0)return;this.player.dy=this.player.y-this.model.onceAddJump,this.jumpCountTime=this.model.jumpCountTime,this.model.jumpCount++,this.player.jumpSpeed=this.model.jumpSpeed,2==this.model.jumpCount&&this.player.playJump2(),core.SoundManager.playSound(h.getSound(h.sound.jump))}}startGame(){this.openAni.play(0,!1),this.startBtn.visible=!1,this.model.isStarGame=!0,this.startOrOverBg.visible=!0;for(let e=0;e<=3;e++)Laya.timer.once(1e3*e,this,()=>{3-e>0?this.startOrOverImg.skin=`res/imgs/game/time${3-e}.png`:(this.startOrOverImg.skin="res/imgs/game/text_go.png",core.SoundManager.playSound(h.getSound(h.sound.readyGo)),Laya.timer.once(800,this,()=>{this.goAni.play(0,!1)})),this.countAni.play(0,!1)},null,!1);Laya.timer.once(4e3,this,()=>{this.model.isPlaying=!0,core.SoundManager.playMusic(h.getSound(h.sound.bgm));let e=this.runWayAni.interval;this.runWayAni.interval=.7*e,this.runWayAni.play(0,!0),this.pd_LigthImg.skin="res/imgs/game/bg/pd_bright.png",this.startOrOverBg.visible=!1,this.startBg.visible=!1,Laya.timer.loop(this.model.onceTime,this,this.animate),Laya.timer.frameLoop(1,this,this.updatePlayer),c.onGameStart()},null,!1)}pauseGame(){this.player.role&&this.player.role.stop(),this.pd_LigthImg.skin="res/imgs/game/bg/pd_dark.png",this.runWayAni.stop();for(let e=0;e<this.enemies.length;e++)this.enemies[e].moveTween&&this.enemies[e].scaleTween&&(this.enemies[e].moveTween.pause(),this.enemies[e].scaleTween.pause(),this.enemies[e].shadow.sdMoveTween&&this.enemies[e].shadow.sdScaleTween&&(this.enemies[e].shadow.sdMoveTween.pause(),this.enemies[e].shadow.sdScaleTween.pause()));Laya.timer.clear(this,this.animate),Laya.timer.clear(this,this.updatePlayer),this.removeJumpEvent()}continueGame(){this.openAni.play(0,!1),this.startBg.visible=!0,this.startOrOverBg.visible=!0;for(let e=0;e<3;e++)Laya.timer.once(1e3*e,this,()=>{this.startOrOverImg.skin=`res/imgs/game/time${3-e}.png`,3-e==1&&Laya.timer.once(800,this,()=>{this.goAni.play(0,!1);for(let e=0;e<this.enemies.length;e++)this.enemies[e].moveTween&&this.enemies[e].scaleTween&&(this.enemies[e].moveTween.resume(),this.enemies[e].scaleTween.resume(),this.enemies[e].shadow.sdMoveTween&&this.enemies[e].shadow.sdScaleTween&&(this.enemies[e].shadow.sdMoveTween.resume(),this.enemies[e].shadow.sdScaleTween.resume()));this.pd_LigthImg.skin="res/imgs/game/bg/pd_bright.png",this.runWayAni.play(0,!0),Laya.timer.loop(this.model.onceTime,this,this.animate),Laya.timer.frameLoop(1,this,this.updatePlayer),this.addJumpEvent(),Laya.timer.once(200,this,()=>{this.startOrOverBg.visible=!1,this.startBg.visible=!1},null,!1)}),this.countAni.play(0,!1)},null,!1)}exitGame(){let e=0;switch(this.model.gameType){case 1:this.curScore>this.model.level1HighScoreData&&(this.isScoreHigh=!0,this.model.setLevel1HighSocreData(this.curScore)),e=this.model.level1HighScoreData;break;case 2:this.curScore>this.model.level2HighScoreData&&(this.isScoreHigh=!0,this.model.setLevel2HighSocreData(this.curScore)),e=this.model.level2HighScoreData;break;case 3:this.curScore>this.model.level3HighScoreData&&(this.isScoreHigh=!0,this.model.setLevel3HighSocreData(this.curScore)),e=this.model.level3HighScoreData}c.onGameEnd(this.model.gameType,this.curScore),this.player.reset(),R.view.homeView.show(),R.view.hideGameView()}animate(){this.updateRun(),(this.model.isPlaying||this.model.isStarGame)&&(this.curTime>0?(this.curTime-=this.model.onceTime,this.timeTxt.text=this.exchangeCDTime(this.curTime)):this.model.isPlaying&&this.gameOver())}updatePlayer(){this.updateEnemies(),this.player.update(),this.playerShadow.x=this.player.x-80,this.TirggerEnemies(),this.runCountTime>0&&(this.runCountTime-=Laya.timer.delta),this.jumpCountTime>0&&(this.jumpCountTime-=Laya.timer.delta)}exchangeCDTime(e){let t=parseInt(e/1e3/60%60+""),i=parseInt(e/1e3%60+""),s=e%100;return t<10&&(t="0"+t),i<10&&(i="0"+i),s<10&&(s="0"+s),t+":"+i+"`"+s}updateEnemies(){for(let e=0;e<this.createPosTime.length;e++)this.createPosTime[e]&&this.createPosTime[e]>0&&(this.createPosTime[e]-=this.timer.delta,this.createPosTime[e]<=0&&(this.createPosArr[e].skin="res/imgs/game/bg/led_dark.png"));if(!(this.countNum>=this.levelConfig.length)&&this.curTime<=1e3*R.dataManager.getLevelConfig(this.model.gameType,this.countNum).time){for(let e=0;e<R.dataManager.getLevelConfig(this.model.gameType,this.countNum).type.length;e++){this.createPosArr[R.dataManager.getLevelConfig(this.model.gameType,this.countNum).posArr[e]].skin="res/imgs/game/bg/led_bright.png";let t,i=R.dataManager.getLevelConfig(this.model.gameType,this.countNum).type[e],s=R.dataManager.getLevelConfig(this.model.gameType,this.countNum).posArr[e],a=Laya.Point.create();a.x=this.createPosArr[s].x,a.y=this.createPosArr[s].y,a=this.createBox.localToGlobal(a),1==i?t="":2==i?t="res/imgs/game/boomEnemy.png":3==i&&(t="");let n=w.create(a.x-this.gameBox.x,a.y-this.gameBox.y,t,i,s);this.creatCount++,n.zOrder=1e3-this.creatCount,n.alpha=0,this.playBox.addChild(n),this.enemies.push(n),n.startMove(),this.createPosTime[s]=2e3}this.countNum++}}TirggerEnemies(){for(let e=0;e<this.enemies.length;e++)if(2==this.enemies[e].type?(this.tirggerUp=150,this.tirggerDOWN=-50,this.tirggerLeft=130,this.tirggerRight=-130):(this.tirggerUp=250,this.tirggerDOWN=-150,this.tirggerLeft=200,this.tirggerRight=-200),this.player.y-this.enemies[e].y<=this.tirggerUp&&this.player.y-this.enemies[e].y>=this.tirggerDOWN&&this.player.x-this.enemies[e].x<=this.tirggerLeft&&this.player.x-this.enemies[e].x>=this.tirggerRight&&this.enemies[e].scaleX>=.8&&this.enemies[e].scaleY>=.8&&this.enemies[e].parent){if(this.model.jumpCount<1&&this.enemies[e].index>4)return;let t,i;if(1==this.enemies[e].type||3==this.enemies[e].type?(core.SoundManager.playSound(h.getSound(h.sound.combo)),1==this.enemies[e].type?(1==this.model.gameType?(t="+100",this.curScore+=100,this.addSocre+=100):2==this.model.gameType?(t="+150",this.curScore+=150,this.addSocre+=150):3==this.model.gameType&&(t="+200",this.curScore+=200,this.addSocre+=200),i=1,this.showGrade(!0,!1,!0)):(1==this.model.gameType?(t="+300",this.curScore+=300,this.addSocre+=300):2==this.model.gameType?(t="+350",this.curScore+=350,this.addSocre+=350):3==this.model.gameType&&(t="+400",this.curScore+=400,this.addSocre+=400),i=2,this.showGrade(!0,!0,!0)),b.createOnceAni(this.enemies[e].x,this.enemies[e].y,190,210,1.5,"res/ani/gold.atlas",this.playBox)):2==this.enemies[e].type&&(this.player.isDeath||(1==this.model.gameType?(t="-200",this.curScore-=200,this.subSocre+=200):2==this.model.gameType?(t="-250",this.curScore-=250,this.subSocre+=250):3==this.model.gameType&&(t="-300",this.curScore-=300,this.subSocre+=300),i=3,this.huaryUpAniL.play(0,!0),this.huaryUpAniR.play(0,!0),this.huaryUpAniL.visible=!0,this.huaryUpAniR.visible=!0,this.showGrade(!1,!1,!1),c.vibrate(500),Laya.timer.once(500,this,()=>{this.huaryUpAniL.stop(),this.huaryUpAniR.stop(),this.huaryUpAniL.visible=!1,this.huaryUpAniR.visible=!1}),b.createOnceAni(this.enemies[e].x,this.enemies[e].y,266,209,1.5,"res/ani/boom.atlas",this.playBox,30),this.isProtect||(this.isProtect=!0,this.player.showHit(),2==this.model.jumpCount?(this.player.isDeath=!0,this.player.playDead(),Laya.Tween.to(this.player,{y:this.startPosImg.y},500)):0==this.model.jumpCount&&460!=this.player.x&&(this.player.x-this.enemies[e].x<=0?Laya.Tween.to(this.player,{x:this.player.x-this.enemies[e].width/2},200):Laya.Tween.to(this.player,{x:this.player.x+this.enemies[e].width/2},200)),Laya.timer.once(2500,this,()=>{this.player.hideHit(),this.isProtect=!1})))),t){let s=Laya.Point.create();s.x=this.endPosArr[this.enemies[e].index].x,s.y=this.endPosArr[this.enemies[e].index].y,s=this.createBox.localToGlobal(s);let a=I.create(s.x+120,s.y-150,i,t);a.zOrder=1001,this.playBox.addChild(a),this.socreTxtArr.push(a)}this.enemies[e].isDeath=!0,this.enemies[e].destroy(),this.updateScore()}}showGrade(e=!1,t=!1,i=!1){e?(this.goldNum++,i?(t&&(this.gradeImg.skin="res/imgs/game/great.png",this.scoreGrade.visible=!0,this.gradeAni.play(0,!1)),this.goldNum==this.goldCountArr[this.goldIndex]&&(this.gradeCount++,!t&&this.isGood&&(3==this.gradeCount?this.gradeImg.skin="res/imgs/game/amaze.png":4==this.gradeCount||this.gradeCount>=this.goldCountArr.length?this.gradeImg.skin="res/imgs/game/perfect.png":1==this.gradeCount&&(this.gradeImg.skin="res/imgs/game/good.png"),this.scoreGrade.visible=!0,this.gradeAni.play(0,!1)),this.goldIndex++,this.goldNum=0,this.isGood=!0)):(this.gradeCount=0,this.isGood=!1,this.goldNum==this.goldCountArr[this.goldIndex]&&(this.goldIndex++,this.goldNum=0,this.isGood=!0))):(this.gradeCount=0,this.isGood=!1)}updateScore(){this.scoreTxt.text=this.curScore+""}gameOver(){this.timeTxt.text="00:00`00",this.model.isPlaying=!1,this.model.isStarGame=!1,this.startBg.visible=!1,this.startBg.visible=!0,this.startOrOverBg.visible=!0,this.startOrOverImg.skin="res/imgs/game/text_finsh.png",this.removeEvent(),this.removeJumpEvent(),this.player.isGO=!1,this.player.backSpeed=this.model.backSpeed,this.player.playStopRun(),this.gameOverAni.play(0,!1);let e=0;switch(this.model.gameType){case 1:this.curScore>this.model.level1HighScoreData&&(this.isScoreHigh=!0,this.model.setLevel1HighSocreData(this.curScore)),e=this.model.level1HighScoreData;break;case 2:this.curScore>this.model.level2HighScoreData&&(this.isScoreHigh=!0,this.model.setLevel2HighSocreData(this.curScore)),e=this.model.level2HighScoreData;break;case 3:this.curScore>this.model.level3HighScoreData&&(this.isScoreHigh=!0,this.model.setLevel3HighSocreData(this.curScore)),e=this.model.level3HighScoreData}c.onGameEnd(this.model.gameType,this.curScore,0,0,0,e=>{this.gameOverData=e,this.event("onGameEnd",e)}),Laya.timer.once(300,this,()=>{this.player.playStandby(),Laya.timer.once(2500,this,()=>{this.runWayAni.stop(),this.pd_LigthImg.skin="res/imgs/game/bg/pd_dark.png",Laya.timer.once(1e3,this,()=>{R.view.resultView.show(this.curScore,this.addSocre,this.subSocre,e,this.isScoreHigh,this.exchangeCDTime(1e3*R.dataManager.getLevelConfig(this.model.gameType,0).time))})})})}onDisable(){super.onDisable(),this.removeEvent(),this.removeJumpEvent(),Laya.timer.clear(this,this.animate),Laya.timer.clear(this,this.updatePlayer)}destroy(){super.destroy(),Laya.Tween.clearAll(this.player),Laya.timer.clearAll(this),this.enemies&&core.ObjectUtil.destroyList(...this.enemies),this.socreTxtArr&&core.ObjectUtil.destroyList(...this.socreTxtArr),this.model=null,this.player.destroy(),this.player=null,this.enemies=null}resetGame(){switch(core.SoundManager.stopAllSound(),Laya.timer.clear(this,this.animate),Laya.timer.clear(this,this.updatePlayer),this.enemies&&core.ObjectUtil.destroyList(...this.enemies),this.enemies=[],this.curScore=0,this.subSocre=0,this.addSocre=0,this.updateScore(),this.model.reset(),this.player.reset(),this.runWayAni.interval=16.6,this.runWayAni.stop(),this.pd_LigthImg.skin="res/imgs/game/bg/pd_dark.png",this.startBg.visible=!0,this.model.isPlaying=!1,this.model.isStarGame=!1,this.isScoreHigh=!1,this.countNum=1,this.curTime=1e3*R.dataManager.getLevelConfig(this.model.gameType,0).time,this.timeTxt.text=this.exchangeCDTime(this.curTime),this.keyDownList=[],this.createPosTime=[],this.socreTxtArr=[],this.playerShadow.x=this.player.x-80,this.goldIndex=0,this.goldNum=0,this.gradeCount=0,this.stepCount=0,this.model.jumpCount=0,this.runCountTime=this.model.runCountTime,this.jumpCountTime=this.model.jumpCountTime,this.huaryUpAniL.stop(),this.huaryUpAniR.stop(),this.huaryUpAniL.visible=!1,this.huaryUpAniR.visible=!1,this.gameOverData=null,this.model.gameType){case 1:this.highScoreTxt.text=this.model.level1HighScoreData+"";break;case 2:this.highScoreTxt.text=this.model.level2HighScoreData+"";break;case 3:this.highScoreTxt.text=this.model.level3HighScoreData+""}for(let e=0;e<this.createPosArr.length;e++)this.createPosArr[e]&&(this.createPosArr[e].skin="res/imgs/game/bg/led_dark.png");this.player.pos(this.startPosImg.x,this.startPosImg.y),this.addJumpEvent(),this.removeEvent(),this.addEvent(),this.selfRank=0,c.getRank(0,e=>{for(let t=0;t<e[1].list.length;t++)if(e[1].list[t].user.id==this.model.selfInfo.id){this.selfRank=e[1].list[t].rank,log("自己当前排行",this.selfRank);break}})}show(e){Laya.stage.addChild(this),this.model.gameType=e,1==this.model.gameType?(this.gametypeTxt.text="简单",this.levelConfig=R.dataManager.levelConfig1,this.goldCountArr=R.dataManager.goldCountArr1):2==this.model.gameType?(this.gametypeTxt.text="中等",this.levelConfig=R.dataManager.levelConfig2,this.goldCountArr=R.dataManager.goldCountArr2):3==this.model.gameType&&(this.gametypeTxt.text="困难",this.levelConfig=R.dataManager.levelConfig3,this.goldCountArr=R.dataManager.goldCountArr3),this.resetGame(),this.startGame()}}class _ extends i.ui.HomeViewUI{constructor(){super(),this.index=1,this.exitIndex=1,Laya.stage.frameRate=Laya.Stage.FRAME_FAST}onAwake(){super.onAwake()}onEnable(){super.onEnable(),this.addEvent(),this.noBtn.on(Laya.Event.CLICK,this,this.onClick),this.yesBtn.on(Laya.Event.CLICK,this,this.onClick),this.index=1,this.setSkin(),this.openAni.play(0,!1),this.level1TimeTxt.text=this.exchangeCDTime(1e3*R.dataManager.getLevelConfig(1,0).time),this.level2TimeTxt.text=this.exchangeCDTime(1e3*R.dataManager.getLevelConfig(2,0).time),this.level3TimeTxt.text=this.exchangeCDTime(1e3*R.dataManager.getLevelConfig(3,0).time),this.level1ScoreTxt.text=R.model.level1HighScoreData.toString(),this.level2ScoreTxt.text=R.model.level2HighScoreData.toString(),this.level3ScoreTxt.text=R.model.level3HighScoreData.toString(),R.model.selfInfo.avatar&&(this.avatarImg.skin=R.model.selfInfo.avatar),this.nameTxt.text=R.model.selfInfo.nickname,core.SoundManager.stopMusic()}addEvent(){this.level1.on(Laya.Event.CLICK,this,this.onClick),this.level2.on(Laya.Event.CLICK,this,this.onClick),this.level3.on(Laya.Event.CLICK,this,this.onClick),this.rankBtn.on(Laya.Event.CLICK,this,this.onClick),this.settingBtn.on(Laya.Event.CLICK,this,this.onClick),this.homeBtn.on(Laya.Event.CLICK,this,this.onClick),Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown),c.on(g.BACK_LEFT.toString(),this.KeyUp,this),c.on(g.BACK_RIGHT.toString(),this.KeyDown,this),c.on(g.ENTER_KEY.toString(),this.KeyEnter,this),c.on(g.CANCLE_KEY.toString(),this.showExitGameView,this)}removeEvent(){this.level1.off(Laya.Event.CLICK,this,this.onClick),this.level2.off(Laya.Event.CLICK,this,this.onClick),this.level3.off(Laya.Event.CLICK,this,this.onClick),this.rankBtn.off(Laya.Event.CLICK,this,this.onClick),this.settingBtn.off(Laya.Event.CLICK,this,this.onClick),this.homeBtn.off(Laya.Event.CLICK,this,this.onClick),Laya.stage.off(Laya.Event.KEY_DOWN,this,this.onkeydown),c.off(g.BACK_LEFT.toString(),this.KeyUp),c.off(g.BACK_RIGHT.toString(),this.KeyDown),c.off(g.ENTER_KEY.toString(),this.KeyEnter),c.off(g.CANCLE_KEY.toString(),this.showExitGameView)}KeyUp(){this.exitBg.visible?1==this.exitIndex?(this.exitIndex=2,this.yesBtn.skin="res/imgs/game/btn_tyxz.png",this.yesTxtImg.skin="res/imgs/game/text_qd1.png",this.noBtn.skin="res/imgs/game/btn_tywxz.png",this.noTxtImg.skin="res/imgs/game/text_qx2.png"):(this.exitIndex=1,this.yesBtn.skin="res/imgs/game/btn_tywxz.png",this.yesTxtImg.skin="res/imgs/game/text_qd2.png",this.noBtn.skin="res/imgs/game/btn_tyxz.png",this.noTxtImg.skin="res/imgs/game/text_qx1.png"):(this.index>1?this.index--:this.index=3,this.setSkin())}KeyDown(){this.exitBg.visible?1==this.exitIndex?(this.exitIndex=2,this.yesBtn.skin="res/imgs/game/btn_tyxz.png",this.yesTxtImg.skin="res/imgs/game/text_qd1.png",this.noBtn.skin="res/imgs/game/btn_tywxz.png",this.noTxtImg.skin="res/imgs/game/text_qx2.png"):(this.exitIndex=1,this.yesBtn.skin="res/imgs/game/btn_tywxz.png",this.yesTxtImg.skin="res/imgs/game/text_qd2.png",this.noBtn.skin="res/imgs/game/btn_tyxz.png",this.noTxtImg.skin="res/imgs/game/text_qx1.png"):(this.index<3?this.index++:this.index=1,this.setSkin())}KeyEnter(){this.exitBtnBg.visible?1==this.exitIndex?this.hideExitGameView():c.onBackPressed():this.startGame(this.index)}onkeydown(e){Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.LEFT)&&this.KeyUp(),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.RIGHT)&&this.KeyDown(),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.ENTER)&&this.KeyEnter()}onClick(e){switch(e.currentTarget){case this.level1:this.index=1,this.setSkin(),this.startGame(1);break;case this.level2:this.index=2,this.setSkin(),this.startGame(2);break;case this.level3:this.index=3,this.setSkin(),this.startGame(3);break;case this.rankBtn:this.showRankView();break;case this.settingBtn:this.showSettingView();break;case this.homeBtn:this.showExitGameView();break;case this.noBtn:this.hideExitGameView();break;case this.yesBtn:c.onBackPressed()}}setSkin(){switch(this.index){case 1:this.level1.gray=!1,this.level1.alpha=1,this.level1.scale(1.2,1.2),this.level2.gray=!0,this.level2.alpha=.8,this.level2.scale(1.1,1.1),this.level3.gray=!0,this.level3.alpha=.8,this.level3.scale(1.1,1.1);break;case 2:this.level1.gray=!0,this.level1.alpha=.8,this.level1.scale(1.1,1.1),this.level2.gray=!1,this.level2.alpha=1,this.level2.scale(1.2,1.2),this.level3.gray=!0,this.level3.alpha=.8,this.level3.scale(1.1,1.1);break;case 3:this.level1.gray=!0,this.level1.alpha=.8,this.level1.scale(1.1,1.1),this.level2.gray=!0,this.level2.alpha=.8,this.level2.scale(1.1,1.1),this.level3.gray=!1,this.level3.alpha=1,this.level3.scale(1.2,1.2)}}startGame(e){let t;switch(this.index){case 1:t=this.level1;break;case 2:t=this.level2;break;case 3:t=this.level3}Laya.Tween.to(t,{scaleX:.95,scaleY:.95},100,null,Laya.Handler.create(this,()=>{Laya.timer.once(300,this,()=>{R.view.gameView.show(e),R.view.hideHomeView()})}))}showRankView(){Laya.Tween.to(this.rankBtn,{scaleX:.95,scaleY:.95},100,null,Laya.Handler.create(this,()=>{Laya.timer.once(300,this,()=>{R.view.rankView.getRank(),R.view.rankView.show(),R.view.hideHomeView()})}))}showSettingView(){Laya.Tween.to(this.settingBtn,{scaleX:.95,scaleY:.95},100,null,Laya.Handler.create(this,()=>{Laya.timer.once(300,this,()=>{R.view.settingView.show(),R.view.hideHomeView()})}))}showExitGameView(){this.exitBg.visible=!0,this.exitBtnBg.visible=!0}hideExitGameView(){this.exitBg.visible=!1,this.exitBtnBg.visible=!1,this.addEvent()}exchangeCDTime(e){let t=parseInt(e/1e3/60%60+""),i=parseInt(e/1e3%60+""),s=e%100;return t<10&&(t="0"+t),i<10&&(i="0"+i),s<10&&(s="0"+s),t+":"+i+"`"+s}onDisable(){super.onDisable(),this.removeEvent(),this.noBtn.off(Laya.Event.CLICK,this,this.onClick),this.yesBtn.on(Laya.Event.CLICK,this,this.onClick)}destroy(){super.destroy()}show(){Laya.stage.addChild(this)}}class L extends i.ui.RankViewUI{constructor(){super(),this.selfInfo={id:1,nickname:"nickname",gender:1,avatar:""},this.friendInfoList=[{user:{id:1,nickname:"nickname",gender:1,avatar:""},score:100,rank:1}],this.wordInfoList=[{user:{id:1,nickname:"nickname",gender:1,avatar:""},score:100,rank:1}],this.testInfo={index:1,id:1,name:"Self",gender:1,avatar:"",score:R.model.allHighScoreData,rank:100},this.rankType=1,this.wordInfoList=[],this.friendInfoList=[],this.rankList.vScrollBarSkin=""}getRank(){window.SDKBridge||(this.rankList.visible=!0,this.showWordRank()),c.getUserInfo(e=>{this.selfInfo=e,log("info",e),c.getRank(1,e=>{this.friendInfoList=e[1].list,log("获取好友排行榜信息",this.friendInfoList,e[1].list),c.getRank(0,e=>{this.wordInfoList=e[1].list,log("获取世界排行榜信息",this.wordInfoList,e[1].list),this.rankList.visible=!0,this.showWordRank()})})})}notRankInfo(){let e=[],t={index:1,id:1,name:"nickname",gender:1,avatar:"",score:R.model.allHighScoreData,rank:1};return e.push(t),this.testInfo=e[0],e}setSelfInfo(e){let t=100,i=R.model.allHighScoreData;switch(e){case 1:for(let e=0;e<this.wordInfoList.length;e++)this.wordInfoList[e].user.id==this.selfInfo.id&&(t=this.wordInfoList[e].rank,i=this.wordInfoList[e].score,this.scoreTxt.text=i.toString());break;case 2:for(let e=0;e<this.friendInfoList.length;e++)this.friendInfoList[e].user.id==this.selfInfo.id&&(t=this.friendInfoList[e].rank,i=this.friendInfoList[e].score,this.scoreTxt.text=i.toString());break;case 3:t=this.testInfo.rank}if(t<100){if(t<=3)switch(t){case 1:this.winImg.skin="res/imgs/rank/icon_diyi.png";break;case 2:this.winImg.skin="res/imgs/rank/icon_dier.png";break;case 3:this.winImg.skin="res/imgs/rank/icon_disan.png"}this.winImg.visible=!0,this.loseImg.visible=!1,this.rankTxt.visible=!0,this.rankTxt.value=t.toString()}else this.winImg.visible=!1,this.loseImg.visible=!0,this.rankTxt.visible=!1;this.selfInfo.avatar&&(this.avatarImg.skin=this.selfInfo.avatar),this.nameTxt.text=this.selfInfo.nickname}onEnable(){super.onEnable(),this.addEvent()}addEvent(){this.friendBtn.on(Laya.Event.CLICK,this,this.onClick),this.wordBtn.on(Laya.Event.CLICK,this,this.onClick),this.closeBtn.on(Laya.Event.CLICK,this,this.onClick),this.on(Laya.Event.CLICK,this,this.onClick)}removeEvent(){this.friendBtn.off(Laya.Event.CLICK,this,this.onClick),this.wordBtn.off(Laya.Event.CLICK,this,this.onClick),this.closeBtn.off(Laya.Event.CLICK,this,this.onClick),this.closeBtn.off(Laya.Event.CLICK,this,this.onClick),this.off(Laya.Event.CLICK,this,this.onClick)}onClick(e){switch(e.currentTarget){case this.friendBtn:this.showFriendRank();break;case this.wordBtn:this.showWordRank();break;case this.closeBtn:R.view.homeView.show(),R.view.hideRankView()}}showFriendRank(){1!=this.rankType&&(this.rankType=1,this.friendBg.visible=!0,this.wordBg.visible=!1,this.friendInfoList.length>0?(this.rankList.array=this.getFriendRankList(),this.setSelfInfo(2)):(this.rankList.array=[],this.setSelfInfo(3)),this.rankList.refresh(),this.openAni.play(0,!1))}showWordRank(){2!=this.rankType&&(this.rankType=2,this.friendBg.visible=!1,this.wordBg.visible=!0,this.wordInfoList.length>0?(this.rankList.array=this.getWordRankList(),this.setSelfInfo(1)):(this.rankList.array=[],this.setSelfInfo(3)),this.rankList.refresh(),this.openAni.play(0,!1))}getFriendRankList(){let e=[];for(let t=0;t<this.friendInfoList.length&&100!=t;t++)e.push({index:t,name:this.friendInfoList[t].user.nickname,gender:this.friendInfoList[t].user.gender,avatar:this.friendInfoList[t].user.avatar,score:this.friendInfoList[t].score,rank:this.friendInfoList[t].rank});return e}getWordRankList(){let e=[];for(let t=0;t<this.wordInfoList.length&&100!=t;t++)e.push({index:t,name:this.wordInfoList[t].user.nickname,gender:this.wordInfoList[t].user.gender,avatar:this.wordInfoList[t].user.avatar,score:this.wordInfoList[t].score,rank:this.wordInfoList[t].rank});return e}onDisable(){super.onDisable(),this.removeEvent()}destroy(){super.destroy()}show(){Laya.stage.addChild(this)}}class S extends i.ui.ResultViewUI{constructor(){super(),this.index=1,this.rankIndex=0}onAwake(){super.onAwake()}onEnable(){super.onEnable(),this.addEvent(),this.index=1,this.setSkin()}setRank(){R.view.gameView.gameOverData?(this.caloriesTxt.text=`${R.view.gameView.gameOverData.consume}`,this.stepTxt.text=`${R.view.gameView.gameOverData.equivalent}`):(this.caloriesTxt.text="等待结算中",this.stepTxt.text="等待结算中",log("等待结算中"),R.view.gameView.once("onGameEnd",this,this.updateInfo)),window.SDKBridge||(this.noRank1.visible=!0,this.pmFontClip1.visible=!1,R.model.selfInfo.avatar&&(this.avatarImg1.skin=R.model.selfInfo.avatar),this.nameTxt1.text=R.model.selfInfo.nickname,this.nameTxt1.color="#ffd905",this.rankScore1.text=this.scoreTxt.text+"分",this.rankScore1.color="#ffd905",this.rank1.visible=!0),c.getRank(0,e=>{this.wordRankInfo=e[1].list,log("世界排行榜",this.wordRankInfo);for(let e=0;e<this.wordRankInfo.length;e++)if(this.wordRankInfo[e].user.id==R.model.selfInfo.id){this.selfInfo=this.wordRankInfo[e],log("自己的信息",this.selfInfo);break}this.selfInfo?(1==this.wordRankInfo.length?(this.pmFontClip1.value=`${this.selfInfo.rank}`,this.pmFontClip1.skin="res/imgs/result/text_pm_num.png",R.model.selfInfo.avatar&&(this.avatarImg1.skin=R.model.selfInfo.avatar),this.nameTxt1.text=R.model.selfInfo.nickname,this.nameTxt1.color="#ffd905",this.nameTxt1.fontSize=38,this.rankScore1.text=`${this.selfInfo.score}分`,this.rankScore1.color="#ffd905",this.rankScore1.fontSize=45,this.rank1.visible=!0,this.rankIndex=1):2==this.wordRankInfo.length?(1==this.selfInfo.rank?(this.pmFontClip2.value=`${this.wordRankInfo[1].rank}`,this.wordRankInfo[1].user.avatar&&(this.avatarImg2.skin=this.wordRankInfo[1].user.avatar),this.nameTxt2.text=this.wordRankInfo[1].user.nickname,this.rankScore2.text=`${this.wordRankInfo[1].score}分`,this.pmFontClip1.value=this.selfInfo.rank,this.pmFontClip1.skin="res/imgs/result/text_pm_num.png",R.model.selfInfo.avatar&&(this.avatarImg1.skin=R.model.selfInfo.avatar),this.nameTxt1.text=R.model.selfInfo.nickname,this.nameTxt1.color="#ffd905",this.nameTxt1.fontSize=38,this.rankScore1.text=`${this.selfInfo.score}分`,this.rankScore1.color="#ffd905",this.rankScore1.fontSize=45,this.rankIndex=1):(this.pmFontClip1.value=`${this.wordRankInfo[0].rank}`,this.wordRankInfo[0].user.avatar&&(this.avatarImg1.skin=this.wordRankInfo[0].user.avatar),this.nameTxt1.text=this.wordRankInfo[0].user.nickname,this.rankScore1.text=`${this.wordRankInfo[0].score}分`,this.pmFontClip2.value=this.selfInfo.rank,this.pmFontClip2.skin="res/imgs/result/text_pm_num.png",R.model.selfInfo.avatar&&(this.avatarImg2.skin=R.model.selfInfo.avatar),this.nameTxt2.text=R.model.selfInfo.nickname,this.nameTxt2.color="#ffd905",this.nameTxt2.fontSize=38,this.rankScore2.text=`${this.selfInfo.score}分`,this.rankScore2.color="#ffd905",this.rankScore2.fontSize=45,this.rankIndex=2),this.rank1.visible=!0,this.rank2.visible=!0):this.wordRankInfo.length>=3&&(1==this.selfInfo.rank?(this.pmFontClip2.value=`${this.wordRankInfo[1].rank}`,this.wordRankInfo[1].user.avatar&&(this.avatarImg2.skin=this.wordRankInfo[1].user.avatar),this.nameTxt2.text=this.wordRankInfo[1].user.nickname,this.rankScore2.text=`${this.wordRankInfo[1].score}分`,this.pmFontClip3.value=`${this.wordRankInfo[2].rank}`,this.wordRankInfo[2].user.avatar&&(this.avatarImg3.skin=this.wordRankInfo[2].user.avatar),this.nameTxt3.text=this.wordRankInfo[2].user.nickname,this.rankScore3.text=`${this.wordRankInfo[2].score}分`,this.pmFontClip1.value=this.selfInfo.rank,this.pmFontClip1.skin="res/imgs/result/text_pm_num.png",R.model.selfInfo.avatar&&(this.avatarImg1.skin=R.model.selfInfo.avatar),this.nameTxt1.text=R.model.selfInfo.nickname,this.nameTxt1.color="#ffd905",this.nameTxt1.fontSize=38,this.rankScore1.text=`${this.selfInfo.score}分`,this.rankScore1.color="#ffd905",this.rankScore1.fontSize=45,this.rankIndex=1):this.selfInfo.rank==this.wordRankInfo.length?(this.pmFontClip1.value=`${this.wordRankInfo[this.selfInfo.rank-1-2].rank}`,this.wordRankInfo[this.selfInfo.rank-1-2].user.avatar&&(this.avatarImg1.skin=this.wordRankInfo[this.selfInfo.rank-1-2].user.avatar),this.nameTxt1.text=this.wordRankInfo[this.selfInfo.rank-1-2].user.nickname,this.rankScore1.text=`${this.wordRankInfo[this.selfInfo.rank-1-2].score}分`,this.pmFontClip3.value=this.selfInfo.rank,this.pmFontClip3.skin="res/imgs/result/text_pm_num.png",R.model.selfInfo.avatar&&(this.avatarImg3.skin=R.model.selfInfo.avatar),this.nameTxt3.text=R.model.selfInfo.nickname,this.nameTxt3.color="#ffd905",this.nameTxt3.fontSize=38,this.rankScore3.text=`${this.selfInfo.score}分`,this.rankScore3.color="#ffd905",this.rankScore3.fontSize=45,this.pmFontClip2.value=`${this.wordRankInfo[this.selfInfo.rank-1-1].rank}`,this.wordRankInfo[this.selfInfo.rank-1-1].user.avatar&&(this.avatarImg2.skin=this.wordRankInfo[this.selfInfo.rank-1-1].user.avatar),this.nameTxt2.text=this.wordRankInfo[this.selfInfo.rank-1-1].user.nickname,this.rankScore2.text=`${this.wordRankInfo[this.selfInfo.rank-1-1].score}分`,this.rankIndex=3):(this.pmFontClip1.value=`${this.wordRankInfo[this.selfInfo.rank-1-1].rank}`,this.wordRankInfo[this.selfInfo.rank-1-1].user.avatar&&(this.avatarImg1.skin=this.wordRankInfo[this.selfInfo.rank-1-1].user.avatar),this.nameTxt1.text=this.wordRankInfo[this.selfInfo.rank-1-1].user.nickname,this.rankScore1.text=`${this.wordRankInfo[this.selfInfo.rank-1-1].score}分`,this.pmFontClip2.value=this.selfInfo.rank,this.pmFontClip2.skin="res/imgs/result/text_pm_num.png",R.model.selfInfo.avatar&&(this.avatarImg2.skin=R.model.selfInfo.avatar),this.nameTxt2.text=R.model.selfInfo.nickname,this.nameTxt2.color="#ffd905",this.nameTxt2.fontSize=38,this.rankScore2.text=`${this.selfInfo.score}分`,this.rankScore2.color="#ffd905",this.rankScore2.fontSize=45,this.pmFontClip3.value=`${this.wordRankInfo[this.selfInfo.rank-1+1].rank}`,this.wordRankInfo[this.selfInfo.rank-1+1].user.avatar&&(this.avatarImg3.skin=this.wordRankInfo[this.selfInfo.rank-1+1].user.avatar),this.nameTxt3.text=this.wordRankInfo[this.selfInfo.rank-1+1].user.nickname,this.rankScore3.text=`${this.wordRankInfo[this.selfInfo.rank-1+1].score}分`,this.rankIndex=2),this.rank1.visible=!0,this.rank2.visible=!0,this.rank3.visible=!0),this.selfInfo.rank==R.view.gameView.selfRank?1==this.rankIndex?(this.pmImg1.visible=!0,this.pmImg1.skin="res/imgs/result/icon_pmwsb.png"):2==this.rankIndex?(this.pmImg2.visible=!0,this.pmImg2.skin="res/imgs/result/icon_pmwsb.png"):3==this.rankIndex&&(this.pmImg3.visible=!0,this.pmImg3.skin="res/imgs/result/icon_pmwsb.png"):this.selfInfo.rank<R.view.gameView.selfRank?1==this.rankIndex?(this.pmImg1.visible=!0,this.pmImg1.skin="res/imgs/result/icon_pmss.png"):2==this.rankIndex?(this.pmImg2.visible=!0,this.pmImg2.skin="res/imgs/result/icon_pmss.png"):3==this.rankIndex&&(this.pmImg3.visible=!0,this.pmImg3.skin="res/imgs/result/icon_pmss.png"):1==this.rankIndex?(this.pmImg1.visible=!0,this.pmImg1.skin="res/imgs/result/icon_pmxj.png"):2==this.rankIndex?(this.pmImg2.visible=!0,this.pmImg2.skin="res/imgs/result/icon_pmxj.png"):3==this.rankIndex&&(this.pmImg3.visible=!0,this.pmImg3.skin="res/imgs/result/icon_pmxj.png")):0==this.wordRankInfo.length?(this.noRank1.visible=!0,this.pmFontClip1.visible=!1,R.model.selfInfo.avatar&&(this.avatarImg1.skin=R.model.selfInfo.avatar),this.nameTxt1.text=R.model.selfInfo.nickname,this.nameTxt1.color="#ffd905",this.nameTxt1.fontSize=38,this.rankScore1.text=this.scoreTxt.text+"分",this.rankScore1.color="#ffd905",this.rankScore1.fontSize=45,this.rank1.visible=!0,this.rankIndex=1):1==this.wordRankInfo.length?(this.pmFontClip1.value=`${this.wordRankInfo[0].rank}`,this.wordRankInfo[0].user.avatar&&(this.avatarImg1.skin=this.wordRankInfo[0].user.avatar),this.nameTxt1.text=this.wordRankInfo[0].user.nickname,this.rankScore1.text=`${this.wordRankInfo[0].score}分`,this.noRank2.visible=!0,this.pmFontClip2.visible=!1,R.model.selfInfo.avatar&&(this.avatarImg2.skin=R.model.selfInfo.avatar),this.nameTxt2.text=R.model.selfInfo.nickname,this.nameTxt2.color="#ffd905",this.nameTxt2.fontSize=38,this.rankScore2.text=this.scoreTxt.text+"分",this.rankScore2.color="#ffd905",this.rankScore2.fontSize=45,this.rank1.visible=!0,this.rank2.visible=!0,this.rankIndex=2):this.wordRankInfo.length>=2&&(this.pmFontClip1.value=`${this.wordRankInfo[0].rank}`,this.wordRankInfo[0].user.avatar&&(this.avatarImg1.skin=this.wordRankInfo[0].user.avatar),this.nameTxt1.text=this.wordRankInfo[0].user.nickname,this.rankScore1.text=`${this.wordRankInfo[0].score}分`,this.pmFontClip2.value=`${this.wordRankInfo[1].rank}`,this.wordRankInfo[1].user.avatar&&(this.avatarImg2.skin=this.wordRankInfo[0].user.avatar),this.nameTxt2.text=this.wordRankInfo[1].user.nickname,this.rankScore2.text=`${this.wordRankInfo[1].score}分`,this.noRank3.visible=!0,this.pmFontClip3.visible=!1,R.model.selfInfo.avatar&&(this.avatarImg3.skin=R.model.selfInfo.avatar),this.nameTxt3.text=R.model.selfInfo.nickname,this.nameTxt3.color="#ffd905",this.nameTxt3.fontSize=38,this.rankScore3.text=this.scoreTxt.text+"分",this.rankScore3.color="#ffd905",this.rankScore3.fontSize=45,this.rankIndex=3,this.rank1.visible=!0,this.rank2.visible=!0,this.rank3.visible=!0)})}addEvent(){this.homeBtn.on(Laya.Event.CLICK,this,this.onClick),this.resetBtn.on(Laya.Event.CLICK,this,this.onClick),Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown),c.on(g.BACK_LEFT.toString(),this.KeyUp,this),c.on(g.BACK_RIGHT.toString(),this.KeyDown,this),c.on(g.ENTER_KEY.toString(),this.KeyEnter,this)}removeEvent(){this.homeBtn.off(Laya.Event.CLICK,this,this.onClick),this.resetBtn.off(Laya.Event.CLICK,this,this.onClick),Laya.stage.off(Laya.Event.KEY_DOWN,this,this.onkeydown),c.off(g.BACK_LEFT.toString(),this.KeyUp),c.off(g.BACK_RIGHT.toString(),this.KeyDown),c.off(g.ENTER_KEY.toString(),this.KeyEnter)}KeyUp(){this.index>1?this.index--:this.index=2,this.setSkin()}KeyDown(){this.index<2?this.index++:this.index=1,this.setSkin()}KeyEnter(){switch(this.index){case 1:this.index=1,this.setSkin(),R.view.homeView.show(),R.view.hideGameView(),R.view.hideResultView();break;case 2:this.index=2,this.setSkin(),core.SoundManager.stopMusic(),R.view.gameView.resetGame(),R.view.gameView.startGame()}R.view.hideResultView()}onClick(e){switch(e.currentTarget){case this.homeBtn:R.view.homeView.show(),R.view.hideGameView();break;case this.resetBtn:core.SoundManager.stopMusic(),R.view.gameView.resetGame(),R.view.gameView.startGame()}R.view.hideResultView()}onkeydown(e){Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.LEFT)&&this.KeyUp(),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.RIGHT)&&this.KeyDown(),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.ENTER)&&this.KeyEnter()}setSkin(){switch(this.index){case 1:this.homeBtn.skin="res/imgs/result/btom_bright.png",this.homeImg.skin="res/imgs/result/text_an_fhb.png",this.resetBtn.skin="res/imgs/result/btom_dark.png",this.resetImg.skin="res/imgs/result/text_an_zld.png";break;case 2:this.homeBtn.skin="res/imgs/result/btom_dark.png",this.homeImg.skin="res/imgs/result/text_an_fhd.png",this.resetBtn.skin="res/imgs/result/btom_bright.png",this.resetImg.skin="res/imgs/result/text_an_zlb.png"}}updateInfo(e){log("onGameEnd",e),this.caloriesTxt.text=`${e.consume}`,this.stepTxt.text=`${e.equivalent}`}onDisable(){super.onDisable(),this.removeEvent()}destroy(){super.destroy()}show(e,t,i,s,a=!1,n){this.setRank(),this.scoreTxt.text=e.toString(),this.addScoreTxt.text=`+${t}`,this.subScoreTxt.text=`-${i}`,this.timeTxt.text=n,Laya.stage.addChild(this)}}class C extends i.ui.PauseViewUI{constructor(){super(),this.index=1}onAwake(){super.onAwake()}onEnable(){super.onEnable(),this.addEvent(),this.index=1}addEvent(){this.continueBtn.on(Laya.Event.CLICK,this,this.onClick),this.resetBtn.on(Laya.Event.CLICK,this,this.onClick),this.exitBtn.on(Laya.Event.CLICK,this,this.onClick),Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown),c.on(g.BACK_LEFT.toString(),this.KeyUp,this),c.on(g.BACK_RIGHT.toString(),this.KeyDown,this),c.on(g.ENTER_KEY.toString(),this.KeyEnter,this)}removeEvent(){this.continueBtn.off(Laya.Event.CLICK,this,this.onClick),this.resetBtn.off(Laya.Event.CLICK,this,this.onClick),this.exitBtn.off(Laya.Event.CLICK,this,this.onClick),Laya.stage.off(Laya.Event.KEY_DOWN,this,this.onkeydown),c.off(g.BACK_LEFT.toString(),this.KeyUp),c.off(g.BACK_RIGHT.toString(),this.KeyDown),c.off(g.ENTER_KEY.toString(),this.KeyEnter)}KeyUp(){this.index>1?this.index--:this.index=3,this.setSkin()}KeyDown(){this.index<3?this.index++:this.index=1,this.setSkin()}KeyEnter(){switch(this.index){case 1:R.view.gameView.continueGame();break;case 2:core.SoundManager.stopMusic(),R.view.gameView.resetGame(),R.view.gameView.startGame();break;case 3:R.view.gameView.exitGame()}R.view.hidePauseViewView()}onClick(e){switch(e.currentTarget){case this.continueBtn:R.view.gameView.continueGame();break;case this.resetBtn:core.SoundManager.stopMusic(),R.view.gameView.resetGame(),R.view.gameView.startGame();break;case this.exitBtn:R.view.gameView.exitGame()}R.view.hidePauseViewView()}onkeydown(e){Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.UP)&&this.KeyUp(),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.DOWN)&&this.KeyDown(),Laya.KeyBoardManager.hasKeyDown(Laya.Keyboard.ENTER)&&this.KeyEnter()}setSkin(){switch(this.index){case 1:this.continueBtn.skin="res/imgs/game/btom_bright.png",this.continueImg.skin="res/imgs/game/text_jxb.png",this.resetBtn.skin="res/imgs/game/btom_dark.png",this.resetImg.skin="res/imgs/game/text_ckd.png",this.exitBtn.skin="res/imgs/game/btom_dark.png",this.exitImg.skin="res/imgs/game/text_tcd.png";break;case 2:this.continueBtn.skin="res/imgs/game/btom_dark.png",this.continueImg.skin="res/imgs/game/text_jxd.png",this.resetBtn.skin="res/imgs/game/btom_bright.png",this.resetImg.skin="res/imgs/game/text_ckb.png",this.exitBtn.skin="res/imgs/game/btom_dark.png",this.exitImg.skin="res/imgs/game/text_tcd.png";break;case 3:this.continueBtn.skin="res/imgs/game/btom_dark.png",this.continueImg.skin="res/imgs/game/text_jxd.png",this.resetBtn.skin="res/imgs/game/btom_dark.png",this.resetImg.skin="res/imgs/game/text_ckd.png",this.exitBtn.skin="res/imgs/game/btom_bright.png",this.exitImg.skin="res/imgs/game/text_tcb.png"}}onDisable(){super.onDisable(),this.removeEvent()}destroy(){super.destroy()}show(){Laya.stage.addChild(this)}}class M extends i.ui.SettingViewUI{constructor(){super()}onAwake(){super.onAwake()}onEnable(){super.onEnable(),this.addEvent(),this.btnMusic.x=366*core.SoundManager.musicVolume,this.btnSound.x=366*core.SoundManager.soundVolume,this.musicBarMask.x=core.SoundManager.musicVolume*this.musicBar.width-this.musicBar.width,this.soundBarMask.x=core.SoundManager.soundVolume*this.soundBar.width-this.soundBar.width,this.musicTxt.text=Math.ceil(100*core.SoundManager.musicVolume)+"%",this.soundTxt.text=Math.ceil(100*core.SoundManager.soundVolume)+"%"}addEvent(){this.btnMusic.on(Laya.Event.MOUSE_DOWN,this,this.musicMouseDown),this.btnSound.on(Laya.Event.MOUSE_DOWN,this,this.soundMouseDown),this.closeBtn.on(Laya.Event.CLICK,this,this.onClick)}removeEvent(){this.btnMusic.off(Laya.Event.MOUSE_DOWN,this,this.musicMouseDown),this.btnSound.off(Laya.Event.MOUSE_DOWN,this,this.soundMouseDown),this.btnSound.off(Laya.Event.CLICK,this,this.onClick),this.closeBtn.off(Laya.Event.CLICK,this,this.onClick),Laya.stage.off(Laya.Event.MOUSE_UP,this,this.mouseUp),Laya.stage.off(Laya.Event.MOUSE_MOVE,this,this.musicMousMove),Laya.stage.off(Laya.Event.MOUSE_MOVE,this,this.soundMousMove)}musicMouseDown(){Laya.stage.on(Laya.Event.MOUSE_MOVE,this,this.musicMousMove),Laya.stage.on(Laya.Event.MOUSE_UP,this,this.mouseUp)}musicMousMove(e){this.btnMusic.x=e.stageX-this.soundBar.x-this.bg.x,this.btnMusic.x<=0&&(this.btnMusic.x=0),this.btnMusic.x>=366&&(this.btnMusic.x=366),this.musicBarMask.x=this.btnMusic.x/366*this.musicBar.width-this.musicBar.width,core.SoundManager.setMusicVolume(this.btnMusic.x/366),this.musicTxt.text=Math.ceil(100*core.SoundManager.musicVolume)+"%"}soundMouseDown(){Laya.stage.on(Laya.Event.MOUSE_MOVE,this,this.soundMousMove),Laya.stage.on(Laya.Event.MOUSE_UP,this,this.mouseUp)}soundMousMove(e){this.btnSound.x=e.stageX-this.soundBar.x-this.bg.x,this.btnSound.x<=0&&(this.btnSound.x=0),this.btnSound.x>=366&&(this.btnSound.x=366),this.soundBarMask.x=this.btnSound.x/366*this.soundBar.width-this.soundBar.width,core.SoundManager.setSoundVolume(this.btnSound.x/366),this.soundTxt.text=Math.ceil(100*core.SoundManager.soundVolume)+"%"}mouseUp(){Laya.stage.off(Laya.Event.MOUSE_UP,this,this.mouseUp),Laya.stage.off(Laya.Event.MOUSE_MOVE,this,this.musicMousMove),Laya.stage.off(Laya.Event.MOUSE_MOVE,this,this.soundMousMove)}onClick(e){switch(e.currentTarget){case this.closeBtn:R.view.homeView.show(),R.view.hideSettingView()}}onDisable(){super.onDisable(),this.removeEvent(),this.destroy()}destroy(){super.destroy()}show(){Laya.stage.addChild(this)}}class E{get homeView(){return this._homeView||(this._homeView=new _),this._homeView}hideHomeView(){this._homeView&&this._homeView.destroy(),this._homeView=null}get gameView(){return this._gameView||(this._gameView=new T),this._gameView}hideGameView(){this._gameView&&this._gameView.destroy(),this._gameView=null}get pauseViewView(){return this._pauseViewView||(this._pauseViewView=new C),this._pauseViewView}hidePauseViewView(){this._pauseViewView&&this._pauseViewView.destroy(),this._pauseViewView=null}get resultView(){return this._resultView||(this._resultView=new S),this._resultView}hideResultView(){this._resultView&&this._resultView.destroy(),this._resultView=null}get rankView(){return this._rankView||(this._rankView=new L),this._rankView}hideRankView(){this._rankView&&this._rankView.destroy(),this._rankView=null}get settingView(){return this._settingView||(this._settingView=new M),this._settingView}hideSettingView(){this._settingView&&this._settingView.destroy(),this._settingView=null}}class R{static init(){this.view=new E,this.model=new f,this.dataManager=new x,this.initFont()}static initFont(){let e=h.fonts;for(let t=0,i=e.length;t<i;t++){let i=e[t];core.FontUtil.registerFont(i.name,i.fntURL,i.pngURL)}}}new class{constructor(){window.Laya3D?Laya3D.init(r.width,r.height):Laya.init(r.width,r.height,Laya.WebGL),Laya.Physics&&Laya.Physics.enable(),Laya.DebugPanel&&Laya.DebugPanel.enable(),Laya.stage.scaleMode=r.scaleMode,Laya.stage.screenMode=r.screenMode,Laya.stage.alignV=r.alignV,Laya.stage.alignH=r.alignH,Laya.URL.exportSceneToJson=r.exportSceneToJson,Laya.ResourceVersion.enable("version.json",Laya.Handler.create(this,this.onVersionLoaded),Laya.ResourceVersion.FILENAME_VERSION)}onVersionLoaded(){Laya.AtlasInfoManager.enable("fileconfig.json",Laya.Handler.create(this,this.onConfigLoaded))}onConfigLoaded(){this.initManager()}initManager(){core.Manager.init(core.GameID.PARKOUR,Laya.Handler.create(this,this.preload))}preload(){y.instance.preLoad(Laya.Handler.create(this,()=>{var e=document.getElementById("engineLoading");e&&e.parentNode.removeChild(e),y.instance.show(),Laya.loader.load(h.preLoadUrls,Laya.Handler.create(this,this.loadComplete),Laya.Handler.create(this,this.onLoading,null,!1),null,1,!0,"preload")}))}onLoading(e,t=!1){y.instance.setProgress(e,t)}loadComplete(){R.init(),R.model.init()}startGame(){R.view.homeView.show()}},log=function(e,...t){}}();
|