SKTilemapDelegate
public protocol SKTilemapDelegate : AnyObjectOverview
Methods that allow interaction with an SKTilemap object as it is being created to customize its properties.
Properties
| Property | Description | 
|---|---|
| zDeltaForLayers | Default z-distance between layers. | 
Instance Methods
Delegate callbacks are called asynchronously as the map is being read from disk and rendered:
| Method | Description | 
|---|---|
| didBeginParsing | Called when the tilemap is instantiated. | 
| didAddTileset | Called when a tileset is added to a map. | 
| didAddLayer | Called when a layer is added to a tilemap. | 
| didReadMap | Called when the tilemap is finished parsing. | 
| didRenderMap | Called when the tilemap layers are finished rendering. | 
| didAddNavigationGraph | Called when the a navigation graph is built for a layer. | 
| objectForTileType | Specify a custom tile object for use in tile layers. | 
| objectForVectorType | Specify a custom object for use in object groups. | 
| objectForGraphType | Specify a custom graph node object for use in navigation graphs. | 
Custom Objects
Custom object methods can be used to substitute your own objects for tiles:
func objectForTileType(named: String? = nil) -> SKTile.Type {
    if (named == "MyTile") {
       return MyTile.self
    }
   return SKTile.self
}
- 
                  ▶︎zDeltaForLayersExtension methodDetermines the z-zposition difference between layers. DeclarationSwift public var zDeltaForLayers: CGFloat { get }
- 
                  ▶︎didBeginParsing(_:Extension method) 
- 
                  ▶︎didAddTileset(_:Extension method) 
- 
                  ▶︎didAddLayer(_:Extension method) Called when a layer is added to a tilemap. DeclarationSwift public func didAddLayer(_ layer: SKTiledLayerObject)ParameterslayerSKTiledLayerObjecttilemap instance.
- 
                  ▶︎didReadMap(_:Extension method) 
- 
                  ▶︎didRenderMap(_:Extension method) 
- 
                  ▶︎didAddNavigationGraph(_:Extension method) Called when the a navigation graph is built for a layer. DeclarationSwift public func didAddNavigationGraph(_ graph: GKGridGraph<GKGridGraphNode>)ParametersgraphGKGridGraph<GKGridGraphNode>graph instance.
- 
                  ▶︎objectForTileType(named:Extension method) Specify a custom tile object for use in tile layers. DeclarationSwift public func objectForTileType(named: String? = nil) -> SKTile.TypeParametersclassNameStringoptional class name.
- 
                  ▶︎objectForVectorType(named:Extension method) Specify a custom object for use in object groups. DeclarationSwift public func objectForVectorType(named: String? = nil) -> SKTileObject.TypeParametersnamedStringoptional class name.
- 
                  ▶︎objectForGraphType(named:Extension method) Specify a custom graph node object for use in navigation graphs. DeclarationSwift public func objectForGraphType(named: String?) -> GKGridGraphNode.TypeParametersnamedStringoptional class name.
 View on GitHub
            View on GitHub
           SKTilemapDelegate Protocol Reference
      SKTilemapDelegate Protocol Reference