updated update method of menuState

This commit is contained in:
Chauntalle Schüle 2020-05-29 22:42:38 +02:00
parent 78c5016576
commit 0492ab7724
2 changed files with 15 additions and 13 deletions

View File

@ -70,6 +70,8 @@ class MenuScene: SKScene {
}
override func update(_ currentTime: TimeInterval) {
StateManager.stateManager.stateMachine!.update(deltaTime: currentTime)
/*
if entityManager.entities.count != 0 {
entityManager.getBackground()!.update(deltaTime: currentTime)
entityManager.getButtonByName(buttonName: "startGameButton").component(ofType: ButtonComponent.self)?.buttonNode.isEnabled = GameCenterManager.isAuthenticated
@ -78,7 +80,7 @@ class MenuScene: SKScene {
if GameCenterManager.sharedInstance.initIsFinish {
self.loadScene(scene: GameCenterManager.sharedInstance.gameScene!)
}
*/
}
}

View File

@ -22,14 +22,14 @@ class MenuState: GKState {
}
override func update(deltaTime seconds: TimeInterval) {
/* if menuEM.entities.count != 0 {
if menuEM.entities.count != 0 {
menuEM.getBackground()!.update(deltaTime: seconds)
menuEM.getButtonByName(buttonName: "startGameButton").component(ofType: ButtonComponent.self)?.buttonNode.isEnabled = GameCenterManager.isAuthenticated
}
if GameCenterManager.sharedInstance.initIsFinish {
StateManager.stateManager.menuSc!.loadScene(scene: GameCenterManager.sharedInstance.gameScene!)
}*/
}
}
override func didEnter(from previousState: GKState?) {