Created
March 15, 2014 09:26
-
-
Save kyokomi/9563968 to your computer and use it in GitHub Desktop.
EventDispatherについての調査資料1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this function will be called when the app is active again | |
void AppDelegate::applicationWillEnterForeground() { | |
Director::getInstance()->startAnimation(); | |
// if you use SimpleAudioEngine, it must resume here | |
// SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic(); | |
CCLOG("バックグラウンドから復活しました!!"); | |
auto base_scene = Director::getInstance()->getRunningScene(); | |
auto main_scene = base_scene->getChildren().at(0); | |
static_cast<RogueScene*>(main_scene)->onApplicationWillEnterForeground(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void RogueScene::onApplicationWillEnterForeground() { | |
this->showCommonWindow("再開します。", [this](Ref* pSender){ | |
this->hideCommonWindow(); | |
}, [this](Ref* pSender){ | |
this->hideCommonWindow(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment