TMXDocument

public class
loom2d.tmx.TMXDocument

Description

A class used to parse and store data from a TMX file, including tile/object layers and their properties.

API overview

Constructor

TMXDocument ( filename: String )

Attributes

Public attributes

backgroundcolor: String
height: Number
imageLayers: Vector.<TMXImageLayer>
layers: Vector.<TMXLayer>
objectGroups: Vector.<TMXObjectGroup>
onImageLayerParsed: TMXImageLayerParsedCallback
onLayerParsed: TMXLayerParsedCallback
onObjectGroupParsed: TMXObjectGroupParsedCallback
onPropertiesParsed: TMXPropertiesParsedCallback
onTMXLoadComplete: TMXLoadCompleteCallback
onTMXUpdated: TMXUpdatedCallback
onTilesetParsed: TMXTilesetParsedCallback
orientation: String
properties: Dictionary.<String, String>
tileHeight: Number
tileWidth: Number
tilesets: Vector.<TMXTileset>
version: Number
width: Number

Functions

Public functions

getLayerByName ( name: String ): TMXLayer
load (): Void
loadProperties ( element: XMLElement , propertiesMap: Dictionary.<String, String> ): Void static

Constructor

TMXDocument ( filename: String )

Attributes

backgroundcolor: String

height: Number

imageLayers: Vector.<TMXImageLayer>

layers: Vector.<TMXLayer>

objectGroups: Vector.<TMXObjectGroup>

onImageLayerParsed: TMXImageLayerParsedCallback

onLayerParsed: TMXLayerParsedCallback

onObjectGroupParsed: TMXObjectGroupParsedCallback

onPropertiesParsed: TMXPropertiesParsedCallback

onTMXLoadComplete: TMXLoadCompleteCallback

onTMXUpdated: TMXUpdatedCallback

onTilesetParsed: TMXTilesetParsedCallback

orientation: String

properties: Dictionary.<String, String>

tileHeight: Number

tileWidth: Number

tilesets: Vector.<TMXTileset>

version: Number

width: Number

Functions

getFullTypeName (): String
Inherited from Object

native

Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.


Returns

String fully qualified type name of the Object.

getLayerByName ( name: String ): TMXLayer

Parameters

name: String


getType (): Type
Inherited from Object

native

Gets the Type that describes the Object.


Returns

Type The Type that describes the object.

getTypeName (): String
Inherited from Object

native

Gets the type name of the Object.


Returns

String type name of the Object.

load (): Void



loadProperties ( element: XMLElement , propertiesMap: Dictionary.<String, String> ): Void

static

Parameters

element: XMLElement
propertiesMap: Dictionary.<String, String>


toString (): String
Inherited from Object

native

Returns a String that describes the Object. This can be overriden to provide extra details when printing objects using trace().


Returns

String String that described the Object.

: