
void AppDelegate::applicationDidEnterBackground() {
Director::getInstance()->stopAnimation();
}
void AppDelegate::applicationWillEnterForeground() {
Director::getInstance()->startAnimation();
}
这两个函数

void AppDelegate::applicationDidEnterBackground() {
Director::getInstance()->stopAnimation();
}
void AppDelegate::applicationWillEnterForeground() {
Director::getInstance()->startAnimation();
}
这两个函数
不知道2d-x的 但是creator是 用 runAction 和stopAction 执行动画和停止动画 不知道你是不是要这个
进入后台的事件是这个,其他的看文档说明
cc.game.on(cc.game.EVENT_HIDE, function () {
cc.audioEngine.pauseMusic();
cc.audioEngine.pauseAllEffects();
});
参考文档
http://docs.cocos.com/creator/api/zh/classes/Game.html#eventshow