예제 #1
0
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);
  }
}
예제 #2
0
void PauseLayer::onCancelPressed(CCObject* sender) {
  MainScene* scene = (MainScene*)this->getParent();
  CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect(FileUtils::getFilePath("SE/cancel.mp3").c_str());
  scene->setPause(false);
}