开启按键按键监听
setKeypadEnabled(true);
virtual void keyBackClicked();
void BanQiuLayer::keyBackClicked() { //暂停声音播放 CocosDenshion::SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic(); mag->toBeginLayer(); //返回到上一个场景 }
Cocos2d-x响应android返回键,布布扣,bubuko.com
原文:http://blog.csdn.net/oyangyufu/article/details/33334703