MCPcopy Create free account
hub / github.com/axmolengine/axmol / applicationDidEnterBackground

Method applicationDidEnterBackground

tests/live2d-tests/Source/AppDelegate.cpp:130–140  ·  view source on GitHub ↗

This function will be called when the app is inactive. Note, when receiving a phone call it is invoked.

Source from the content-addressed store, hash-verified

128
129// This function will be called when the app is inactive. Note, when receiving a phone call it is invoked.
130void 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
143void AppDelegate::applicationWillEnterForeground()

Callers

nothing calls this directly

Calls 4

getInstanceFunction · 0.85
stopAnimationMethod · 0.80
pauseBackgroundMusicMethod · 0.80
pauseAllEffectsMethod · 0.80

Tested by

no test coverage detected