1.从plist 读取配置
2.0做法:
CCArray* pKeyArray = CCArray::createWithContentsOfFile(levelFile);
pKeyArray->retain();
CCObject* pObj = NULL;
CCARRAY_FOREACH(pKeyArray, pObj)
{
CCDictionary *waveItem = (CCDictionary*)pObj;
<span style=”white-space:pre”> </span>…
}
3.0做法:
ValueVector arr = FileUtils::getInstance()->getValueVectorFromFile(levelFile);
for(auto obj : arr)
{
ValueMap map = obj.asValueMap();
CCLOG(“obj.getType():%d “,map[“showTime”].asInt());