diff --git a/GoldWars/GoldWars/GameViewController.swift b/GoldWars/GoldWars/GameViewController.swift index 2d3c89a..0c249a9 100644 --- a/GoldWars/GoldWars/GameViewController.swift +++ b/GoldWars/GoldWars/GameViewController.swift @@ -15,7 +15,7 @@ class GameViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - StateManager.stateManager.allowedState = StateTypes.menuSt + StateManager.stateManager.wantedState = StateTypes.menuSt StateManager.stateManager.createStates() StateManager.stateManager.enterState() diff --git a/GoldWars/GoldWars/StateManager.swift b/GoldWars/GoldWars/StateManager.swift index 3441ecb..67d201a 100644 --- a/GoldWars/GoldWars/StateManager.swift +++ b/GoldWars/GoldWars/StateManager.swift @@ -14,11 +14,11 @@ class StateManager{ static let stateManager = StateManager() var stateMachine: GKStateMachine? - var allowedState: StateTypes? + var wantedState: StateTypes? let LOG = OSLog.init(subsystem: "StateManager", category: "StateManager") func enterState(){ - switch allowedState { + switch wantedState { case .menuSt: if stateMachine?.enter(MenuState.self) == false { os_log("Failed entering Menu State", log: LOG, type: .info)