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 // TODO: Notfalllösung
if(!GameCenterHelper.isAuthenticated) { if(!GameCenterHelper.isAuthenticated) {
let label = SKLabelNode(text: "Authenticated") let authLabel = SKLabelNode(text: "Yout are not logged in to Gamecenter. Please login via GameCenterApp")
label.zPosition = 2 authLabel.name = "authLabel"
label.position = CGPoint(x: self.size.width / 2, y: self.size.height / 2) authLabel.zPosition = 2
self.addChild(label) authLabel.position = CGPoint(x: self.size.width / 2, y: self.size.height / 5)
self.addChild(authLabel)
} else {
self.childNode(withName: "authLabel")?.removeFromParent()
} }
} }
} }