-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGameViewController.swift
46 lines (38 loc) · 1.18 KB
/
GameViewController.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// GameViewController.swift
// Jumping
//
// Created by Kevin Greer on 12/22/14.
// Copyright (c) 2014 Kevin Greer. All rights reserved.
//
import UIKit
import SpriteKit
class GameViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
//Present MenuScene
let scene = MenuScene(size: self.view.frame.size)
let skView = self.view as SKView
skView.showsFPS = true
skView.showsNodeCount = true
scene.scaleMode = .AspectFill
skView.presentScene(scene as SKScene)
}
override func shouldAutorotate() -> Bool {
return false
}
override func supportedInterfaceOrientations() -> Int {
if UIDevice.currentDevice().userInterfaceIdiom == .Phone {
return Int(UIInterfaceOrientationMask.AllButUpsideDown.rawValue)
} else {
return Int(UIInterfaceOrientationMask.All.rawValue)
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Release any cached data, images, etc that aren't in use.
}
override func prefersStatusBarHidden() -> Bool {
return true
}
}