updated update method of menuState
This commit is contained in:
parent
78c5016576
commit
0492ab7724
@ -70,6 +70,8 @@ class MenuScene: SKScene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func update(_ currentTime: TimeInterval) {
|
override func update(_ currentTime: TimeInterval) {
|
||||||
|
StateManager.stateManager.stateMachine!.update(deltaTime: currentTime)
|
||||||
|
/*
|
||||||
if entityManager.entities.count != 0 {
|
if entityManager.entities.count != 0 {
|
||||||
entityManager.getBackground()!.update(deltaTime: currentTime)
|
entityManager.getBackground()!.update(deltaTime: currentTime)
|
||||||
entityManager.getButtonByName(buttonName: "startGameButton").component(ofType: ButtonComponent.self)?.buttonNode.isEnabled = GameCenterManager.isAuthenticated
|
entityManager.getButtonByName(buttonName: "startGameButton").component(ofType: ButtonComponent.self)?.buttonNode.isEnabled = GameCenterManager.isAuthenticated
|
||||||
@ -78,7 +80,7 @@ class MenuScene: SKScene {
|
|||||||
if GameCenterManager.sharedInstance.initIsFinish {
|
if GameCenterManager.sharedInstance.initIsFinish {
|
||||||
self.loadScene(scene: GameCenterManager.sharedInstance.gameScene!)
|
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