Chapter 15
Using Sprite Kit with a Scene Kit Scene
In the previous chapters, you worked within the Scene Kit paradigm; however, Apple has created a way for you to add a 2D scene to overlay on your 3D scenes. In this chapter, you will add a 2D scene that will be used for your timer so it can track how long it will take you and your friends to find and capture the enemy.
Sprite Kit Integration
Scene Kit gives you a property to add a Sprite KitSprite Kit scene.
var overlaySKScene: SKScene! { get set }
This property can render a 2D scene that overlays the Scene Kit scene. To provide better performance, Scene Kit and Sprite Kit use the same OpenGL context and resources to render the scene.
For this game, you will add a scoreboard to the top of ...
Get Beginning Swift Games Development for iOS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.