new TmxLayer()
Object representing a layer of the tile map.
- Source:
Members
-
height :int
-
The height of the layer.
Type:
- int
- Source:
-
map :FM.TmxMap
-
The map that contains this layer.
Type:
- Source:
-
name :string
-
The name of the layer.
Type:
- string
- Source:
-
opacity :float
-
The opacity of the layer.
Type:
- float
- Source:
-
properties :FM.TmxPropertySet
-
The properties of the layer.
Type:
- Source:
-
tileGids :Array
-
The list of IDs of the tiles of the layer.
Type:
- Array
- Source:
-
visible :boolean
-
Whether the layer is visible or not.
Type:
- boolean
- Source:
-
width :int
-
The width of the layer.
Type:
- int
- Source:
-
x :int
-
The x position of the layer.
Type:
- int
- Source:
-
y :int
-
The y position of the layer.
Type:
- int
- Source:
Methods
-
csvToArray(pInput, pLineWidth) → {Array}
-
Convert a CSV string into an array.
Parameters:
Name Type Description pInput
string The csv data to convert. pLineWidth
int The number of tiles in a line. - Source:
Returns:
The array containing the data of the layer.- Type
- Array
-
load(pLayerNode, pParent)
-
Load the layer.
Parameters:
Name Type Description pLayerNode
Node The node containing the layer. pParent
FM.TmxMap The tile map that contains the layer. - Source:
-
toCsv(pTileSet) → {string}
-
Convert the layer into a csv string.
Parameters:
Name Type Description pTileSet
FM.TmxTileSet The tile set corresponding to this layer. - Source:
Returns:
The csv data of the layer.- Type
- string