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
TileSet
Declaration
Swift
public let name: String
-
The user specified
Properties
of theTileSet
Declaration
Swift
public var properties: Properties
-
The number of tiles in the
TileSet
Declaration
Swift
public var count: Int { get }
-
Creates a new instance of the a
TileSet
Declaration
Swift
public init(name: String, tileSize: PixelSize, properties: Properties)
Parameters
name
The name of the
TileSet
tileSize
The size of the
Tile
s in theTileSet
properties
Any user specified
Properties
-
Creates and returns an instance of
TileSetLoader
which will load tilesets from Tiled tsx filesDeclaration
Swift
public static func loader(for project: Project) -> ResourceLoader
Parameters
project
The project the
TileSet
will 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
TileSet
should be the same across allMap
s in a project so no deep copy is doneDeclaration
Swift
public func newInstance() -> Self
Return Value
self