Loopeex shows how to build a full pause screen into your game

Posted on 30th May 2014. Follow @phaser_ and get the Phaser World newsletter.

"OK, let’s assume we have just finished a game with Phaser. Great, but let’s say you want to create a pause screen during your play state. You can pause the entire game with this simple line of code :

this.game.paused = true;

Another alternative would have been to create a new game state “pause” when clicking a pause button, but when entering that state, we would loose all information about our playing state."

image

Read more

Learn to code and lead your intrepid crew on a mission to save The Cloud in TwilioQuest, a PC role-playing game inspired by classics of the 16-bit era. Free forever, and available now for Windows, Mac, and Linux.

The first book on the creation of HTML5 cross platform games using Phaser 3 and other free software.
  • By Emanuele Feronato
  • 155 Pages
  • 28 Source Code Examples
  • Build a complete game from start to finish
  • Cross Platform
  • Scaling for devices
Buy Now
$19