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


C++ CCSpriteFrameCache::removeSpriteFramesFromFile方法代码示例

本文整理汇总了C++中CCSpriteFrameCache::removeSpriteFramesFromFile方法的典型用法代码示例。如果您正苦于以下问题:C++ CCSpriteFrameCache::removeSpriteFramesFromFile方法的具体用法?C++ CCSpriteFrameCache::removeSpriteFramesFromFile怎么用?C++ CCSpriteFrameCache::removeSpriteFramesFromFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCSpriteFrameCache的用法示例。


在下文中一共展示了CCSpriteFrameCache::removeSpriteFramesFromFile方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

ZwoptexGenericTest::~ZwoptexGenericTest()
{
    sprite1->release();
    sprite2->release();
    CCSpriteFrameCache *cache = CCSpriteFrameCache::sharedSpriteFrameCache();
    cache->removeSpriteFramesFromFile("zwoptex/grossini.plist");
    cache->removeSpriteFramesFromFile("zwoptex/grossini-generic.plist");
}
开发者ID:wenhulove333,项目名称:ScutServer,代码行数:8,代码来源:ZwoptexTest.cpp

示例2: __RelesaeGlobleResources

//-------------------------------------------------------------------------
// 释放全局资源
void TestApp::__RelesaeGlobleResources()
{
	// 删除纹理集
	CCSpriteFrameCache *pCache = CCSpriteFrameCache::sharedSpriteFrameCache();
	if (pCache == NULL)
	{
		return;
	}
	pCache->removeSpriteFramesFromFile(s_szUIGPListPath);
	pCache->removeSpriteFramesFromFile(s_szUIResPlistPath);
}
开发者ID:duzhi5368,项目名称:FKCocos2dxWrapper_2.x,代码行数:13,代码来源:TestApp.cpp

示例3:

void LevelGame05::nextCallback(CCObject *pSender)
{
	isNext = true;
	if(isNext == true)
	{
		CCSpriteFrameCache *cache = CCSpriteFrameCache::sharedSpriteFrameCache();  
		cache->removeSpriteFramesFromFile("level-5.plist");  
	}
	CCDirector::sharedDirector()->replaceScene(CCTransitionFade::create(0.5, LevelGame06::createScene()));  
}
开发者ID:rockere6,项目名称:Test,代码行数:10,代码来源:LevelGame05.cpp

示例4:

void LevelGame04::onExit()  
{  
	//CCDirector::sharedDirector()->getTouchDispatcher()->removeDelegate(this);
	if(isNext == false)
	{
	CCSpriteFrameCache *cache = CCSpriteFrameCache::sharedSpriteFrameCache();  
	cache->removeSpriteFramesFromFile("level-4.plist");  
	}
	isNext =false;
	/*CCSpriteFrameCache *cache = CCSpriteFrameCache::sharedSpriteFrameCache();  
	cache->removeSpriteFramesFromFile("level-4.plist");  */
	CCLayer::onExit(); 
}
开发者ID:rockere6,项目名称:Test,代码行数:13,代码来源:LevelGame04.cpp

示例5: menuCloseCallback

void MainLayer::menuCloseCallback( CCObject* pSender )
{
    CCSpriteFrameCache* cache = CCSpriteFrameCache::sharedSpriteFrameCache();
    cache->removeSpriteFramesFromFile("PlayBox.plist");

    // "close" menu item clicked
    CCDirector::sharedDirector()->end();
    
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
    exit(0);
#endif

}
开发者ID:Whislly,项目名称:DreamBookToolbox,代码行数:13,代码来源:MainScene.cpp

示例6: releaseUI

/* 释放本技能相关 ui 资源 */
void SkillItem::releaseUI() {
    CCTextureCache* pTextureCache = CCTextureCache::sharedTextureCache();
    CCSpriteFrameCache* pSpriteFrameCache = CCSpriteFrameCache::sharedSpriteFrameCache();
    
    // 获取大文件名
    
    std::string c = getC();
    std::string pvrFile = c + ".pvr.ccz";
    std::string plistFile = c + ".plist";
    
    pTextureCache->removeTextureForKey(pvrFile.c_str());
    pSpriteFrameCache->removeSpriteFramesFromFile(plistFile.c_str());
}
开发者ID:qjsy,项目名称:QjGit,代码行数:14,代码来源:SkillItem.cpp

示例7: bangkai

//真·奥义·移除纹理。
void ResourceManager::bangkai()
{
    if (!_toRemoveResList->empty())
    {
        CCSpriteFrameCache* ccsfc = CCSpriteFrameCache::sharedSpriteFrameCache();
        for (std::list<std::string>::iterator listIter = _toRemoveResList->begin(); listIter != _toRemoveResList->end(); ++listIter)
        {
            ccsfc->removeSpriteFramesFromFile( (*listIter).c_str() );
        }
        _toRemoveResList->clear();
        CCTextureCache::sharedTextureCache()->removeUnusedTextures();
    }
}
开发者ID:caoguoping,项目名称:warCraft,代码行数:14,代码来源:ResourceManager.cpp

示例8: removeUnusedAnimations

void ArmatureDataManager::removeUnusedAnimations(){
    if( m_pArmatureFileInfoDic ){
        CCTextureCache * tc = CCTextureCache::sharedTextureCache();
        CCSpriteFrameCache * sfc = CCSpriteFrameCache::sharedSpriteFrameCache();
        std::vector<std::string> cleanlist;
        CCDictElement* pElement = NULL;
        CCDICT_FOREACH(m_pArmatureFileInfoDic, pElement){
            const std::string file = pElement->getStrKey();
            ArmatureFileInfo * _fileInfo = (ArmatureFileInfo*)pElement->getObject();
            if (_fileInfo && _fileInfo->retainCount() == 1) {
                
                //清理 m_pAnimationDatas、m_pArmarureDatas、m_pTextureDatas 信息
                if( m_pAnimationDatas ){
                    m_pAnimationDatas->removeObjectForKey(_fileInfo->configFilePath);
                }
                
                if( m_pArmarureDatas ){
                    m_pArmarureDatas->removeObjectForKey(_fileInfo->configFilePath);
                }
                
                if( m_pTextureDatas ){
                    m_pTextureDatas->removeObjectForKey(_fileInfo->configFilePath);
                }
                
                //清理精灵帧、纹理和标记需要清理的ArmatureFile
                for (std::vector<ImageInfo>::iterator it = _fileInfo->imageInfoVector.begin();
                     it != _fileInfo->imageInfoVector.end();
                     it++){
                    const std::string & plist = it->plistPath;
                    const std::string & texture = it->imagePath;
                    sfc->removeSpriteFramesFromFile(plist.c_str());
                    tc->removeTextureForKey(texture.c_str());
                    cleanlist.push_back(file);
                }
            }
        }
        
        
        
        int size = cleanlist.size();
        for(int i = 0; i < size; i++) {
            m_pArmatureFileInfoDic->removeObjectForKey(cleanlist[i]);
        }
        cleanlist.clear();
    }
}
开发者ID:xbinglzh,项目名称:my1netFrameWork,代码行数:46,代码来源:SPArmatureDataManager.cpp


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