Creating a Tile Map Programmatically

Overview

The collection of functions you use to create a tile map node programmatically.

Topics

Creating a Tile Map

- initWithTileSet:columns:rows:tileSize:

Creates and initializes a tile map node using the provided tile set with a specified number of columns and rows.

- initWithTileSet:columns:rows:tileSize:fillWithTileGroup:

Creates and initializes a tile map node using the provided tile set with a specified number of columns and rows.

- initWithTileSet:columns:rows:tileSize:tileGroupLayout:

Creates and initializes a tile map node using the provided tile set with a specified number of columns and rows. For a grid set type, the overall size, in points, of the node will be numberOfColumns * tileSize.width wide and numberOfRows * tileSize.height high.

Defining a Tile Map's Contents

enableAutomapping

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

- fillWithTileGroup:

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

- setTileGroup:andTileDefinition:forColumn:row:

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

- setTileGroup:forColumn:row:

Set the tile group at the specified tile index.