Binary Moon Posted August 24, 2014 Share Posted August 24, 2014 In Phaser 1.something there was an auto pause function when the game loses focus. I was wondering if there's a way to re-enable that functionality? I was also wondering if there's a way to manually tie into that functionality so I can attach it to a pause button. I'd also need to be able to hook into it somehow so that I can update timers and whatnot when I unpause the game. Does anyone know how to do any of this? Link to comment Share on other sites More sharing options...
lewster32 Posted August 24, 2014 Share Posted August 24, 2014 It should already pause when losing focus; the property that controls this is (game.stage.disableVisibilityChange) is false by default. Link to comment Share on other sites More sharing options...
Binary Moon Posted August 24, 2014 Author Share Posted August 24, 2014 I think I've fixed this so it works well enough for now. I've just found the onPause and onResume methods and they let me update my timer when the focus comes back to the game. It's not perfect but it makes the game behave better than it was previously. Thanks though - your help is always appreciated! lewster32 1 Link to comment Share on other sites More sharing options...
Recommended Posts