AppBase、device test ok.

This commit is contained in:
u0u0
2020-01-30 16:55:34 +08:00
parent 20fcdc4d7d
commit 8a9c99b5fc
3 changed files with 16 additions and 271 deletions

View File

@@ -94,10 +94,12 @@ bool AppDelegate::applicationDidFinishLaunching()
void AppDelegate::applicationDidEnterBackground()
{
Director::getInstance()->stopAnimation();
Director::getInstance()->getEventDispatcher()->dispatchCustomEvent("APP_ENTER_BACKGROUND_EVENT");
}
// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground()
{
Director::getInstance()->startAnimation();
Director::getInstance()->getEventDispatcher()->dispatchCustomEvent("APP_ENTER_FOREGROUND_EVENT");
}