Add Nodes Using the Object Library
In Add the Background, you added a background image to the game scene by creating a new background sprite node. You then added that node as a child node of the game scene; you did all of that in code.
However, this time around, you’ll create and add a background node to the node tree using the Object Library, and you’ll set its options using the Attributes Inspector. But first, it’s time for a quick tour.
Touring the Scene Editor
From within the Project Navigator, select the GameScene.sks file. Files with the sks file extension are known as SpriteKit scene files. This particular scene file is what gets loaded from the GameViewController.swift file. You’ll learn more about how that works in Configure the ...
Get Apple Game Frameworks and Technologies 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.