Skip to main content

CCTMXMapInfo

CCTMXMapInfo

Cocos2D

CCTMXMapInfo 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.

Inheritance: System.Object

Implements: Cocos2D.ICCSAXDelegator

Constructors

CCTMXMapInfo(StreamReader)

CCTMXMapInfo(StreamReader)(System.IO.StreamReader stream)
Parameters:
stream (System.IO.StreamReader)

CCTMXMapInfo(string)

CCTMXMapInfo(string)(System.String tmxFile)

creates a TMX Format with a tmx file

Parameters:
tmxFile (System.String)
Example

Fields

m_bStoringCharacters(System.Boolean)
m_nLayerAttribs(System.Int32)
m_nOrientation(System.Int32)
m_nParentElement(System.Int32)
m_pLayers(System.Collections.Generic.ListCocos2D.CCTMXLayerInfo)
m_pObjectGroups(System.Collections.Generic.ListCocos2D.CCTMXObjectGroup)
m_pProperties(System.Collections.Generic.DictionarySystem.String,System.String)
m_pTileProperties(System.Collections.Generic.DictionarySystem.UInt32,System.Collections.Generic.DictionarySystem.String,System.String)
m_pTilesets(System.Collections.Generic.ListCocos2D.CCTMXTilesetInfo)
m_sCurrentString(System.Byte[])
m_sTMXFileName(System.String)
m_tMapSize(Cocos2D.CCSize)
m_tTileSize(Cocos2D.CCSize)
m_uCurrentFirstGID(System.UInt32)
m_uParentGID(System.UInt32)

Properties

CurrentString(System.Byte[])

! current string

LayerAttribs(System.Int32)

layer attribs

Layers(System.Collections.Generic.ListCocos2D.CCTMXLayerInfo)

Layers

MapSize(Cocos2D.CCSize)

map width and height

ObjectGroups(System.Collections.Generic.ListCocos2D.CCTMXObjectGroup)

ObjectGroups

Orientation(System.Int32)

map orientation

ParentElement(System.Int32)

parent element

ParentGID(System.UInt32)

parent GID

Properties(System.Collections.Generic.DictionarySystem.String,System.String)

properties

StoringCharacters(System.Boolean)

is stroing characters?

TMXFileName(System.String)

! tmx filename

TileProperties(System.Collections.Generic.DictionarySystem.UInt32,System.Collections.Generic.DictionarySystem.String,System.String)

! tile properties

TileSize(Cocos2D.CCSize)

tiles width and height

Tilesets(System.Collections.Generic.ListCocos2D.CCTMXTilesetInfo)

tilesets

Methods

EndElement(object, string)

EndElement(object, string)(System.Object ctx, System.String elementName)
Parameters:
ctx (System.Object)
elementName (System.String)
Example

InitWithTmxFile(string)

System.Boolean InitWithTmxFile(string)(System.String tmxFile)

initializes a TMX format witha tmx file

Parameters:
tmxFile (System.String)
Returns:
System.Boolean
Example

InitWithXml(string, string)

System.Boolean InitWithXml(string, string)(System.String tmxString, System.String resourcePath)
Parameters:
tmxString (System.String)
resourcePath (System.String)
Returns:
System.Boolean

ParseXmlFile(string)

System.Boolean ParseXmlFile(string)(System.String xmlFilename)

initalises parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file

Parameters:
xmlFilename (System.String)
Returns:
System.Boolean
Example

ParseXmlString(string)

System.Boolean ParseXmlString(string)(System.String data)
Parameters:
data (System.String)
Returns:
System.Boolean

StartElement(object, string, string[])

StartElement(object, string, string[])(System.Object ctx, System.String name, System.String[] atts)
Parameters:
ctx (System.Object)
name (System.String)
atts (System.String[])
Example

TextHandler(object, byte[], int)

TextHandler(object, byte[], int)(System.Object ctx, System.Byte[] ch, System.Int32 len)
Parameters:
ctx (System.Object)
ch (System.Byte[])
len (System.Int32)
Example