var einsatzPopup={create:function(t={displayScene:"none",cbScene:"none",text:"Auszahlung bei Gewinn:",quote:0,tipp:tipp,callback:null,betData:null}){log("einsatzPopup pData  ",t);let e=t.displayScene;return this.sc=t.displayScene,this.ePop=e.add.group(),currentScene=e,popData=t,cEmitter.once("gameOver",(()=>{this.kill()}),this),null==popData.tipp&&(popData.tipp=-1),this.quote=t.quote,this.gewinn=0,this.derEinsatz=0,this.BGZone=e.add.zone(0,0,width,height).setOrigin(0).setInteractive().on("pointerup",(function(){})),this.popTopBG=e.add.image(centerX,centerY/2,"popupBG").setOrigin(.5).setScale(.9),this.popBottomBG=e.add.image(centerX,centerY+centerY/2,"popupBG").setOrigin(.5).setScale(.9),this.betText=e.add.text(centerX,centerY/2-100,popData.text,{align:"center",fontFamily:"Impact",color:"Black",stroke:"White",strokeThickness:1,fontSize:"64px",wordWrap:{width:650}}).setOrigin(.5),this.gewinnText=e.add.text(centerX,centerY/2+80,"€"+this.gewinn,{align:"center",fontFamily:"Impact",color:"#FFCE06",stroke:"#C96C0B",strokeThickness:9,fontSize:"124px",wordWrap:{width:750}}).setShadow(0,4,"rgba(0,0,0,0.25)",5).setOrigin(.5),this.einsatzText=e.add.text(centerX,centerY+centerY/2,"€"+this.derEinsatz+",-",{align:"center",fontFamily:"Impact",color:"Black",stroke:"White",strokeThickness:1,fontSize:"104px",wordWrap:{width:450}}).setOrigin(.5),this.increaseBtn=e.add.image(centerX+300,centerY+centerY/2,"BackBtn").setOrigin(.5),this.increaseBtn.setScale(-1,1),this.increaseBtn.setInteractive({useHandCursor:!0}),this.increaseBtn.on("pointerdown",(function(t){this.derEinsatz<gameData.Money&&(this.derEinsatz+=1),this.einsatzText.text="€"+this.derEinsatz+",-",this.updateGewinn()}),this),this.increaseBtn.on("pointerover",(function(t){e.audioplayer.playSFX("ButtonHover"),this.increaseBtn.setScale(-1.2,1.2)}),this),this.increaseBtn.on("pointerout",(function(t){this.increaseBtn.setScale(-1,1)}),this),this.decreaseBtn=e.add.image(centerX-300,centerY+centerY/2,"BackBtn").setOrigin(.5),this.decreaseBtn.setInteractive({useHandCursor:!0}),this.decreaseBtn.on("pointerdown",(function(t){this.derEinsatz>0&&(this.derEinsatz-=1),this.einsatzText.text="€"+this.derEinsatz+",-",this.updateGewinn()}),this),this.decreaseBtn.on("pointerover",(function(t){e.audioplayer.playSFX("ButtonHover"),this.decreaseBtn.setScale(1.2)}),this),this.decreaseBtn.on("pointerout",(function(t){this.decreaseBtn.setScale(1)}),this),this.enterBtn=e.add.image(centerX,height-100,"buttonSmall").setOrigin(.5),this.enterBtn.setInteractive({useHandCursor:!0}),this.enterBtn.on("pointerdown",(function(e){null!=t.callback&&(log("this.derEinsatz: ",this.derEinsatz),gameData.moneySpent+=this.derEinsatz,popData.cbScene[popData.callback.arg]=[this.derEinsatz,popData.tipp],popData.cbScene.tmpFunc=new Function(popData.callback.func),popData.cbScene.tmpFunc()),this.kill()}),this),this.enterBtn.on("pointerover",(function(t){e.audioplayer.playSFX("ButtonHover"),this.enterBtn.setScale(1.2),this.enterBtnText.setScale(1.2)}),this),this.enterBtn.on("pointerout",(function(t){this.enterBtn.setScale(1),this.enterBtnText.setScale(1)}),this),this.enterBtnText=e.add.text(this.enterBtn.x,this.enterBtn.y-4,"Wett-Einsatz zahlen",{align:"center",fontFamily:"Impact",color:"Black",stroke:"White",strokeThickness:1,fontSize:"34px",wordWrap:{width:450}}).setOrigin(.5),this.ePop.addMultiple([this.BGZone,this.popTopBG,this.popBottomBG,this.betText,this.gewinnText,this.einsatzText,this.increaseBtn,this.decreaseBtn,this.enterBtn,this.enterBtnText]),this.ePop},updateGewinn:function(){let t=this.derEinsatz*this.quote,e=getDecimalPortion(t)>0?roundTwoDecimals(t):t;this.gewinnText.text="€"+e,this.sc.tweens.add({targets:this.gewinnText,scale:{from:1.4,to:1},ease:"Elastic.Out",repeat:0,duration:500})},kill:function(){log("KILL einsatzPopup"),this.ePop.destroy(!0)}};
//# sourceMappingURL=index.f70dba1b.js.map
