1、CCTMXTiledMap
CCTMXLayer* layer =
map->layerNamed(
"layer_0");
2、CCTMXLayer
//返回图层尺寸的大小virtual const CCSize & getLayerSize (void)
//设置图层尺寸的大小virtual void setLayerSize (const CCSize &var)//返回砖块尺寸的大小virtual const CCSize & getMapTileSize (void)
//设置砖块尺寸的大小virtual void setMapTileSize (const CCSize &var)
//返回砖块属性信息virtual CCTMXTilesetInfo * getTileSet (void)
//设置砖块属性信息virtual void setTileSet (CCTMXTilesetInfo *var)
//返回图层属性字典(包含了所有属性)virtual CCDictionary * getProperties (void)
//设置图层属性virtual void setProperties (CCDictionary *var)
//初始化函数,参数为:砖块配置对象,图形配置对象,地图配置对象bool initWithTilesetInfo (CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo)
//释放图层中砖块的拼接信息void releaseMap ()
//返回指定位置的砖块对象CCSprite * tileAt (const CCPoint &tileCoordinate)
//返回指定位置砖块对象的IDunsigned int tileGIDAt (const CCPoint &tileCoordinate)
//返回指定位置砖块对象的IDunsigned int tileGIDAt (const CCPoint &tileCoordinate, ccTMXTileFlags *flags)
//设置指定位置砖块对象的IDvoid setTileGID (unsigned int gid, const CCPoint &tileCoordinate)
//设置指定位置砖块对象的IDvoid setTileGID (unsigned int gid, const CCPoint &tileCoordinate, ccTMXTileFlags flags)
//移除指定位置砖块对象void removeTileAt (const CCPoint &tileCoordinate)
//返回指定坐标的地图位置CCPoint positionAt (const CCPoint &tileCoordinate)
//返回指定属性数值CCString * propertyNamed (const char *propertyName)
//创建图层中的砖块void setupTiles ()
//得到图层的名字const char * getLayerName ()
//设置图层的名字void setLayerName (const char *layerName)
-----------------------