Class cc.TMXMapInfo
- Defined in: CCTMXXMLParser.js
- Extends cc.SAXParser
Constructor Attributes | Constructor Name and Description |
---|---|
cc.TMXMapInfo contains the information about the map like: And it also contains: This information is obtained from the TMX file. |
Method Summary
Class Detail
cc.TMXMapInfo()
cc.TMXMapInfo contains the information about the map like:
- Map orientation (hexagonal, isometric or orthogonal)
- Tile size
- Map size
And it also contains:
- Layers (an array of TMXLayerInfo objects)
- Tilesets (an array of TMXTilesetInfo objects)
- ObjectGroups (an array of TMXObjectGroupInfo objects)
This information is obtained from the TMX file.
Method Detail
-
Creates a TMX Format with a tmx file
- Parameters:
- {String} tmxFile
- {String} resourcePath
- Returns:
- {cc.TMXMapInfo}
-
creates a TMX Format with an XML string and a TMX resource path
- Parameters:
- {String} tmxString
- {String} resourcePath
- Returns:
- {cc.TMXMapInfo}
-
{String} getCurrentString()
- Returns:
- {String}
-
{Number} getLayerAttribs()layer attribute
- Returns:
- {Number}
-
{Array} getLayers()Layers
- Returns:
- {Array}
-
{cc.Size} getMapSize()Map width & height
- Returns:
- {cc.Size}
-
{Array} getObjectGroups()ObjectGroups
- Returns:
- {Array}
-
{Number} getOrientation()
- Returns:
- {Number}
-
{Number} getParentElement()parent element
- Returns:
- {Number}
-
{Number} getParentGID()parent GID
- Returns:
- {Number}
-
{Array} getProperties()Properties
- Returns:
- {Array}
-
{Boolean} getStoringCharacters()is string characters?
- Returns:
- {Boolean}
-
{object} getTileProperties()
- Returns:
- {object}
-
{Array} getTilesets()tilesets
- Returns:
- {Array}
-
{cc.Size} getTileSize()Tiles width & height
- Returns:
- {cc.Size}
-
{String} getTMXFileName()
- Returns:
- {String}
-
{Element} initWithTMXFile(tmxFile, resourcePath)Initializes a TMX format with a tmx file
- Parameters:
- {String} tmxFile
- {String} resourcePath
- Returns:
- {Element}
-
{Boolean} initWithXML(tmxString, resourcePath)initializes a TMX format with an XML string and a TMX resource path
- Parameters:
- {String} tmxString
- {String} resourcePath
- Returns:
- {Boolean}
-
{Element} parseXMLFile(tmxFile, isXmlString)Initalises parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file
- Parameters:
- {String} tmxFile
- {boolean} isXmlString Optional, Default: false
- Returns:
- {Element}
-
{Boolean} parseXMLString(xmlString)initializes parsing of an XML string, either a tmx (Map) string or tsx (Tileset) string
- Parameters:
- {String} xmlString
- Returns:
- {Boolean}
-
setCurrentString(currentString)
- Parameters:
- {String} currentString
-
setLayerAttribs(Var)
- Parameters:
- {Number} Var
-
setLayers(Var)
- Parameters:
- {cc.TMXLayerInfo} Var
-
setMapSize(Var)
- Parameters:
- {cc.Size} Var
-
setObjectGroups(Var)
- Parameters:
- {cc.TMXObjectGroup} Var
-
setOrientation(Var)
- Parameters:
- {Number} Var
-
setParentElement(Var)
- Parameters:
- {Number} Var
-
setParentGID(Var)
- Parameters:
- {Number} Var
-
setProperties(Var)
- Parameters:
- {object} Var
-
setStoringCharacters(Var)
- Parameters:
- {Boolean} Var
-
setTileProperties(tileProperties)
- Parameters:
- {object} tileProperties
-
setTilesets(Var)
- Parameters:
- {cc.TMXTilesetInfo} Var
-
setTileSize(Var)
- Parameters:
- {cc.Size} Var
-
setTMXFileName(fileName)
- Parameters:
- {String} fileName