Tileset constructor
Tileset({
- int? firstGid,
- String? source,
- String? name,
- int? tileWidth,
- int? tileHeight,
- int spacing = 0,
- int margin = 0,
- int? tileCount,
- int? columns,
- ObjectAlignment objectAlignment = ObjectAlignment.unspecified,
- List<
Tile> tiles = const [], - TiledImage? image,
- TileOffset? tileOffset,
- Grid? grid,
- CustomProperties properties = CustomProperties.empty,
- List<
Terrain> terrains = const [], - List<
WangSet> wangSets = const [], - String version = '1.0',
- String? tiledVersion,
- String? backgroundColor,
- String? transparentColor,
- TilesetType type = TilesetType.tileset,
Implementation
Tileset({
this.firstGid,
this.source,
this.name,
this.tileWidth,
this.tileHeight,
this.spacing = 0,
this.margin = 0,
this.tileCount,
this.columns,
this.objectAlignment = ObjectAlignment.unspecified,
List<Tile> tiles = const [],
this.image,
this.tileOffset,
this.grid,
this.properties = CustomProperties.empty,
this.terrains = const [],
this.wangSets = const [],
this.version = '1.0',
this.tiledVersion,
this.backgroundColor,
this.transparentColor,
this.type = TilesetType.tileset,
}) : tiles = _generateTiles(
tiles,
tileCount ?? 0,
columns,
tileWidth,
tileHeight,
) {
tileCount = this.tiles.length;
}