add label of user is not logged in to GameCenter

This commit is contained in:
Jakob Haag 2020-05-02 16:15:03 +02:00
parent cdb67f2d7c
commit 311b19d9c2

View File

@ -57,10 +57,13 @@ class MenuScene: SKScene {
// TODO: Notfalllösung
if(!GameCenterHelper.isAuthenticated) {
let label = SKLabelNode(text: "Authenticated")
label.zPosition = 2
label.position = CGPoint(x: self.size.width / 2, y: self.size.height / 2)
self.addChild(label)
let authLabel = SKLabelNode(text: "Yout are not logged in to Gamecenter. Please login via GameCenterApp")
authLabel.name = "authLabel"
authLabel.zPosition = 2
authLabel.position = CGPoint(x: self.size.width / 2, y: self.size.height / 5)
self.addChild(authLabel)
} else {
self.childNode(withName: "authLabel")?.removeFromParent()
}
}
}