This function will be called when the app is inactive. Note, when receiving a phone call it is invoked.
| 128 | |
| 129 | // This function will be called when the app is inactive. Note, when receiving a phone call it is invoked. |
| 130 | void AppDelegate::applicationDidEnterBackground() |
| 131 | { |
| 132 | Director::getInstance()->stopAnimation(); |
| 133 | |
| 134 | #if USE_AUDIO_ENGINE |
| 135 | AudioEngine::pauseAll(); |
| 136 | #elif USE_SIMPLE_AUDIO_ENGINE |
| 137 | SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); |
| 138 | SimpleAudioEngine::getInstance()->pauseAllEffects(); |
| 139 | #endif |
| 140 | } |
| 141 | |
| 142 | // this function will be called when the app is active again |
| 143 | void AppDelegate::applicationWillEnterForeground() |
nothing calls this directly
no test coverage detected