SKImageLayer

public class SKImageLayer : TiledLayerObject

The SKImageLayer object is really nothing more than a sprite with positioning attributes.

Properties

  • image: Layer image name.
  • wrapX: Wrap horizontally.
  • wrapY: Wrap vertically.

Methods

  • setLayerImage: set the layer’s image.
  • setLayerTexture: set the layer’s texture.
  • wrapY: wrap vertically.

Usage

Set the layer image with:

imageLayer.setLayerImage("clouds-background")

Initialization

Updating

  • Update the image layer before each frame is rendered.

    Declaration

    Swift

    public override func update(_ currentTime: TimeInterval)

    Parameters

    currentTime

    update interval.

Debugging

  • Returns the internal Tiled node type.

    Declaration

    Swift

    @objc
    public var tiledElementName: String { get }
  • Returns a “nicer” node name, for usage in the inspector.

    Declaration

    Swift

    @objc
    public override var tiledNodeNiceName: String { get }
  • Returns the internal Tiled node type icon.

    Declaration

    Swift

    @objc
    public override var tiledIconName: String { get }
  • A description of the node type used for help features.

    Declaration

    Swift

    @objc
    public override var tiledHelpDescription: String { get }

SKImageLayer

  • Parse the image layer’s properties.

    Declaration

    Swift

    public override func parseProperties(completion: (() -> Void)?)

    Parameters

    completion

    optional completion closure.