puzzler Posted July 7, 2017 Share Posted July 7, 2017 (edited) When my game in the browser loses focus, everything pauses: animations pause, music stops playing. HOWEVER, when I go back to the browser, the animations continue from where they left off, but the music behaves differently -- the music resumes at a point as if it had been playing in the background and time had elapsed. So then, my animations and music are out of sync. What is the simplest way of making animations and music behave similarly? Edited July 7, 2017 by puzzler Added tags Link to comment Share on other sites More sharing options...
samme Posted July 7, 2017 Share Posted July 7, 2017 That's normal. Use the Game#onPause and Game#onResume signals and call SoundManager#pauseAll or SoundManager#resumeAll. Link to comment Share on other sites More sharing options...
puzzler Posted July 8, 2017 Author Share Posted July 8, 2017 Is there a complete list somewhere of what things pause automatically and what things require manual management? For example, what about Timers? Link to comment Share on other sites More sharing options...
samme Posted July 8, 2017 Share Posted July 8, 2017 Phaser.Game#paused Phaser.Time Link to comment Share on other sites More sharing options...
Recommended Posts