2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
/** Orthogonal orientation */
|
|
|
|
CCTMXOrientationOrtho,
|
|
|
|
/** Hexagonal orientation */
|
|
|
|
CCTMXOrientationHex,
|
|
|
|
/** Isometric orientation */
|
|
|
|
CCTMXOrientationIso,
|
|
|
|
};
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCTMXTiledMap : public CCNode
|
|
|
|
{
|
|
|
|
void setMapSize(CCSize sz);
|
|
|
|
CCSize getMapSize();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void setTileSize(CCSize sz);
|
|
|
|
CCSize getTileSize();
|
2011-08-02 16:21:23 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void setMapOrientation(int val);
|
|
|
|
int getMapOrientation();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void setObjectGroups(CCMutableArray<CCTMXObjectGroup*>* pval);
|
|
|
|
CCMutableArray<CCTMXObjectGroup*>* getObjectGroups();
|
2011-08-02 16:21:23 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void setProperties(CCStringToStringDictionary* pval);
|
|
|
|
CCStringToStringDictionary* getProperties();
|
2011-08-02 16:21:23 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
CCTMXLayer* layerNamed(const char *layerName);
|
|
|
|
CCTMXObjectGroup* objectGroupNamed(const char *groupName);
|
|
|
|
CCString *propertyNamed(const char *propertyName);
|
|
|
|
CCDictionary<std::string, CCString*> *propertiesForGID(int GID);
|
2011-08-02 16:21:23 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
static CCTMXTiledMap * tiledMapWithTMXFile(const char *tmxFile);
|
|
|
|
};
|