本文整理汇总了C++中CCMenuItemImage::getTag方法的典型用法代码示例。如果您正苦于以下问题:C++ CCMenuItemImage::getTag方法的具体用法?C++ CCMenuItemImage::getTag怎么用?C++ CCMenuItemImage::getTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCMenuItemImage
的用法示例。
在下文中一共展示了CCMenuItemImage::getTag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: towerAdd
void addTower:: towerAdd(CCObject* sender)
{
int towerTag = CCUserDefault::sharedUserDefault()-> getIntegerForKey("towerTag");
if (towerTag ==0) {
towerTag = 1000;
}else
{
towerTag ++;
}
CCUserDefault::sharedUserDefault()->setIntegerForKey("towerTag", towerTag);
CCMenuItemImage* item = (CCMenuItemImage*)sender;
if (item->getTag() ==1) {
CCUserDefault::sharedUserDefault()->setStringForKey("towerType", "TurretTower");
}else if (item->getTag()==2)
{
CCUserDefault::sharedUserDefault()->setStringForKey("towerType", "LarrowTower");
}else if (item->getTag() ==3)
{
CCUserDefault::sharedUserDefault()->setStringForKey("towerType", "DecelerationTower");
}else if (item->getTag()==4)
{
CCUserDefault::sharedUserDefault()->setStringForKey("towerType", "MagicTower");
}
else{
}
}
示例2: menuItemClicked
void MainLayerZhuangBeiBody::menuItemClicked(CCObject *pSender)
{
CCMenuItemImage* itemImage = (CCMenuItemImage*)pSender;
int idx = itemImage->getTag();
selectAtIndex(idx);
}
示例3: menuItemCallBack
void HomeScene::menuItemCallBack(CCObject* pSender)
{
CCMenuItemImage* item = (CCMenuItemImage *)pSender;
switch (item->getTag()) {
case 1:
CCLOG("主页");
break;
case 2:
CCLOG("城市");
break;
case 3:
CCLOG("副本");
break;
case 4:
CCLOG("活动");
break;
case 5:
CCLOG("背包");
break;
case 6:
CCLOG("商城");
break;
default:
break;
}
}
示例4: onHandlePropTypeSpriteFrame
NS_CC_EXT_BEGIN
void CCMenuItemImageLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader) {
if(strcmp(pPropertyName, PROPERTY_NORMALDISPLAYFRAME) == 0) {
if(pCCSpriteFrame != NULL) {
((CCMenuItemImage *)pNode)->setNormalSpriteFrame(pCCSpriteFrame);
// #HLP_BEGIN
// #resource_scale_fix
CCMenuItemImage *item = (CCMenuItemImage *)pNode;
item->setNormalSpriteFrame(pCCSpriteFrame);
if(item->getTag() != TAG_INTERNET_MENU_ITEM_IMAGE){
item->setScale(item->getScale() * CC_CONTENT_SCALE_FACTOR() / CC_RESOURCE_SCALE_FACTOR());
}
// #HLP_END
}
} else if(strcmp(pPropertyName, PROPERTY_SELECTEDDISPLAYFRAME) == 0) {
if(pCCSpriteFrame != NULL) {
((CCMenuItemImage *)pNode)->setSelectedSpriteFrame(pCCSpriteFrame);
}
} else if(strcmp(pPropertyName, PROPERTY_DISABLEDDISPLAYFRAME) == 0) {
if(pCCSpriteFrame != NULL) {
((CCMenuItemImage *)pNode)->setDisabledSpriteFrame(pCCSpriteFrame);
}
} else {
CCMenuItemLoader::onHandlePropTypeSpriteFrame(pNode, pParent, pPropertyName, pCCSpriteFrame, pCCBReader);
}
}
示例5: answerCallback
void SoloGameScene::answerCallback( CCObject* pSender )
{
this->unschedule(schedule_selector(SoloGameScene::scheduleClock));
CCMenuItemImage* it = (CCMenuItemImage*) pSender;
it->selected();
int tag = it->getTag();
if (tag == m_curRightAnswer)
{
PLAY_GET_BOMB_EFFECT;
m_curScore += DataManager::sharedDataManager()->GetSoloAddScore();
m_isRight = true;
}
else
{
PLAY_OUT_PORP_EFFECT;
m_curScore += DataManager::sharedDataManager()->GetSoloSubScore();
if(m_curScore < 0) m_curScore = 0;
m_isRight = false;
}
animationRightChoose();
m_lbScore->setString(CCString::createWithFormat("%d", m_curScore)->getCString());
DataManager::sharedDataManager()->SetSoloScore(m_curScore);
}
示例6: selectAtIndex
void MainLayerZhuangBeiBody::selectAtIndex(unsigned int index)
{
// 0 是第一个 所有装备
CCTableViewCell* currentCell = tableView->cellAtIndex(index);
CCTableViewCell* lastCell = tableView->cellAtIndex(selectedIndex);
//if (selectedIndex != index)
{
if (lastCell!=NULL)
{
CCMenuItemImage* itemImage = (CCMenuItemImage*)lastCell->getChildByTag(TAG_MENU)->getChildByTag(lastCell->getIdx());
int idx = itemImage->getTag();
itemImage->initWithNormalImage(
itemFiles[idx].c_str()
,itemFiles_select[idx].c_str()
,NULL, this, menu_selector(MainLayerZhuangBeiBody::menuItemClicked));
}
if (currentCell!=NULL)
{
CCMenuItemImage* itemImage = (CCMenuItemImage*)currentCell->getChildByTag(TAG_MENU)->getChildByTag(currentCell->getIdx());
int idx = itemImage->getTag();
itemImage->initWithNormalImage(
itemFiles_select[idx].c_str()
,itemFiles[idx].c_str()
,NULL, this, menu_selector(MainLayerZhuangBeiBody::menuItemClicked));
}
selectedIndex = index;
BaseLayer* content = createContentAtIndex(index);
if (selectedContaint)
{
selectedContaint->removeFromParent();
}
if (content)
{
container->addChild(content);
content->setPosition(ccp(0,0));
}
selectedContaint = content;
}
}
示例7: menuCallback
void DeadDlg::menuCallback(CCObject *pSender)
{
CCMenuItemImage *item = (CCMenuItemImage *)pSender;
m_ret.iBtnsel = item->getTag();
(m_listener->*m_selector)(&m_ret);
// if(item->getTag() == 111)
// {
//
// }else {
//
// }
}
示例8: CCLOG
void Study1::wordCB(CCObject* pSender)
{
CCMenuItemImage *pi = (CCMenuItemImage*)pSender;
int tag = pi->getTag();
CCLOG("menu item:%d",tag);
CCNode *img = CCSprite::createWithTexture(CCTextureCache::sharedTextureCache()->textureForKey("wkszStudy1/wordbg3.png"));
pi->setNormalImage(img);
if (tag != current_character) {
stopCurrentCharacter();
current_character = tag;
playCurrentCharacter(true);
}
}
示例9: selectBlock
void HelloWorld::selectBlock(CCObject* target)
{
// enable pillars
for (int i=0 ; i<3 ; i++)
{
((CCMenuItemImage*)((this->getChildByTag(i))->getChildByTag(i)))->setEnabled(true);
}
// set all block colors to default
for (int x=3 ; x<10 ; x++)
{
((CCMenuItemImage*)((this->getChildByTag(x))->getChildByTag(x)))->setOpacity(255);
}
// set selected block color
CCMenuItemImage* block = (CCMenuItemImage*)(target);
selectedBlock = block->getTag();
block->setOpacity(140);
//CCLog("selectedBlock is %i",selectedBlock);
}
示例10: BtnUpInCallback
void UIStory::BtnUpInCallback(CCObject* pSender)
{
CCMenuItemImage* pBtn = (CCMenuItemImage*)pSender;
pBtn->stopAllActions();
pBtn->runAction(CCScaleTo::actionWithDuration(0.1f, CCGetScaleX()));
if ( pBtn->getTag() == 1002 )
{
//continue
//SceneManager::SharedSceneManager()->JumpToGameLevel(1);
if(NextGameLevel != 6)
{
SceneManager::SharedSceneManager()->JumpToNextStage(NextGameLevel);
}
else
{
SceneManager::SharedSceneManager()->JumpToStartPanel();
}
}
}
示例11: onMenuItemSelected
void BuildingCard::onMenuItemSelected(CCObject* pSender)
{
cardBG->setScaleX(largeScale.x);
cardBG->setScaleY(largeScale.y);
if (!GameHUD::getThis()->isThisTapCounted)
{
return;
}
if (GameHUD::getThis()->buildScroll != NULL && (GameHUD::getThis()->buildScroll->scroll_in || GameHUD::getThis()->buildScroll->scroll_out))
{
return;
}
if(TutorialManager::getThis()->active)
{
if (TutorialManager::getThis()->lockBuildScroll)
{
return;
}
}
//cardBG->setScaleX(cardBG->getScaleX() * 1.0f / 0.95f);
//cardBG->setScaleY(cardBG->getScaleY() * 1.0f / 0.95f);
CCMenuItemImage* pMenuItemImage = (CCMenuItemImage *)(pSender);
int tag = pMenuItemImage->getTag();
switch (tag)
{
case -1 : //build path
{
if(TutorialManager::getThis()->active)
{
if(TutorialManager::getThis()->teachBuildHouse || TutorialManager::getThis()->teachBuildGranary || TutorialManager::getThis()->teachBuildFarm)
{
return;
}
}
GameHUD::getThis()->setTapMode(3);
GameHUD::getThis()->isThisTapCounted = false;
GameHUD::getThis()->buildScroll->scheduleScrollOut();
GameHUD::getThis()->buildButton->setVisible(true);
if(TutorialManager::getThis()->active)
{
if(TutorialManager::getThis()->teachBuildRoad && !TutorialManager::getThis()->miniDragon->notFirst && !TutorialManager::getThis()->miniDragon->connectGranary && !TutorialManager::getThis()->miniDragon->connectFarm)
{
/*
//GameHUD::getThis()->buildButton->setTexture(CCTextureCache::sharedTextureCache()->addImage());
CCSpriteFrame * l_SpriteFrame = CCSpriteFrameCache::sharedSpriteFrameCache() -> spriteFrameByName("main-game-buttons_cancel_build.png");
GameHUD::getThis()->buildButton -> setTexture( l_SpriteFrame -> getTexture() );
GameHUD::getThis()->buildButton -> setTextureRect( l_SpriteFrame -> getRect( ) );
*/
TutorialManager::getThis()->miniDragon->move(ccp(0, -220));
TutorialManager::getThis()->miniDragon->clickNext();
}
if(TutorialManager::getThis()->miniDragon->connectGranary || TutorialManager::getThis()->miniDragon->connectFarm)
{
TutorialManager::getThis()->miniDragon->move(ccp(0, -220));
}
}
}
break;
case -2 : //unbuild path
{
if(TutorialManager::getThis()->active)
{
if(TutorialManager::getThis()->teachBuildHouse)
{
return;
}
if(TutorialManager::getThis()->teachBuildRoad)
{
return;
}
if(TutorialManager::getThis()->teachBuildGranary)
{
return;
}
if(TutorialManager::getThis()->teachBuildFarm)
{
return;
}
}
GameHUD::getThis()->setTapMode(4);
GameHUD::getThis()->isThisTapCounted = false;
GameHUD::getThis()->buildScroll->scheduleScrollOut();
GameHUD::getThis()->buildButton->setVisible(true);
}
//.........这里部分代码省略.........
示例12: switchOnOff
void RemindLayer::switchOnOff(CCObject *pSender)
{
if(CGameData::Inst()->isSoundOn)
SimpleAudioEngine::sharedEngine()->playEffect(kSndEffect(btnok));
CCMenuItemImage *temItem = (CCMenuItemImage *)pSender;
if(temItem->getTag() == kActivityOnTag)
{
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kActivityOnTag))->setIsEnabled(false);
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kActivityOffTag))->setIsEnabled(true);
changeNumber = 0;
changeSum = 1;
CGameData::Inst()->setActivityRemindValue(true);
CGameData::Inst()->RemindReq();
scheduleUpdate();
}
else if (temItem->getTag() == kActivityOffTag)
{
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kActivityOnTag))->setIsEnabled(true);
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kActivityOffTag))->setIsEnabled(false);
changeNumber = 0;
changeSum = 0;
CGameData::Inst()->setActivityRemindValue(false);
CGameData::Inst()->RemindReq();
scheduleUpdate();
}
else if(temItem->getTag() == kTwoupOnTag)
{
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kTwoupOnTag))->setIsEnabled(false);
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kTwoupOffTag))->setIsEnabled(true);
changeNumber = 1;
changeSum = 1;
CGameData::Inst()->setTwoupRemindValue(true);
CGameData::Inst()->RemindReq();
scheduleUpdate();
}
else if (temItem->getTag() == kTwoupOffTag)
{
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kTwoupOnTag))->setIsEnabled(true);
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kTwoupOffTag))->setIsEnabled(false);
changeNumber = 1;
changeSum = 0;
CGameData::Inst()->setTwoupRemindValue(false);
CGameData::Inst()->RemindReq();
scheduleUpdate();
}
else if(temItem->getTag() == kCntryCdOnTag){
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kCntryCdOnTag))->setIsEnabled(false);
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kCntryCdOffTag))->setIsEnabled(true);
changeNumber = 2;
changeSum = 1;
CGameData::Inst()->setCntryCdRemindValue(true);
CGameData::Inst()->RemindReq();
scheduleUpdate();
}else if(temItem->getTag() == kCntryCdOffTag){
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kCntryCdOnTag))->setIsEnabled(true);
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kCntryCdOffTag))->setIsEnabled(false);
changeNumber = 2;
changeSum = 0;
CGameData::Inst()->setCntryCdRemindValue(false);
CGameData::Inst()->RemindReq();
scheduleUpdate();
}
else if(temItem->getTag() == kPowerOnTag)
{
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kPowerOnTag))->setIsEnabled(false);
((CCMenuItemImage*)temItem->getParent()->getChildByTag(kPowerOffTag))->setIsEnabled(true);
CGameData::Inst()->setPowerRemindValue(atoi(powerNumber->getString()));
// 推送 注册
if (CGameData::Inst()->getUsrInfo()->stamina < CGameData::Inst()->intPowerRemind && CGameData::Inst()->intPowerRemind < CGameData::Inst()->getUsrInfo()->max_stamina) {
changeNumber = 3;
changeSum = 1;
char buf[100];
snprintf(buf, 99,CGameData::Inst()->getLanguageValue("pushinf_stamina2"), CGameData::Inst()->intPowerRemind);
long stamina_time;
unsigned short staminaRecoverTime;
staminaRecoverTime = CGameData::Inst()->getCommonInfo()->stamina_recover_time * 60;
if (staminaRecoverTime == 0) {
}else{
stamina_time = CGameData::Inst()->getUsrInfo()->stamina_upd_time + (CGameData::Inst()->intPowerRemind - CGameData::Inst()->getUsrInfo()->stamina -1) * staminaRecoverTime;
OcProxy::Inst()->setPushInfo(buf,
stamina_time,
kPushInfStamina2);
}
}
if (!moveUp) {
powerNumber->detachWithIME();
if (CGameData::Inst()->intPowerRemind == 0 && atoi(powerNumber->getString()) == 0) {
CGameData::Inst()->RemindReq();
scheduleUpdate();
}
layerMoveUpOrDown(moveUp);
moveUp = !moveUp;
} else {
//.........这里部分代码省略.........
示例13: menuItemClicked
void MainLayerStoreFrame::menuItemClicked(CCObject* sender)
{
CCMenuItemImage* sbItem = (CCMenuItemImage*)mMenu->getChildByTag(TAG_ITEM_ShenBing);
// CCMenuItemImage* djItem = (CCMenuItemImage*)mMenu->getChildByTag(TAG_ITEM_DAOJU);
CCMenuItemImage* lbItem = (CCMenuItemImage*)mMenu->getChildByTag(TAG_ITEM_LiBao);
CCMenuItemImage* czItem = (CCMenuItemImage*)mMenu->getChildByTag(TAG_ITEM_CHONGZHI);
//初始化所有按钮的图片
{
sbItem->initWithNormalImage(
"shangdian_shenbin_dengdai.png",
"shangdian_shenbin_anxia.png",
"shangdian_shenbin_select.png",
this,SEL_MenuHandler(&MainLayerStoreFrame::menuItemClicked));
// djItem->initWithNormalImage(
// "shangdian_daoju_dengdai.png",
// "shangdian_daoju_anxia.png",
// "shangdian_daoju_select.png",
// this,SEL_MenuHandler(&MainLayerStoreFrame::menuItemClicked));
lbItem->initWithNormalImage(
"shangdian_libao_dengdai.png",
"shangdian_libao_anxia.png",
"shangdian_libao_select.png",
this,SEL_MenuHandler(&MainLayerStoreFrame::menuItemClicked));
czItem->initWithNormalImage(
"shangdian_chongzhi_dengdai.png",
"shangdian_chongzhi_anxia.png",
"shangdian_chongzhi_select.png",
this,SEL_MenuHandler(&MainLayerStoreFrame::menuItemClicked));
}
if(mContentLayer != NULL)
{
mContentLayer->removeFromParent();
mContentLayer = NULL;
}
//
CCSize contentSize = CCSize(mWinSize.width, mBg->getContentSize().height-195-15);
CCMenuItemImage* item = (CCMenuItemImage*)(sender);
int tag = item->getTag();
if (tag == TAG_ITEM_ShenBing)
{
ShenBingShangDian *layer = new ShenBingShangDian(mFooterLayer, contentSize);
mContentLayer = layer;
addChild(mContentLayer, 1);
layer->release();
mContentLayer->setPosition(0, 0);
//调换图片
item->initWithNormalImage(
"shangdian_shenbin_select.png",
"shangdian_shenbin_anxia.png",
NULL,
this,SEL_MenuHandler(&MainLayerStoreFrame::menuItemClicked));
}
else if (tag == TAG_ITEM_DAOJU)
{
MainLayerStoreDaoju* layer = new MainLayerStoreDaoju(mFooterLayer, contentSize);
mContentLayer = layer;
addChild(mContentLayer, 1);
layer->release();
mContentLayer->setPosition(0, 0);
//调换图片
item->initWithNormalImage(
"shangdian_daoju_select.png",
"shangdian_daoju_anxia.png",
NULL,
this,SEL_MenuHandler(&MainLayerStoreFrame::menuItemClicked));
}
else if (tag == TAG_ITEM_LiBao)
{
LibaoLayer* layer = new LibaoLayer(mFooterLayer, contentSize);
mContentLayer = layer;
addChild(mContentLayer, 1);
layer->release();
mContentLayer->setPosition(0, 0);
//调换图片
item->initWithNormalImage(
"shangdian_libao_select.png",
"shangdian_libao_anxia.png",
NULL,
this,SEL_MenuHandler(&MainLayerStoreFrame::menuItemClicked));
}
else if (tag == TAG_ITEM_CHONGZHI)
{
ChongZhiLayer *layer = new ChongZhiLayer(mFooterLayer, contentSize);
mContentLayer = layer;
addChild(mContentLayer, 1);
layer->release();
mContentLayer->setPosition(ccp(0,0));
//调换图片
item->initWithNormalImage(
"shangdian_chongzhi_select.png",
"shangdian_chongzhi_anxia.png",
NULL,
this,SEL_MenuHandler(&MainLayerStoreFrame::menuItemClicked));
}
//.........这里部分代码省略.........
示例14: menuActionCallBack
void gameShopClass::menuActionCallBack(cocos2d::CCObject *object)
{
CCMenuItemImage* menuItem = (CCMenuItemImage*)object;
int valueNum = 0;
switch (menuItem->getTag()) {
case GAME_SHOP_MENU_TAG_BUY_COOKIE:
{
if (userStoneNum >= GAME_SHOP_COOKIE_NEED_STONE_NUM) {
userStoneNum -= GAME_SHOP_COOKIE_NEED_STONE_NUM;
valueNum = HUDClass::sharedHUD()->getUserCookieNum();
valueNum += 35;
HUDClass::sharedHUD()->setUserCookieNum(valueNum);
cookieBuyMenu->setEnabled(false);
this->showBuySuccessTips("成功兑换35个饼干");
}
}
break;
case GAME_SHOP_MENU_TAG_BUY_MILK:
{
if (userStoneNum >= GAME_SHOP_MILK_NEED_STONE_NUM) {
userStoneNum -= GAME_SHOP_MILK_NEED_STONE_NUM;
valueNum = HUDClass::sharedHUD()->getUserMilkNum();
valueNum += 10;
HUDClass::sharedHUD()->setUserMilkNum(valueNum);
milkBuyMenu->setEnabled(false);
this->showBuySuccessTips("成功兑换10颗牛奶");
}
}
break;
case GAME_SHOP_MENU_TAG_BUY_MEDICINE:
{
if (userStoneNum >= GAME_SHOP_MEDICINE_NEED_STONE_NUM) {
userStoneNum -= GAME_SHOP_MEDICINE_NEED_STONE_NUM;
valueNum = HUDClass::sharedHUD()->getUserMedicineNum();
valueNum += 1;
HUDClass::sharedHUD()->setUserMedicineNum(valueNum);
medicineBuyMenu->setEnabled(false);
this->showBuySuccessTips("成功兑换一个大力丸");
}
}
break;
case GAME_SHOP_MENU_TAG_BUY_NEST:
{
if (userStoneNum >= GAME_SHOP_NEST_NEED_STONE_NUM) {
userStoneNum -= GAME_SHOP_NEST_NEED_STONE_NUM;
valueNum = HUDClass::sharedHUD()->getUserNestNum();
valueNum += 1;
HUDClass::sharedHUD()->setUserNestNum(valueNum);
nestBuyMenu->setEnabled(false);
this->showBuySuccessTips("成功兑换一个窝");
}
}
break;
case GAME_SHOP_MENU_TAG_BUY_EGG:
{
if (userStoneNum >= GAME_SHOP_EGG_NEED_STONE_NUM) {
userStoneNum -= GAME_SHOP_EGG_NEED_STONE_NUM;
this->generateEggType();
eggBuyMenu->setEnabled(false);
this->showBuySuccessTips("恭喜获得神秘的蛋");
}
}
break;
case GAME_SHOP_MENU_TAG_CLOSE:
{
if (myTarget != NULL) {
(myTarget->*myFunc)();
}
this->removeFromParentAndCleanup(true);
return;
}
break;
default:
break;
}
if (userStoneNum < 0) {
userStoneNum = 0;
}
memset(comBuffer, 0, sizeof(comBuffer));
sprintf(comBuffer, "%d",userStoneNum);
userStoneNumLab->setString(comBuffer);
this->updateMenuBuyState();
}
示例15: menuBtnCallBack
void IOSStoreLayer::menuBtnCallBack(CCObject* pObj)
{
CCLog("menubtn call back");
CCMenuItemImage* pItme = (CCMenuItemImage*)pObj;
int iTag = pItme->getTag();
switch (iTag)
{
case close_btn_tag:
{
m_pBg->runAction(CCSequence::create(CCScaleTo::create(0.2f, 0.0f), CCCallFuncN::create(this, callfuncN_selector(IOSStoreLayer::removeCurLayer)), NULL));
}
break;
case onetimes_btn_tag:
{
CCLog("one times btn click....");
m_bBaoxiangBuyTenTimes = false;
m_pBg->setVisible(false);
this->showBoxAniLayer();
//CmdHelper::getHelper()->cmdOpenBox(1, m_enumComeFrom);
}
break;
case tentimes_btn_tag:
{
CCLog("ten times btn click....");
m_pBg->setVisible(false);
m_bBaoxiangBuyTenTimes = true;
this->showBoxAniLayer();
//CmdHelper::getHelper()->cmdOpenBox(10, m_enumComeFrom);
}
break;
case buy_one_again:
{
CCLog("buy_one_again click....");
m_bBaoxiangBuyTenTimes = false;
this->showBoxAniLayer();
//CmdHelper::getHelper()->cmdOpenBox(1, m_enumComeFrom);
}
break;
case buy_ten_again:
{
CCLog("buy_ten_again click....");
m_bBaoxiangBuyTenTimes = true;
this->showBoxAniLayer();
//CmdHelper::getHelper()->cmdOpenBox(10, m_enumComeFrom);
}
break;
case ok_btn_tag:
{
CCLog("ok_btn_tag click....");
if (m_enumComeFrom == from_MarketStore)
{
this->backMainNode();
this->setLeftTopTipStr("");
this->setTipBgVisible(false);
}
else if (m_enumComeFrom == from_GameInSuperTool)
{
this->setLeftTopTipStr("");
this->setTipBgVisible(false);
bool bSuperTool = false;
for (size_t i = 0; i < m_kaiBaoxiangRspVector.size(); ++i)
{
if (m_kaiBaoxiangRspVector.at(i).item == BuyItem::itemtype_SuperTools)
{
bSuperTool = true;
break;
}
}
if (bSuperTool)
{
//已抽到超能道具,跳转到超能道具使用界面
IOSMarketUseSuperToolLayer* pLayer = new IOSMarketUseSuperToolLayer();
CCDirector::sharedDirector()->getRunningScene()->addChild(pLayer, 100);
pLayer->release();
this->removeFromParent();
}
else
{
//未抽到超能道具,跳转到开宝箱界面
this->backMainNode();
}
}
else if (m_enumComeFrom == from_GameInHelpMap)
{
//bool be = false;
//if (History::getHistory()->getFirstOpenBoxThing(Openbox_firstFromHelpMap, be) && be)
{
this->removeCurLayer();
CCNotificationCenter::sharedNotificationCenter()->postNotification(MSG_BuyHelpMapSuccess, NULL);
}
}
//.........这里部分代码省略.........