disable GameCenterButton if User is not authenticated

This commit is contained in:
127-Z3R0 2020-07-02 09:46:04 +02:00
parent e109b9d93f
commit 60e9ac888e

View File

@ -84,6 +84,7 @@ class MenuScene: SKScene {
if entityManager.entities.count != 0 {
entityManager.getBackground()!.update(deltaTime: currentTime)
entityManager.getButtonByName(buttonName: "startGameButton").component(ofType: ButtonComponent.self)?.buttonNode.isEnabled = GameCenterManager.isAuthenticated
entityManager.getButtonByName(buttonName: "gameCenterButton").component(ofType: ButtonComponent.self)?.buttonNode.isEnabled = GameCenterManager.isAuthenticated
}
if GameCenterManager.sharedInstance.initIsFinish {