Instance Method

setTileGroup(_:forColumn:row:)

Set the tile group at the specified tile index.

Declaration

func setTileGroup(_ tileGroup: SKTileGroup?, forColumn column: Int, row: Int)

Parameters

tileGroup

The tile group to place in the map.

column

The column index of the tile.

row

The row index of the tile.

Discussion

This function is for use when you're creating a tile map programmatically, versus creating it ahead of time with the scene editor.

When enableAutomapping is set to true, the surrounding tiles of a painted area will be controlled by the tile group, too. When automapping is disabled, just the tile definition will be placed without modify any of the neighboring tiles.

See Also

Defining a Tile Map's Contents

var enableAutomapping: Bool

When creating a tile map node programmatically, specifies whether the tile map uses automapping behavior like the scene editor.

func fill(with: SKTileGroup?)

When creating a tile map node programmatically, this function performs a fill operation with the specified tile group.

func setTileGroup(SKTileGroup, andTileDefinition: SKTileDefinition, forColumn: Int, row: Int)

Set the tile group and tile definition at the specified tile index.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software