Reader
format.tmx.Reader (Class)
... @author Yanrishatum
Instance Members
resolveTSX(): TmxTileset
For seamless TSX resolving during initial parsing. Should return corresponding TSX. Caching should be done from outside.
Returns |
---|
TmxTileset |
resolveTemplate(): TmxObjectTemplate
For seamless Template resolving during initial parsing.
Returns |
---|
TmxObjectTemplate |
resolveTypeTemplate(): TmxObjectTypeTemplate
For seamless Type Template resolving during initial parsing.
Returns |
---|
TmxObjectTypeTemplate |
Reads TMX file. @return
Name | Type | Default |
---|---|---|
xml |
Xml | |
localPath |
String | (optional) |
Returns |
---|
TmxMap |
readTSX(xml: Xml, ?root: TmxTileset = null): TmxTileset
Reads TSX file.
Name | Type | Default | Description |
---|---|---|---|
xml |
Xml | ||
root |
TmxTileset | null |
Root Tileset into which read TSX data. |
Returns | Description |
---|---|
TmxTileset | Resulting TmxTileset. If root is null - returns new TmxTileset object, otherwise root is returned. |
Reads objecttypes.xml file.
Name | Type | Default | Description |
---|---|---|---|
xml |
Xml | ||
root |
TmxMap | null |
Optional root TMX file to propagate those types into. It uses Tools.propagateObjectTypes function with default propagation rules. |
Returns | Description |
---|---|
Map | Map with object type templates. Always pass null, if using during resolveTypeTemplate |
readTemplate(xml: Xml): TmxObjectTemplate
Reads TX file.
Name | Type |
---|---|
xml |
Xml |
Returns |
---|
TmxObjectTemplate |
new(): Void
Private Members
customUncompressors: Map
customEncoders: Map
width: Int
height: Int
resolveGroup(input: haxe.xml._Access.Fast): TmxGroup
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
Returns |
---|
TmxGroup |
resolveStaggerIndex(input: String): Anonymous
Name | Type |
---|---|
input |
String |
Returns |
---|
Anonymous |
resolveStaggerAxis(input: String): Anonymous
Name | Type |
---|---|
input |
String |
Returns |
---|
Anonymous |
resolveOrientation(input: String): Anonymous
Name | Type |
---|---|
input |
String |
Returns |
---|
Anonymous |
Name | Type |
---|---|
input |
String |
Returns |
---|
Int |
resolveRenderOrder(input: String): Anonymous
Name | Type |
---|---|
input |
String |
Returns |
---|
Anonymous |
resolveTileset(input: haxe.xml._Access.Fast, root: TmxTileset): TmxTileset
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
root |
TmxTileset |
Returns |
---|
TmxTileset |
resolveWangSet(input: haxe.xml._Access.Fast): TmxWangSet
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
Returns |
---|
TmxWangSet |
resolveWangSetColor(input: haxe.xml._Access.Fast): TmxWangSetColor
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
Returns |
---|
TmxWangSetColor |
resolveImage(input: haxe.xml._Access.Fast): TmxImage
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
Returns |
---|
TmxImage |
resolveData(input: haxe.xml._Access.Fast, ?isTileData: Bool = true): TmxData
Name | Type | Default |
---|---|---|
input |
haxe.xml._Access.Fast | |
isTileData |
Bool | true |
Returns |
---|
TmxData |
uncompressData(i: haxe.io.Input, compression: Anonymous): haxe.io.Bytes
Name | Type |
---|---|
i |
haxe.io.Input |
compression |
Anonymous |
Returns |
---|
haxe.io.Bytes |
resolveTileLayer(input: haxe.xml._Access.Fast): TmxTileLayer
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
Returns |
---|
TmxTileLayer |
resolveDraworder(input: String): Anonymous
Name | Type |
---|---|
input |
String |
Returns |
---|
Anonymous |
resolveObjectGroup(input: haxe.xml._Access.Fast): TmxObjectGroup
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
Returns |
---|
TmxObjectGroup |
resolveObject(obj: haxe.xml._Access.Fast, ?applyObjectTypeTemplate: Bool = true): TmxObject
Name | Type | Default |
---|---|---|
obj |
haxe.xml._Access.Fast | |
applyObjectTypeTemplate |
Bool | true |
Returns |
---|
TmxObject |
readPoints(input: haxe.xml._Access.Fast): Array<TmxPoint>
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
Returns |
---|
Array<TmxPoint> |
resolveText(input: haxe.xml._Access.Fast): TmxText
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
Returns |
---|
TmxText |
resolveImageLayer(input: haxe.xml._Access.Fast): TmxImageLayer
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
Returns |
---|
TmxImageLayer |
resolveProperties(input: haxe.xml._Access.Fast): TmxProperties
Name | Type |
---|---|
input |
haxe.xml._Access.Fast |
Returns |
---|
TmxProperties |