To download my project to this point, browse to this URL:
http://www.thinkingswiftly.com/game-development-with-swift/chapter-5
In Chapter 6, Generating a Never-Ending World, we will build a never-ending level by spawning tactical obstacle courses full of these new game objects. We need to clear out all of our test objects to get ready for this new level spawning system. Once you are ready, remove the spawning test code we just added to the GameScene
class. Also, remove the six lines that we have been using to spawn the three bees from previous chapters.
When you are finished, your GameScene
class's didMoveToView
function should look like this:
override func didMoveToView(view: SKView) { // Set a sky-blue background color: self.backgroundColor = UIColor(red: 0.4, green: 0.6, blue: 0.95, alpha: 1.0) // Add the world node as a child of the scene: self.addChild(world) // Store the vertical center of the screen: ...