CCSpriteFrameCache
Singleton that handles the loading of the sprite frames.
最大的特点是通过 pszPlist 文件生成多个 Sprite Frames
CCMutableDictionary< std::string, CCObject * > *pobDictionary
字典数据 "metadata" "frames"
textureFileName 和 pobTexture 得到CCTexture2D
最常用的是 addSpriteFramesWithFile (const char *pszPlist)
这里的纹理其实都会被添加到 CCTextureCache::sharedTextureCache()中用于公共调用
其实sprite SpriteFrame都只是动画数据data
addSpriteFramesWithDictionary (CCMutableDictionary< std::string, CCObject * > *pobDictionary, CCTexture2D *pobTexture) | |
void | addSpriteFramesWithFile (const char *pszPlist) |
Adds multiple Sprite Frames from a plist file. | |
void | addSpriteFramesWithFile (const char *plist, const char *textureFileName) |
Adds multiple Sprite Frames from a plist file. | |
void | addSpriteFramesWithFile (const char *pszPlist, CCTexture2D *pobTexture) |
Adds multiple Sprite Frames from a plist file. | |
void | addSpriteFrame (CCSpriteFrame *pobFrame, const char *pszFrameName) |
Adds an sprite frame with a given name. |