dontHaveName Posted April 23, 2018 Share Posted April 23, 2018 Hi, what's an equivalent of stage.disableVisibilityChange in Phaser 3? I don't want to stop all tweens after I switch between tabs. Link to comment Share on other sites More sharing options...
asd42 Posted May 13, 2018 Share Posted May 13, 2018 hi, did you find a solution to this? Link to comment Share on other sites More sharing options...
samme Posted May 13, 2018 Share Posted May 13, 2018 // var game = this.sys.game; game.off('hidden', game.onHidden, game); game.off('visible', game.onVisible, game); Link to comment Share on other sites More sharing options...
kurhlaa Posted August 13, 2018 Share Posted August 13, 2018 Hi, @samme, With the latest Phaser I get this error: Uncaught TypeError: game.off is not a function What is the actual syntax for your code? Link to comment Share on other sites More sharing options...
samme Posted August 14, 2018 Share Posted August 14, 2018 Use game.events.off(…). Link to comment Share on other sites More sharing options...
strivinglife Posted September 14, 2018 Share Posted September 14, 2018 Is this still correct for Phaser 3.12.0? I'm trying the following in TypeScript and it appears both onHidden and onVisible are protected. this.game.events.off("hidden", this.game.onHidden, this.game, false); this.game.events.off("visible", this.game.onVisible, this.game, false); Link to comment Share on other sites More sharing options...
Andrew Chen Posted November 18, 2018 Share Posted November 18, 2018 game = new Phaser.Game(config); // game.scene.add('Boot', BootScene); //*** key,class */ game.scene.add('GameScene', GameScene); game.scene.add('UI', UIScene); game.scene.start('GameScene', {issue: issue,isGameOver:true}); this.game.events.on('hidden',function(){ console.log('hidden'); },this); this.game.events.on('visible',function(){ console.log('visible'); },this); this is what i did above ,and it works very well www.ifiero.com Link to comment Share on other sites More sharing options...
Recommended Posts