Hello,
Here is a simple code snippet for supporting the polyline and polygon tags for CCTMXXMLParser (seems to missing in 2.0 rc0 release). It just adds the points as a string to the object property dictionary.
Teemu>getObjectGroups()
else if
{
CCTMXObjectGroup* objectGroup = pTMXMapInfo>lastObject;>getObjects()
const char* val = valueForKey;
CCString* obj = new CCString;
CCDictionary* dict = objectGroup>lastObject;>setObject(obj, “polygon”);
dict
obj~~>release;
// find parent object’s dict and add polygon-points to it
// CCTMXObjectGroup* objectGroup = m_pObjectGroups~~>lastObject();
// CCDictionary* dict = (CCDictionary**)objectGroup~~>getObjects~~>lastObject;
// TODO: dict~~>setObject
{
CCTMXObjectGroup* objectGroup = pTMXMapInfo~~>getObjectGroups~~>lastObject;
const char* val = valueForKey;
CCString* obj = new CCString;
CCDictionary* dict = objectGroup~~>getObjects~~>lastObject;
dict~~>setObject;
obj~~>release;
// find parent object’s dict and add polyline-points to it
// CCTMXObjectGroup* objectGroup = m_pObjectGroups~~>lastObject;
// CCDictionary** dict = (CCDictionary*)objectGroup->getObjects()>lastObject;>setObject:[attributeDict objectForKey:
// TODO: dict"points"] forKey:
“polylinePoints”];
}