Normalization function names

This commit is contained in:
XiaoFeng 2015-07-28 14:05:56 +08:00
parent 09d9fcf4d6
commit bca6934786
3 changed files with 10 additions and 10 deletions

View File

@ -318,7 +318,7 @@ ActionTimeline* CSLoader::createTimeline(const std::string &filename)
return nullptr;
}
ActionTimeline* CSLoader::createTimelineWithDataBuffer(const Data data, const std::string& filename)
ActionTimeline* CSLoader::createTimeline(const Data data, const std::string& filename)
{
std::string suffix = getExtentionName(filename);
CCLOG("suffix = %s", suffix.c_str());
@ -824,12 +824,12 @@ Component* CSLoader::loadComAudio(const rapidjson::Value &json)
return audio;
}
cocos2d::Node* CSLoader::createNodeWithDataBuffer(const Data data)
cocos2d::Node* CSLoader::createNode(const Data data)
{
return createNodeWithDataBuffer(data, nullptr);
return createNode(data, nullptr);
}
Node * CSLoader::createNodeWithDataBuffer(const Data data, const ccNodeLoadCallback &callback)
Node * CSLoader::createNode(const Data data, const ccNodeLoadCallback &callback)
{
CSLoader * loader = CSLoader::getInstance();
Node * node = nullptr;
@ -979,7 +979,7 @@ Node* CSLoader::nodeWithFlatBuffers(const flatbuffers::NodeTree *nodetree, const
if (filePath != "" && FileUtils::getInstance()->isFileExist(filePath))
{
Data buf = FileUtils::getInstance()->getDataFromFile(filePath);
node = createNodeWithDataBuffer(buf, callback);
node = createNode(buf, callback);
action = timeline::ActionTimelineCache::getInstance()->loadAnimationWithDataBuffer(buf, filePath);
}
else

View File

@ -79,11 +79,11 @@ public:
static cocos2d::Node* createNode(const std::string& filename);
static cocos2d::Node* createNode(const std::string& filename, const ccNodeLoadCallback& callback);
static cocos2d::Node* createNodeWithDataBuffer(const Data data);
static cocos2d::Node* createNodeWithDataBuffer(const Data data, const ccNodeLoadCallback &callback);
static cocos2d::Node* createNode(const Data data);
static cocos2d::Node* createNode(const Data data, const ccNodeLoadCallback &callback);
static cocostudio::timeline::ActionTimeline* createTimeline(const std::string& filename);
static cocostudio::timeline::ActionTimeline* createTimelineWithDataBuffer(const Data data, const std::string& filename);
static cocostudio::timeline::ActionTimeline* createTimeline(const Data data, const std::string& filename);
/*
static cocostudio::timeline::ActionTimelineNode* createActionTimelineNode(const std::string& filename);

View File

@ -67,8 +67,8 @@ void TestActionTimeline::onEnter()
ActionTimelineBaseTest::onEnter();
Data data = FileUtils::getInstance()->getDataFromFile("ActionTimeline/DemoPlayer.csb");
Node* node = CSLoader::createNodeWithDataBuffer(data);
ActionTimeline* action = CSLoader::createTimelineWithDataBuffer(data, "ActionTimeline/DemoPlayer.csb");
Node* node = CSLoader::createNode(data);
ActionTimeline* action = CSLoader::createTimeline(data, "ActionTimeline/DemoPlayer.csb");
node->runAction(action);
action->gotoFrameAndPlay(0);