SKSceneDelegate
Methods that, when implemented, allow any class to participate in the SpriteKit render loop callbacks.
Declaration
protocol SKSceneDelegate : NSObjectProtocolMentioned in
- Configuring a Physics Body
- Detecting Changes at Each Step of an Animation
- Disconnecting Bodies from Joints
- Displaying 3D Content in a SpriteKit Scene
- Getting Started with Actions
- Getting Started with Nodes
- Responding to Frame-Cycle Events
- Subclassing Scenes Versus Assigning a Delegate
- Use SpriteKit Objects within Scene Delegate Callbacks
Overview
The SKSceneDelegate protocol is used to implement a delegate to be called whenever the scene is being animated. Typically, you supply a delegate when you want to use a scene without requiring the scene to be subclassed. The methods in this protocol all correspond to methods implemented by the SKScene class. If the delegate implements a particular method, that method is called instead of the corresponding method on the scene object.
When processing a scene, SpriteKit runs a loop that processes and renders the scene. The SKSceneDelegate methods allows you to add logic at any step of the loop.
[Image]