class DialogManager extends Phaser.Scene{constructor(){super("DialogManager")}init(){this.currentLocation,this.currentDialog,this.currentLine}preload(){}create(){log("=> launching Dialog manager"),this.events.on("nextLine",this.nextLine,this)}update(){}startDialog(e,t,i,n=!0,r="line0"){return this.currentLocation=e,this.currentDialog=fullDialog[t][i],this.currentLine=this.currentDialog[r],this.callbacks={before:this.currentLine.callback.before,after:this.currentLine.callback.after},dialog.create(e,{name:this.currentLine.speaker,btnText:"Weiter",sprite:this.currentLine.sprite,text:this.currentLine.text,voiceover:this.currentLine.voiceover,nextLine:this.currentLine.nextLine,callback:this.callbacks,hasButton:n})}nextLine(e){if(this.currentLine.nextLine){let e=this.currentLine.speaker,t=this.currentDialog[this.currentLine.nextLine].speaker;this.currentLine=this.currentDialog[this.currentLine.nextLine],this.callbacks={before:this.currentLine.callback.before,after:this.currentLine.callback.after},e!=t?(dialog.closeMe(),dialog.create(this.currentLocation,{name:this.currentLine.speaker,btnText:"Weiter",text:this.currentLine.text,voiceover:this.currentLine.voiceover,nextLine:this.currentLine.nextLine,sprite:this.currentLine.sprite,callback:this.callbacks})):e==t?dialog.newText({text:this.currentLine.text,voiceover:this.currentLine.voiceover,nextLine:this.currentLine.nextLine,callback:this.callbacks}):dialog.closeMe()}}}
//# sourceMappingURL=index.57769c13.js.map
