Add window to menu to see if the user is authenticated (ToDo)

This commit is contained in:
Jakob Haag 2020-05-02 14:01:05 +02:00
parent 0a94e64a25
commit cdb4d69621

View File

@ -46,14 +46,21 @@ class MenuScene: SKScene {
} }
} }
override func update(_ currentTime: TimeInterval) { override func update(_ currentTime: TimeInterval) {
self.enumerateChildNodes(withName: "clouds", using: ({ self.enumerateChildNodes(withName: "clouds", using: ({
(node, error) in (node, error) in
node.position.x -= 2 node.position.x -= 2
if node.position.x < -(self.scene?.size.width)! { if node.position.x < -(self.scene?.size.width)! {
node.position.x += (self.scene?.size.width)! * 3 node.position.x += (self.scene?.size.width)! * 3
} }
})) }))
}
// 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)
}
}
} }