Instance Property

delegate

A delegate to be called during the animation loop.

Declaration

weak var delegate: SKSceneDelegate? { get set }

Discussion

When a delegate is present, when any of the animation loop methods steps are executed, your delegate is called. Typically, you use a delegate when you do not want to implement a scene subclass or if you want to dynamically change the scene behavior at runtime.

See Also

Configuring a Delegate

Subclassing Scenes Versus Assigning a Delegate

Use a scene delegate to share app logic across various scenes.

protocol SKSceneDelegate

Methods that, when implemented, allow any class to participate in the SpriteKit render loop callbacks.