| cocos2d-x 3.0 |
)- 类列表 - 类索引 - 类继承关系 - 类成员
全部) 类) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义) 组) 页)
Public 成员函数 | 静态 Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
TMXMapInfo类 参考 TileMap, Parallax
TMXMapInfo所包含的一些map的信息: 更多…
#include
类 TMXMapInfo 继承关系图:
| ## Public 成员函数 | |
| TMXMapInfo () | |
| ctor 更多… | |
| virtual | ~TMXMapInfo () |
| NA NA 更多… | |
| bool | initWithTMXFile (const std::string &tmxFile) |
| 使用指定tmx文件格式初始化一个TMX 更多… | |
| bool | initWithXML (const std::string &tmxString, const std::string &resourcePath) |
| 使用指定XML字符串和TMX资源路径(TMX resource path)格式初始化一个TMX 更多… | |
| bool | parseXMLFile (const std::string &xmlFilename) |
| 通过解析一个XML文件,tmx(Map)文件或tsx(Tileset)文件初始化一个TMX 更多… | |
| bool | parseXMLString (const std::string &xmlString) |
| ValueMapIntKey & | getTileProperties () |
| void | setTileProperties (const ValueMapIntKey &tileProperties) |
| int | getOrientation () const |
| 地图定向(orientation) 更多… | |
| void | setOrientation (int orientation) |
| const Size & | getMapSize () const |
| 地图尺寸(宽和高) 更多… | |
| void | setMapSize (const Size &mapSize) |
| const Size & | getTileSize () const |
| tiles尺寸(宽和高) 更多… | |
| void | setTileSize (const Size &tileSize) |
| const Vector< TMXLayerInfo > & | getLayers () const |
| Layers. 更多… | |
| Vector< TMXLayerInfo > & | getLayers () |
| void | setLayers (const Vector< TMXLayerInfo > &layers) |
| const Vector< TMXTilesetInfo > & | getTilesets () const |
| tilesets 更多… | |
| Vector< TMXTilesetInfo > & | getTilesets () |
| void | setTilesets (const Vector< TMXTilesetInfo > &tilesets) |
| const Vector< TMXObjectGroup > & | getObjectGroups () const |
| 对象组(ObjectGroups) 更多… | |
| Vector< TMXObjectGroup > & | getObjectGroups () |
| void | setObjectGroups (const Vector< TMXObjectGroup > &groups) |
| int | getParentElement () const |
| 父元素 更多… | |
| void | setParentElement (int element) |
| int | getParentGID () const |
| 父全局标识(GID) 更多… | |
| void | setParentGID (int gid) |
| int | getLayerAttribs () const |
| layer属性 更多… | |
| void | setLayerAttribs (int layerAttribs) |
| bool | isStoringCharacters () const |
| TMX文件中data元素内容是否为base64字符(TMX文件中data元素是否以base64字符信息保存) 更多… | |
| CC_DEPRECATED_ATTRIBUTE bool | getStoringCharacters () const |
| void | setStoringCharacters (bool storingCharacters) |
| const ValueMap & | getProperties () const |
| 属性 更多… | |
| ValueMap & | getProperties () |
| void | setProperties (const ValueMap &properties) |
| void | startElement (void ctx, const char name, const char **atts) |
| NA NA 更多… | |
| void | endElement (void ctx, const char name) |
| NA NA 更多… | |
| void | textHandler (void ctx, const char ch, int len) |
| NA NA 更多… | |
| const std::string & | getCurrentString () const |
| void | setCurrentString (const std::string ¤tString) |
| const std::string & | getTMXFileName () const |
| void | setTMXFileName (const std::string &fileName) |
Public 成员函数 继承自 Ref | |
| void | retain () |
| 保留所有权. 更多… | |
| void | release () |
| 立即释放所有权. 更多… | |
| Ref | autorelease () |
| 自动释放所有权在不久的将来. 更多… | |
| unsigned int | getReferenceCount () const |
| 返回Ref对象当前的引用计数. 更多… | |
| virtual | ~Ref () |
| NA NA 更多… | |
Public 成员函数 继承自 SAXDelegator | |
| virtual | ~SAXDelegator () |
| ## 静态 Public 成员函数 | |
| static TMXMapInfo | create (const std::string &tmxFile) |
| 创建一个指定tmx文件格式的TMX 更多… | |
| static TMXMapInfo | createWithXML (const std::string &tmxString, const std::string &resourcePath) |
| 创建一个指定XML字符串和TMX资源路径(TMX resource path)格式的TMX 更多… | |
| static CC_DEPRECATED_ATTRIBUTE TMXMapInfo | formatWithTMXFile (const char tmxFile) |
| 创建一个指定tmx文件格式的TMX 更多… | |
| static CC_DEPRECATED_ATTRIBUTE TMXMapInfo | formatWithXML (const char tmxString, const char *resourcePath) |
| 创建一个指定XML字符串和TMX资源路径(TMX resource path)格式的TMX 更多… | |
| ## Protected 成员函数 | |
| void | internalInit (const std::string &tmxFileName, const std::string &resourcePath) |
Protected 成员函数 继承自 Ref | |
| Ref () | |
| 构造函数 更多… | |
| ## Protected 属性 | |
| int | _orientation |
| 地图定向(orientation) 更多… | |
| Size | _mapSize |
| 地图尺寸(宽和高) 更多… | |
| Size | _tileSize |
| tiles尺寸(宽和高) 更多… | |
| Vector< TMXLayerInfo > | _layers |
| Layers. 更多… | |
| Vector< TMXTilesetInfo > | _tilesets |
| tilesets 更多… | |
| Vector< TMXObjectGroup * > | _objectGroups |
| 对象组(ObjectGroups) 更多… | |
| int | _parentElement |
| 父元素 更多… | |
| int | _parentGID |
| 父全局标识(GID) 更多… | |
| int | _layerAttribs |
| layer属性 更多… | |
| bool | _storingCharacters |
| TMX文件中data元素内容是否为base64字符(TMX文件中data元素是否以base64字符信息保存) 更多… | |
| ValueMap | _properties |
| 属性 更多… | |
| int | _xmlTileIndex |
| xml格式的tile索引 更多… | |
| std::string | _TMXFileName |
| tmx文件名 更多… | |
| std::string | _resources |
| std::string | _currentString |
| 当前所处理的字符信息 更多… | |
| ValueMapIntKey | _tileProperties |
| tile属性 更多… | |
| int | _currentFirstGID |
| bool | _recordFirstGID |
Protected 属性 继承自 Ref | |
| unsigned int | _referenceCount |
| 引用计数 更多… | |
详细描述
TMXMapInfo所包含的一些map的信息:
- 地图定向(orientation):六边形(hexagonal),等距斜视(isometric),直角鸟瞰(orthogonal)
- Tile尺寸
- 地图尺寸
以及如下:
- Layers (一组TMXLayerInfo对象)
- Tilesets (一组TMXTilesetInfo对象)
- ObjectGroups (一组TMXObjectGroupInfo对象)
这些信息均可从TMX文件中读取
构造及析构函数说明
| TMXMapInfo | ( | ) |
ctor
| virtual |
NA NA
成员函数说明
| static |
创建一个指定tmx文件格式的TMX
| static |
创建一个指定XML字符串和TMX资源路径(TMX resource path)格式的TMX
| virtual |
NA NA
实现了 SAXDelegator.
| inlinestatic |
创建一个指定tmx文件格式的TMX
| inlinestatic |
创建一个指定XML字符串和TMX资源路径(TMX resource path)格式的TMX
| inline |
| inline |
layer属性
| inline |
Layers.
| inline |
| inline |
地图尺寸(宽和高)
| inline |
对象组(ObjectGroups)
| inline |
| inline |
地图定向(orientation)
| inline |
父元素
| inline |
父全局标识(GID)
| inline |
属性
| inline |
| inline |
| inline |
| inline |
tilesets
| inline |
| inline |
tiles尺寸(宽和高)
| inline |
| bool initWithTMXFile | ( | const std::string & | tmxFile | ) |
使用指定tmx文件格式初始化一个TMX
| bool initWithXML | ( | const std::string & | tmxString, |
| const std::string & | resourcePath | ||
| ) |
使用指定XML字符串和TMX资源路径(TMX resource path)格式初始化一个TMX
| protected |
| inline |
TMX文件中data元素内容是否为base64字符(TMX文件中data元素是否以base64字符信息保存)
| bool parseXMLFile | ( | const std::string & | xmlFilename | ) |
通过解析一个XML文件,tmx(Map)文件或tsx(Tileset)文件初始化一个TMX
| bool parseXMLString | ( | const std::string & | xmlString | ) |
| inline |
| inline |
| inline |
| inline |
| inline |
| inline |
| inline |
| inline |
| inline |
| inline |
| inline |
| inline |
| inline |
| inline |
| virtual |
NA NA
实现了 SAXDelegator.
| virtual |
NA NA
实现了 SAXDelegator.
类成员变量说明
| protected |
| protected |
当前所处理的字符信息
| protected |
layer属性
| protected |
Layers.
| protected |
地图尺寸(宽和高)
| protected |
对象组(ObjectGroups)
| protected |
地图定向(orientation)
| protected |
父元素
| protected |
父全局标识(GID)
| protected |
属性
| protected |
| protected |
| protected |
TMX文件中data元素内容是否为base64字符(TMX文件中data元素是否以base64字符信息保存)
| protected |
tile属性
| protected |
tilesets
| protected |
tiles尺寸(宽和高)
| protected |
tmx文件名
| protected |
xml格式的tile索引
该类的文档由以下文件生成:
- /Users/zeroyang/Documents/github/cocos2d-x/cocos/2d/CCTMXXMLParser.h
- cocos2d
- TMXMapInfo
- 生成于 2014年 五月 29日 星期四 09:41:51 , 为 cocos2d-x使用
1.8.6
Public 成员函数 继承自 