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

View File

@ -79,11 +79,11 @@ public:
static cocos2d::Node* createNode(const std::string& filename); static cocos2d::Node* createNode(const std::string& filename);
static cocos2d::Node* createNode(const std::string& filename, const ccNodeLoadCallback& callback); static cocos2d::Node* createNode(const std::string& filename, const ccNodeLoadCallback& callback);
static cocos2d::Node* createNodeWithDataBuffer(const Data data); static cocos2d::Node* createNode(const Data data);
static cocos2d::Node* createNodeWithDataBuffer(const Data data, const ccNodeLoadCallback &callback); static cocos2d::Node* createNode(const Data data, const ccNodeLoadCallback &callback);
static cocostudio::timeline::ActionTimeline* createTimeline(const std::string& filename); 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); static cocostudio::timeline::ActionTimelineNode* createActionTimelineNode(const std::string& filename);

View File

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