Jump to content

Remove Any Phaser Process when Visibility Hidden


turnA
 Share

Recommended Posts

Hi there,

Just a little background info. I try to submit my HTML5 games for TIzen smartwatch.
After some review process, my games got rejected because they detected that my games still using 12~24mA electricity when screen off/sleeping. Any application/games shouldn't be above 4~7mA when the device is sleeping, so they assume there is problem with my games when sleep/wake up.

I'm not using any special code from phaser regarding visibility change, I left all of them at default.
Is there any way to make sure that Phaser doesn't process ANYTHING at all when the screen is hidden (because screen off/sleeping)? I need to change the source code maybe?

Thanks

Link to comment
Share on other sites

Bump.

From reading source code, I realize the main controller of game loop is the game.raf . I assume that by stopping game.raf, I will totally stop any Phaser internal game process, is that right?
Can I safely call game.raf.stop() and game.raf.start() when I detect screen change?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...