SKGroupLayer

public class SKGroupLayer : SKTiledLayerObject

Overview

Subclass of SKTiledLayerObject, the group layer is a container for managing groups of layers.

Usage

Query child layers:

for child in group.layers {
   child.opacity = 0.5
}

Add layers to the group with:

groupLayer.addLayer(playerLayer)

Remove with:

groupLayer.removeLayer(playerLayer)

Init

Layers

Updating: Group Layer

  • ▶︎update(_:)

    Update the group layer before each frame is rendered.

    Declaration

    Swift

    override public func update(_ currentTime: TimeInterval)

    Parameters

    currentTime

    TimeInterval update interval.