本文整理汇总了C++中CCLayer::stopAllActions方法的典型用法代码示例。如果您正苦于以下问题:C++ CCLayer::stopAllActions方法的具体用法?C++ CCLayer::stopAllActions怎么用?C++ CCLayer::stopAllActions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCLayer
的用法示例。
在下文中一共展示了CCLayer::stopAllActions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setContentAccess
//SetContentAccess
//state
//1 - active
//2 - passive
void CurrentGroupLayer::setContentAccess(bool state)
{
CCLayer* spr = (CCLayer*)this->getChildByTag(ID_CONTROLLAYER);
spr->stopAllActions();
CCActionInterval* scalein = CCScaleTo::actionWithDuration(0.2f,1.2f,1.2f);
CCActionInterval* scaleout = CCScaleTo::actionWithDuration(0.2f,1.0f,1.0f);
CCActionInterval* fadetoin = CCFadeTo::actionWithDuration(0.2f,255);
CCActionInterval* fadetoout = CCFadeTo::actionWithDuration(0.2f,180);
if(state)
{
((CCSprite*)(spr->getChildByTag(ID_TEXTFIELD)))->runAction(CCEaseInOut::actionWithAction((CCActionInterval*)fadetoin->copy()->autorelease(),2.0f));
((CCSprite*)(spr->getChildByTag(ID_COLORBOX)))->runAction(CCEaseInOut::actionWithAction((CCActionInterval*)fadetoin->copy()->autorelease(),2.0f));
((CCSprite*)(spr->getChildByTag(ID_STRIPE)))->runAction(CCEaseInOut::actionWithAction((CCActionInterval*)fadetoin->copy()->autorelease(),2.0f));
spr->runAction(CCEaseInOut::actionWithAction((CCActionInterval*)scalein->copy()->autorelease(),2.0f));
m_isAccessable = true;
} else {
((CCSprite*)(spr->getChildByTag(ID_TEXTFIELD)))->runAction(CCEaseInOut::actionWithAction((CCActionInterval*)fadetoout->copy()->autorelease(),2.0f));
((CCSprite*)(spr->getChildByTag(ID_COLORBOX)))->runAction(CCEaseInOut::actionWithAction((CCActionInterval*)fadetoout->copy()->autorelease(),2.0f));
((CCSprite*)(spr->getChildByTag(ID_STRIPE)))->runAction(CCEaseInOut::actionWithAction((CCActionInterval*)fadetoout->copy()->autorelease(),2.0f));
spr->runAction(CCEaseInOut::actionWithAction((CCActionInterval*)scaleout->copy()->autorelease(),2.0f));
//hide keyboard
this->onClickTrackNode(0);
m_isAccessable = false;
}
}