本文整理汇总了C++中ActionObject::stop方法的典型用法代码示例。如果您正苦于以下问题:C++ ActionObject::stop方法的具体用法?C++ ActionObject::stop怎么用?C++ ActionObject::stop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionObject
的用法示例。
在下文中一共展示了ActionObject::stop方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: menuCloseCallback
void HelloWorld::menuCloseCallback(CCObject* pSender)
{
//#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
// CCMessageBox("You pressed the close button. Windows Store Apps do not implement a close button.","Alert");
//#else
// CCDirector::sharedDirector()->end();
//#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
// exit(0);
//#endif
//#endif
int t = g_layoutcnt%2;
if( t == 0)
{
m_pLayout = dynamic_cast<UILayout *>(GUIReader::shareReader()->widgetFromJsonFile("level_select_1.json"));
if(m_pLayout)
{
m_pLayout->setPosition(ccp(-200,0));
this->addChild(m_pLayout);
ActionObject* act = NULL;
act = ActionManager::shareManager()->getActionByName("level_select_1.json","texiao");
if(NULL != act)
act->play();
act = ActionManager::shareManager()->getActionByName("level_select_1.json","shuibodonghua");
if(NULL != act)
act->play();
}
}
else
{
//ActionManager::shareManager()->stopAllActionByJson("level_select_1.json");
//ActionManager::shareManager()->stopAllActionByJson("level_select.json");
ActionObject* act = NULL;
act = ActionManager::shareManager()->getActionByName("level_select_1.json","texiao");
if(NULL != act)
act->stop();
act = ActionManager::shareManager()->getActionByName("level_select_1.json","shuibodonghua");
if(NULL != act)
act->stop();
ActionManager::shareManager()->releaseActions();
if(m_pLayout)
{
m_pLayout->removeFromParent();
m_pLayout = NULL;
}
//CCTextureCache::sharedTextureCache()->removeUnusedTextures();
}
g_layoutcnt++;
}
示例2: stopActionByName
ActionObject* ActionManagerEx::stopActionByName(const char* jsonName,const char* actionName)
{
ActionObject* action = getActionByName(jsonName,actionName);
if (action)
{
action->stop();
}
return action;
}
示例3: releaseActions
void ActionManagerEx::releaseActions()
{
for (auto& iter : _actionDic)
{
cocos2d::Vector<ActionObject*> objList = iter.second;
ssize_t listCount = objList.size();
for (ssize_t i = 0; i < listCount; i++) {
ActionObject* action = objList.at(i);
if (action != nullptr) {
action->stop();
}
}
objList.clear();
}
_actionDic.clear();
}
示例4: releaseActions
void ActionManagerEx::releaseActions()
{
std::unordered_map<std::string, cocos2d::Vector<ActionObject*>>::iterator iter;
for (iter = _actionDic.begin(); iter != _actionDic.end(); iter++)
{
cocos2d::Vector<ActionObject*> objList = iter->second;
ssize_t listCount = objList.size();
for (ssize_t i = 0; i < listCount; i++) {
ActionObject* action = objList.at(i);
if (action != nullptr) {
action->stop();
}
}
objList.clear();
}
_actionDic.clear();
}