SKTiledSceneDelegate
public protocol SKTiledSceneDelegate : AnyObject
Overview
Methods for managing SKTilemap nodes in an SpriteKit SKScene scene.
This protocol and the SKTiledScene objects are included as a suggested way to use the
SKTilemap class, but are not required.
In this configuration, the tile map is a child of the root node and reference the custom
SKTiledSceneCamera camera.
Properties
| Property | Description |
|---|---|
| worldNode | Root container node. Tiled assets are parented to this node. |
| cameraNode | Custom scene camera. |
| tilemap | Tile map node. |
Instance Methods
| Method | Description |
|---|---|
| load(tmxFile:) | Load a tilemap from disk. |
-
Root container node. Tiled assets are parented to this node.
Declaration
Swift
var worldNode: SKNode! { get set } -
Custom scene camera.
Declaration
Swift
var cameraNode: SKTiledSceneCamera! { get set } -
▶︎tilemapTile map node.
Declaration
Swift
var tilemap: SKTilemap! { get set } -
Load a tilemap from disk, with optional tilesets.
Declaration
-
▶︎load(tmxFile:Default implementationinDirectory: withTilesets: ignoreProperties: loggingLevel: ) Default Implementation
Load a named TMX file, with optional tilesets.
Declaration
Swift
public func load(tmxFile: String, inDirectory: String? = nil, withTilesets tilesets: [SKTileset] = [], ignoreProperties: Bool = false, loggingLevel: LoggingLevel = TiledGlobals.default.loggingLevel) -> SKTilemap?Parameters
inDirectoryString?search path for assets.withTilesets[SKTileset]optional pre-loaded tilesets.ignorePropertiesBooldon’t parse custom properties.verbosityLoggingLevellogging verbosity.Return Value
SKTilemap?tile map node.
View on GitHub
SKTiledSceneDelegate Protocol Reference