CCTMXMapInfo
CCTMXMapInfo
Cocos2DCCTMXMapInfo 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
Properties
! current string
layer attribs
Layers
map width and height
ObjectGroups
map orientation
parent element
parent GID
properties
is stroing characters?
! tmx filename
! tile properties
tiles width and height
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