updated update method of menuState
This commit is contained in:
parent
78c5016576
commit
0492ab7724
@ -70,15 +70,17 @@ class MenuScene: SKScene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func update(_ currentTime: TimeInterval) {
|
override func update(_ currentTime: TimeInterval) {
|
||||||
if entityManager.entities.count != 0 {
|
StateManager.stateManager.stateMachine!.update(deltaTime: currentTime)
|
||||||
entityManager.getBackground()!.update(deltaTime: currentTime)
|
/*
|
||||||
entityManager.getButtonByName(buttonName: "startGameButton").component(ofType: ButtonComponent.self)?.buttonNode.isEnabled = GameCenterManager.isAuthenticated
|
if entityManager.entities.count != 0 {
|
||||||
}
|
entityManager.getBackground()!.update(deltaTime: currentTime)
|
||||||
|
entityManager.getButtonByName(buttonName: "startGameButton").component(ofType: ButtonComponent.self)?.buttonNode.isEnabled = GameCenterManager.isAuthenticated
|
||||||
if GameCenterManager.sharedInstance.initIsFinish {
|
}
|
||||||
self.loadScene(scene: GameCenterManager.sharedInstance.gameScene!)
|
|
||||||
}
|
if GameCenterManager.sharedInstance.initIsFinish {
|
||||||
|
self.loadScene(scene: GameCenterManager.sharedInstance.gameScene!)
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,14 @@ class MenuState: GKState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func update(deltaTime seconds: TimeInterval) {
|
override func update(deltaTime seconds: TimeInterval) {
|
||||||
/* if menuEM.entities.count != 0 {
|
if menuEM.entities.count != 0 {
|
||||||
menuEM.getBackground()!.update(deltaTime: seconds)
|
menuEM.getBackground()!.update(deltaTime: seconds)
|
||||||
menuEM.getButtonByName(buttonName: "startGameButton").component(ofType: ButtonComponent.self)?.buttonNode.isEnabled = GameCenterManager.isAuthenticated
|
menuEM.getButtonByName(buttonName: "startGameButton").component(ofType: ButtonComponent.self)?.buttonNode.isEnabled = GameCenterManager.isAuthenticated
|
||||||
}
|
}
|
||||||
|
|
||||||
if GameCenterManager.sharedInstance.initIsFinish {
|
if GameCenterManager.sharedInstance.initIsFinish {
|
||||||
StateManager.stateManager.menuSc!.loadScene(scene: GameCenterManager.sharedInstance.gameScene!)
|
StateManager.stateManager.menuSc!.loadScene(scene: GameCenterManager.sharedInstance.gameScene!)
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func didEnter(from previousState: GKState?) {
|
override func didEnter(from previousState: GKState?) {
|
||||||
|
Loading…
Reference in New Issue
Block a user