Quick cocos2d从待机恢复时让游戏暂停

在游戏过程中用户暂停了游戏,注意这时游戏并没在后台,过段时间手机进入待机状态,如果从待机状态恢复时由于游戏并未在后台,则游戏继续运行,想弄成还是暂停状态怎么处理?
cocos2d里有以下2个方法,那quick里怎么处理
void AppDelegate::applicationDidEnterBackground() {
CCDirector::sharedDirector()->stopAnimation();

// if you use SimpleAudioEngine, it must be pause  
// SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();  

}

// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground() {
CCDirector::sharedDirector()->startAnimation();

// if you use SimpleAudioEngine, it must resume here  
// SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();  

}

2.x是用消息中心在这两个函数里传给Lua处理的;3.x则是用自定义消息在这里传给lua

麻烦楼上的兄弟能否说清楚点或上代码,我还只是新手,不是太理解:3.x则是用自定义消息在这里传给lua 。这句话应该怎么处理

https://github.com/dualface/v3quick/blob/v3/quick/templates/lua-template-quick/frameworks/runtime-src/Classes/AppDelegate.cpp
https://github.com/dualface/v3quick/blob/v3/quick/framework/cc/mvc/AppBase.lua

在里面看APP_ENTER_BACKGROUND_EVENT和APP_ENTER_FOREGROUND_EVENT这两个消息的处理

谢谢楼上的兄弟。我找到更好的方法了,在MyApp里覆盖基类的onEnterForeground(),在里面处理就行了

对的,有上面那两个地方的处理以后,就可以在MyApp里使用了