Croweley Posted March 13, 2015 Share Posted March 13, 2015 I've tried using stage.disableVisibilityChange = truebut it doesn't seem to do anything (I'm hoping that the update method would continue to be called when the window/tab loses focus). Here's a small project that showcases this: var game = new Phaser.Game(1280, 720, Phaser.CANVAS, 'game-container');game.state.add('Boot', Boot);game.state.start('Boot');var Boot = (function ( ) { Boot.prototype = Object.create(Phaser.State.prototype); function Boot ( ) { Phaser.State.call(this); } Boot.prototype.create = function ( ) { console.log('create'); Phaser.State.prototype.create.call(this); this.game.stage.disableVisibilityChange = true; } Boot.prototype.update = function ( ) { console.log('update'); Phaser.State.prototype.update.call(this); } return Boot; })();It'll work as expected until I change tabs, at which point the update method is no longer called. Thoughts? Link to comment Share on other sites More sharing options...
spencerTL Posted March 13, 2015 Share Posted March 13, 2015 Apparently changing tabs is different to changing windows: see Rich's post in this thread: http://www.html5gamedevs.com/topic/10847-gamestagedisablevisibilitychange-not-working/ Link to comment Share on other sites More sharing options...
Recommended Posts