Jump to content

Search the Community

Showing results for tags 'Pausing'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 2 results

  1. Quick question about using the timer and loop in Phaser. I'm trying to get a program that runs a timer that checks how long the user has been playing the game, with the time displayed and it needs to be able to pause when a menu is opened. This is what I have currently: function create() { timer = game.add.text(250, 150, '0'); this.currentTimer = new Phaser.Timer(game, false); this.currentTimer.loop(Phaser.Timer.SECOND, this.updateTimer, this); this.currentTimer.start();}function update() { if(pauseButton.isDown){ timer.setText('Pause'); this.currentTimer.pause(); } if(resumeButton.isDown){ this.currentTimer.resume(); timer.setText(counter); test++; }}function updateTimer() { counter++; timer.setText(counter);}Using the console log I can tell that the timer is starting correctly, and can be paused and then resumed. However, the text does not update except to Pause when I press pause. Anyone know a solution to this?
  2. I want to detect the visibility change in my game ( that is, when , for instance, browser tab loses focus, for example). I know that when that occurs, Phaser automatically pauses my whole game system. I want to prevent that automatic pausing, but still I want to receive signal/event about this visibility change.
×
×
  • Create New...