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-04-26 14:32:17 +08:00
|
|
|
void setObjectGroups(CCArray* pval);
|
|
|
|
CCArray* getObjectGroups();
|
2011-08-02 16:21:23 +08:00
|
|
|
|
2012-04-26 14:32:17 +08:00
|
|
|
void setProperties(CCDictionary* pval);
|
|
|
|
CCDictionary* getProperties();
|
2011-08-02 16:21:23 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
CCTMXLayer* getLayer(const char *layerName);
|
|
|
|
CCTMXObjectGroup* getObjectGroup(const char *groupName);
|
|
|
|
CCString* getProperty(const char *propertyName);
|
|
|
|
CCDictionary* getPropertiesForGID(int GID);
|
2011-08-02 16:21:23 +08:00
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCTMXTiledMap * create(const char *tmxFile);
|
2012-08-10 18:14:04 +08:00
|
|
|
static CCTMXTiledMap* createWithXML(const char* tmxString, const char* resourcePath);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|