From 7e2b1b7a5416dd2408bac7a90d17e1f61896e72b Mon Sep 17 00:00:00 2001 From: 127-Z3R0 <81heti1bif@hft-stuttgart.de> Date: Sat, 23 May 2020 19:02:39 +0200 Subject: [PATCH] * Refactor for Master of the Universe --- GoldWars/GoldWars/Components/DefBoostSkillComponent.swift | 1 - GoldWars/GoldWars/GameViewController.swift | 8 ++++---- GoldWars/GoldWars/SettingsScene.swift | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/GoldWars/GoldWars/Components/DefBoostSkillComponent.swift b/GoldWars/GoldWars/Components/DefBoostSkillComponent.swift index 1d4a43d..1e46ee2 100644 --- a/GoldWars/GoldWars/Components/DefBoostSkillComponent.swift +++ b/GoldWars/GoldWars/Components/DefBoostSkillComponent.swift @@ -13,7 +13,6 @@ class DefBoostSkillComponent: GKComponent{ var skillButtonNode: SkillButtonNode init(iconName: String, text: String, position: CGPoint, isEnabled:Bool) { - skillButtonNode = SkillButtonNode(iconName: iconName, text: text, isEnabled: isEnabled, diff --git a/GoldWars/GoldWars/GameViewController.swift b/GoldWars/GoldWars/GameViewController.swift index d879e8c..604a530 100644 --- a/GoldWars/GoldWars/GameViewController.swift +++ b/GoldWars/GoldWars/GameViewController.swift @@ -14,7 +14,7 @@ class GameViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - + if let view = self.view as! SKView? { let scene = MenuScene(size: self.view.bounds.size) EntityManager.menuEMInstance.setScene(scene: scene) @@ -27,11 +27,11 @@ class GameViewController: UIViewController { MatchmakingHelper.sharedInstance.viewController = self } } - + override var shouldAutorotate: Bool { return true } - + override var supportedInterfaceOrientations: UIInterfaceOrientationMask { if UIDevice.current.userInterfaceIdiom == .phone { return .allButUpsideDown @@ -39,7 +39,7 @@ class GameViewController: UIViewController { return .all } } - + override var prefersStatusBarHidden: Bool { return true } diff --git a/GoldWars/GoldWars/SettingsScene.swift b/GoldWars/GoldWars/SettingsScene.swift index e568ed2..587426d 100644 --- a/GoldWars/GoldWars/SettingsScene.swift +++ b/GoldWars/GoldWars/SettingsScene.swift @@ -13,7 +13,6 @@ class SettingsScene: SKScene { var entityManager = EntityManager.settingsEMInstance override func sceneDidLoad() { - entityManager.setScene(scene: self) let positionX = self.size.width * 0.1 let positionY = self.size.height * 0.05