software-projekt-2-gold-wars/GoldWars/GoldWars/GameViewController.swift
Aldin Duraki e82d0a57f8 Impl Menu Scene
* added temporary buttons assets
2020-04-18 18:13:20 +02:00

45 lines
1.0 KiB
Swift

//
// GameViewController.swift
// GoldWars
//
// Created by Aldin Duraki on 18.04.20.
// Copyright © 2020 SP2. All rights reserved.
//
import UIKit
import SpriteKit
import GameplayKit
class GameViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
if let view = self.view as! SKView? {
if let scene = SKScene(fileNamed: "MenuScene") {
scene.scaleMode = .aspectFill
view.presentScene(scene)
//TODO: create dev profile or remove on delivery
view.showsFPS = true
view.showsNodeCount = true
}
}
}
override var shouldAutorotate: Bool {
return true
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if UIDevice.current.userInterfaceIdiom == .phone {
return .allButUpsideDown
} else {
return .all
}
}
override var prefersStatusBarHidden: Bool {
return true
}
}