Class cc.TMXTilesetInfo

Class Summary
Constructor Attributes Constructor Name and Description
 

cc.TMXTilesetInfo contains the information about the tilesets like:
- Tileset name
- Tileset spacing
- Tileset margin
- size of the tiles
- Image used for the tiles
- Image size
This information is obtained from the TMX file.

Method Summary

Class Detail

cc.TMXTilesetInfo()

cc.TMXTilesetInfo contains the information about the tilesets like:
- Tileset name
- Tileset spacing
- Tileset margin
- size of the tiles
- Image used for the tiles
- Image size
This information is obtained from the TMX file.

Field Detail

{number} firstGid
- First grid
{cc.Size|null} imageSize
- Size in pixels of the image
{number} margin
- Margin
{string} name
- Tileset name
{string} sourceImage
- Filename containing the tiles (should be sprite sheet / texture atlas)
{number} spacing
- Spacing

Method Detail

  • {cc.Rect} rectForGID(gid)
    Return rect
    Parameters:
    {Number} gid
    Returns:
    {cc.Rect}