本文整理汇总了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");
}
示例2: __RelesaeGlobleResources
//-------------------------------------------------------------------------
// 释放全局资源
void TestApp::__RelesaeGlobleResources()
{
// 删除纹理集
CCSpriteFrameCache *pCache = CCSpriteFrameCache::sharedSpriteFrameCache();
if (pCache == NULL)
{
return;
}
pCache->removeSpriteFramesFromFile(s_szUIGPListPath);
pCache->removeSpriteFramesFromFile(s_szUIResPlistPath);
}
示例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()));
}
示例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();
}
示例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
}
示例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());
}
示例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();
}
}
示例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();
}
}