init(tileSet:columns:rows:tileSize:)
Creates and initializes a tile map node using the provided tile set with a specified number of columns and rows.
Declaration
init(tileSet: SKTileSet, columns: Int, rows: Int, tileSize: CGSize)Parameters
- tileSet:
The tile set that is used to render the tiles
- columns:
The number of columns in the map
- rows:
The number of rows in the map
- tileSize:
The size of each tile in points
Return Value
A new tile map node.
Discussion
Creates an empty tile map.
For a grid set type, the overall size in points of the node will be numberOfColumns * tileSize.width wide and numberOfRows * tileSize.height high.