void PauseLayer::onYesPressed(CCObject* sender) { MainScene* scene = (MainScene*)this->getParent(); scene->setPause(false); this->removeFromParentAndCleanup(true); if (_state == PauseLayerStateConfirmReplay) { this->replayButtonPressed(NULL); } else if (_state == PauseLayerStateConfirmTitle) { this->titleButtonPressed(NULL); } }
void PauseLayer::onCancelPressed(CCObject* sender) { MainScene* scene = (MainScene*)this->getParent(); CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect(FileUtils::getFilePath("SE/cancel.mp3").c_str()); scene->setPause(false); }