Balamurugan Posted August 31, 2018 Share Posted August 31, 2018 In Phaser i use ES5, this is my boot state. ------------------------------------ var initGame = function(game) {}; initGame.prototype = { init: function() { console.log("INIT GAME"); this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.game.stage.disableVisibilityChange = true; }, preload:function () { console.log("Preload"); }, create:function () { game.state.start("STAGE_ASSETS"); }, } ------------------------------------------------------------------------------------------------------------------------------------------------------ This is My Second State- ----------------------------------------- var stageAssets = function () { i =0; } stageAssets.prototype = { create: function () { console.log("STAGE ASSETS"); }, update: function () { wheel.angle +=1; console.log("----------------i----->"+i++); }, } In this game i just trace i in update, In browser i just move to next tab update is stopped, I also put Quote this.game.stage.disableVisibilityChange = true; In my boot state, still Update is not Working when i minimize window or move to next tab, update is stopped. In my game i put some main functions in update. that function are not working at that time. I google is lots of time, still no one give solution. Please Help us rectify this problem. Link to comment Share on other sites More sharing options...
prob Posted August 31, 2018 Share Posted August 31, 2018 It's not a problem, it's how browsers work; it will not update tabs when minimized. You're also posting in the Phaser 3 forum. Link to comment Share on other sites More sharing options...
Balamurugan Posted September 3, 2018 Author Share Posted September 3, 2018 On 8/31/2018 at 11:35 PM, prob said: It's not a problem, it's how browsers work; it will not update tabs when minimized. You're also posting in the Phaser 3 forum. my game is timer Based game. What can i do. Any other option there for that problem. Link to comment Share on other sites More sharing options...
prob Posted September 3, 2018 Share Posted September 3, 2018 In regards to your timer, you could incorporate logic to use a starting timestamp, getting the current time, and comparing the difference to a set value (limit): var date = new Date(); var timestamp = date.getTime(); Link to comment Share on other sites More sharing options...
Balamurugan Posted September 4, 2018 Author Share Posted September 4, 2018 18 hours ago, prob said: In regards to your timer, you could incorporate logic to use a starting timestamp, getting the current time, and comparing the difference to a set value (limit): var date = new Date(); var timestamp = date.getTime(); Thanks. But How to get browser focus and Out focus, in Phaser CE v2.10.0 Link to comment Share on other sites More sharing options...
Recommended Posts