本文主要是介绍不同版本cocos2d-x的CCB/CCBI加载器研究,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
不同版本cocos2d-x的CCB/CCBI加载器研究
cocos2d-2.1beta3-x-2.1.1
相关文件:
\cocos2d-2.1beta3-x-2.1.1\extensions\CCBReader\CCBReader.h
\cocos2d-2.1beta3-x-2.1.1\extensions\CCBReader\CCBReader.cpp
CCBReader.h
/* Utility methods. */static std::string lastPathComponent(const char* pString);static std::string deletePathExtension(const char* pString);static std::string toLowerCase(const char* pCCString);static bool endsWith(const char* pString, const char* pEnding);/* Parse methods. */int readInt(bool pSigned);unsigned char readByte();bool readBool();std::string readUTF8();float readFloat();std::string readCachedString();bool isJSControlled();
CCBReader.cpp
234:
CCNode* CCBReader::readNodeGraphFromFile(const char *pCCBFileName, CCObject *pOwner, const CCSize &parentSize)
{}↓263:
CCNode* CCBReader::readNodeGraphFromData(CCData *pData, CCObject *pOwner, const CCSize &parentSize)
{}readFileWithCleanUpsetAnimationManagers530:
CCNode *pNode = readNodeGraph(NULL);
这篇关于不同版本cocos2d-x的CCB/CCBI加载器研究的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!