Search the Community
Showing results for tags 'pause game'.
I found there are two different approaches on how to pause game. game.pause = true; efectively pauses all subsystems in the game including the buttons, so I cannot press on them if this property is set to true. Yes I found this example http://phaser.io/examples/v2/misc/pause-menu which calculates where you pressed and if the click was on the pause btn it unpauses the game. I have just two sprites with two text objects above them. They move as text boxes togheter and fall down to the ground. Once they reach(hit) the ground the game is over. I also found this property Physics.Arcade.isPaused which I cannot find in Phaser 2.2.2 documentation and my browser as well tells me that this property does not exits. What is the best way to stop two text boxes to fall down when I press a pause button but being able to press that button again? Should I use some hacks like remove update function and then add it again or something like set sprite velocity to 0 and then revert it back again to 100.?