Hysteria Posted May 16, 2018 Share Posted May 16, 2018 Hi there, I can't find any documentation that explains how I can handle the game pauseEvent (as described here https://photonstorm.github.io/phaser3-docs/Phaser.Game.html) I want to run a function just before the game enters a Pause state. How can I accomplish this? Thanks~ Link to comment Share on other sites More sharing options...
Hysteria Posted May 17, 2018 Author Share Posted May 17, 2018 Just to clarify, I want to execute a function when the browser changes tabs and forces the game to pause. Can I do this with Phaser 3? Link to comment Share on other sites More sharing options...
samme Posted May 17, 2018 Share Posted May 17, 2018 game.events.on('hidden', function () {/* ... */}); Hysteria 1 Link to comment Share on other sites More sharing options...
Hysteria Posted May 18, 2018 Author Share Posted May 18, 2018 Thank you so much samme for the answer, that worked! Link to comment Share on other sites More sharing options...
Recommended Posts