Created
December 2, 2014 21:03
-
-
Save Bashta/604997663c02a8369cc3 to your computer and use it in GitHub Desktop.
GameViewController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SpriteKit | |
class GameViewController: UIViewController, GameSceneDelegate { | |
@IBOutlet weak var skView: SKView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let scene = GameScene(size: skView.bounds.size) | |
/* Set the scale mode to scale to fit the window */ | |
scene.scaleMode = .AspectFill | |
skView.presentScene(scene) | |
scene.gameSceneDelegate = self | |
} | |
func gameOver() { | |
let menuScene = MenuScene(size: skView.bounds.size) | |
skView.presentScene(menuScene) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment