April 2021
Beginner to intermediate
506 pages
11h 57m
English
You’ve already seen the title scene for Val’s Revenge, now it’s time to let the player see it. For that to happen, you’ll need to make some adjustments to the existing code.
Switch to the GameViewController.swift file and update the viewDidLoad() method to match this:
| | override func viewDidLoad() { |
| | super.viewDidLoad() |
| | |
| | // Create the view |
| | if let view = self.view as! SKView? { |
| | |
| | // Create the scene |
| | let scene = TitleScene(fileNamed: "TitleScene") |
| | |
| | // Set the scale mode to scale to fill the view window |
| | scene?.scaleMode = .aspectFill |
| | |
| | // Present the scene |
| | view.presentScene(scene) |
| | |
| | // Set the view options |
| | view.ignoresSiblingOrder = false |
| | view.showsPhysics ... |
Read now
Unlock full access