I have coded a part of my game using react js and the battle part with phaser 3. The player selects a battle which launches a phaser game instance, once battle is done the game instance is destroyed. I’d like to get the state of the battle, if player has lost or won for example. How can I either send datas on destroy or maybe pass a global variable to phaser and set it on destroy ?
Thanks for the help !