Jump to content

How to pause a game


Binary Moon
 Share

Recommended Posts

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

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! :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...