当前位置: 首页>>代码示例>>C++>>正文


C++ ActionObject::stop方法代码示例

本文整理汇总了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++;
}
开发者ID:Ryeeeeee,项目名称:Issue_Memory_Leak_v2.2.2,代码行数:55,代码来源:HelloWorldScene.cpp

示例2: stopActionByName

ActionObject* ActionManagerEx::stopActionByName(const char* jsonName,const char* actionName)
{
	ActionObject* action = getActionByName(jsonName,actionName);
	if (action)
	{
		action->stop();
	}
	return action;
}
开发者ID:114393824,项目名称:Cocos2dxShader,代码行数:9,代码来源:CCActionManagerEx.cpp

示例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();
}
开发者ID:c0i,项目名称:cocos2dx-lite,代码行数:17,代码来源:CCActionManagerEx.cpp

示例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();
}
开发者ID:114393824,项目名称:Cocos2dxShader,代码行数:18,代码来源:CCActionManagerEx.cpp


注:本文中的ActionObject::stop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。