cocos2d3.3不能播放cocostudio导出的粒子动画

cocostudio动画编辑器中加入粒子效果,cocos2d3.3在播放的时候报错:  The value type isn't Type::MAP


在 CCDataReaderHelper.cpp 的 1335 行加上: 

此方法中  void DataReaderHelper::addDataFromJsonCache(const std::string& fileContent, DataInfo *dataInfo)


std::string plistPath = filePath + ".plist";
std::string pngPath =  filePath + ".png";

//增加下面两行就行
+     ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(dataInfo->baseFilePath + plistPath);
+     if (dict.find("particleLifespan") != dict.end()) continue;


 ArmatureDataManager::getInstance()->addSpriteFrameFromFile((dataInfo->baseFilePath + plistPath).c_str(), (dataInfo->baseFilePath + pngPath).c_str(), dataInfo->filename.c_str());

猜你喜欢

转载自blog.csdn.net/c471961491/article/details/52946845
今日推荐