0.0 0


I would like to pause the game when the user goes out of the browser, I’ve added the method applicationDidEnterBackground() in the main class but it’s never called. Do I have to add something else?



Yeah, Thanks for your remind, Albert.

We need implement these events in AppControl.js on Cocos2d-html5.
I’m sorry to say that these callbacks are never called in current version.

And you can add your codes of applicationDidEnterBackground() to function handleVisibilityChange() in CCApplication.js.