TileSet
public class TileSet : Loadable, MutablePropertied
A TileSet represents a Tiled tile set, most typically loaded as part of loading a Map.
-
The name of the
TileSetDeclaration
Swift
public let name: String -
The user specified
Propertiesof theTileSetDeclaration
Swift
public var properties: Properties -
The number of tiles in the
TileSetDeclaration
Swift
public var count: Int { get } -
Creates a new instance of the a
TileSetDeclaration
Swift
public init(name: String, tileSize: PixelSize, properties: Properties)Parameters
nameThe name of the
TileSettileSizeThe size of the
Tiles in theTileSetpropertiesAny user specified
Properties -
Creates and returns an instance of
TileSetLoaderwhich will load tilesets from Tiled tsx filesDeclaration
Swift
public static func loader(for project: Project) -> ResourceLoaderParameters
projectThe project the
TileSetwill be loaded connected toReturn Value
An instance of
TileSetLoader -
Maps should be cached, as they are value types a new instance is created anyway so there will not be unintended side effects
Declaration
Swift
public let cache: Bool -
A
TileSetshould be the same across allMaps in a project so no deep copy is doneDeclaration
Swift
public func newInstance() -> SelfReturn Value
self
View on GitHub
TileSet Class Reference