Class Tileset
- Namespace
- DotTiled
- Assembly
- DotTiled.dll
A tileset is a collection of tiles that can be used in a tile layer, or by tile objects.
public class Tileset : HasPropertiesBase, IHasProperties
- Inheritance
-
Tileset
- Implements
- Inherited Members
Properties
Class
The class of this tileset.
public string Class { get; set; }
Property Value
Columns
The number of tile columns in the tileset.
public required uint Columns { get; set; }
Property Value
FillMode
The fill mode to use when rendering tiles from this tileset.
public FillMode FillMode { get; set; }
Property Value
FirstGID
The first global tile ID of this tileset (this global ID maps to the first tile in this tileset).
public Optional<uint> FirstGID { get; set; }
Property Value
Grid
Ths is only used in case of isometric orientation, and determines how tile overlays for terrain and collision information are rendered.
public Optional<Grid> Grid { get; set; }
Property Value
Image
If the tileset is based on a single image, which is cut into tiles based on the given attributes of the tileset, then this is that image.
public Optional<Image> Image { get; set; }
Property Value
Margin
The margin around the tiles in this tileset (applies to the tileset image). Irrelevant for image collection tilesets.
public uint Margin { get; set; }
Property Value
Name
The name of this tileset.
public required string Name { get; set; }
Property Value
ObjectAlignment
Controls the aligntment for tile objects.
public ObjectAlignment ObjectAlignment { get; set; }
Property Value
Properties
Tileset properties.
public List<IProperty> Properties { get; set; }
Property Value
RenderSize
The size to use when rendering tiles from thie tileset on a tile layer. When set to Grid, the tile is drawn at the tile grid size of the map.
public TileRenderSize RenderSize { get; set; }
Property Value
Source
If this tileset is stored in an external TSX (Tile Set XML) file, this attribute refers to that file.
public Optional<string> Source { get; set; }
Property Value
Spacing
The spacing in pixels between the tiles in this tileset (applies to the tileset image). Irrelevant for image collection tilesets.
public uint Spacing { get; set; }
Property Value
TileCount
The number of tiles in this tileset.
public required uint TileCount { get; set; }
Property Value
TileHeight
The height of the tiles in this tileset, which should be at least 1 (non-zero) except in the case of image collection tilesets (in which case it stores the maximum tile height).
public required uint TileHeight { get; set; }
Property Value
TileOffset
This is used to specify an offset in pixels, to be applied when drawing a tile from the related tileset. When not present, no offset is applied.
public Optional<TileOffset> TileOffset { get; set; }
Property Value
TileWidth
The width of the tiles in this tileset, which should be at least 1 (non-zero) except in the case of image collection tilesets (in which case it stores the maximum tile width).
public required uint TileWidth { get; set; }
Property Value
TiledVersion
The Tiled version used to save the file in case it was loaded from an external tileset file.
public Optional<string> TiledVersion { get; set; }
Property Value
Tiles
If this tileset is based on a collection of images, then this list of tiles will contain the individual images that make up the tileset.
public List<Tile> Tiles { get; set; }
Property Value
Transformations
Used to describe which transformations can be applied to the tiles (e.g. to extend a Wang set by transforming existing tiles).
public Optional<Transformations> Transformations { get; set; }
Property Value
Version
The TMX format version. Is incremented to match minor Tiled releases.
public Optional<string> Version { get; set; }
Property Value
Wangsets
Contains the list of Wang sets defined for this tileset.
public List<Wangset> Wangsets { get; set; }
Property Value
Methods
GetProperties()
The properties attached to the object.
public override IList<IProperty> GetProperties()