class Credits extends Wrapper{constructor(){super("Credits")}preload(){this.audioplayer=this.scene.get("Audio"),this.load.image("truckBg","assets/backgrounds/TruckBg.png")}create(){this.dZone=this.add.zone(0,0,width,height).setOrigin(0).setInteractive().on("pointerup",(function(){})),this.Bg=this.add.image(centerX,centerY,"truckBg").setDisplaySize(this.sys.canvas.width,this.sys.canvas.height).setOrigin(0),this.btnClose=this.add.image(centerX+300,centerY+530,"button_small").setInteractive({useHandCursor:!0}).on("pointerover",(function(t){this.audioplayer.playSFX("ButtonHover"),this.btnClose.setDisplaySize(this.btnClose.displayWidth+5,this.btnClose.displayHeight+5)}),this).on("pointerout",(function(t){this.btnClose.setDisplaySize(this.btnClose.displayWidth-5,this.btnClose.displayHeight-5)}),this),this.Bg.setOrigin(.5),this.btnClose.setScale(1),this.Bg.setAlpha(0),this.btnCloseTxt=this.add.text(this.btnClose.x,this.btnClose.y-5,"Zurück",{align:"center",fontFamily:"Impact",color:"Black",stroke:"White",strokeThickness:1,fontSize:"34px",wordWrap:{width:450}}),this.btnCloseTxt.setOrigin(.5).setShadow(0,4,"rgba(0,0,0,0.25)",5),this.tweens.add({targets:this.Bg,scale:{start:1.2,from:1.2,to:1},alpha:{start:0,from:0,to:.9},ease:"Sine.InOut",duration:500}),this.textDisplay=this.add.text(centerX,400,sData.Credits.text,{align:"center",fontFamily:gameConfig.defaultFont,color:"#FFFFFF",fontSize:"38px",wordWrap:{width:450}}),this.textDisplay.setOrigin(.5),this.timedEvent=this.time.delayedCall(1e3,(function(){this.tweens.add({targets:this.textDisplay,y:-1e3,duration:1e4})}),[],this),this.listenerManager(this)}update(){}listenerManager(t){var e=t;this.btnClose.on("pointerdown",(function(t){e.audioplayer.playSFX("ButtonClick"),e.tweens.add({targets:e.Bg,scale:{start:1,from:1,to:1.2},alpha:{start:1,from:1,to:0},ease:"Sine.InOut",duration:500,onComplete:()=>{e.scene.stop("Credits"),e.scene.start("GameOver")}})}))}}
//# sourceMappingURL=index.b7e8ec96.js.map
