From cdb4d696218bb62a7711f83d30bdc3f60dbe71e9 Mon Sep 17 00:00:00 2001 From: Jakob Haag Date: Sat, 2 May 2020 14:01:05 +0200 Subject: [PATCH] Add window to menu to see if the user is authenticated (ToDo) --- GoldWars/GoldWars/Scenes/MenuScene.swift | 27 +++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/GoldWars/GoldWars/Scenes/MenuScene.swift b/GoldWars/GoldWars/Scenes/MenuScene.swift index 46b4af3..943c568 100644 --- a/GoldWars/GoldWars/Scenes/MenuScene.swift +++ b/GoldWars/GoldWars/Scenes/MenuScene.swift @@ -46,14 +46,21 @@ class MenuScene: SKScene { } } - override func update(_ currentTime: TimeInterval) { - self.enumerateChildNodes(withName: "clouds", using: ({ - (node, error) in - node.position.x -= 2 - if node.position.x < -(self.scene?.size.width)! { - node.position.x += (self.scene?.size.width)! * 3 - } - })) - } - + override func update(_ currentTime: TimeInterval) { + self.enumerateChildNodes(withName: "clouds", using: ({ + (node, error) in + node.position.x -= 2 + if node.position.x < -(self.scene?.size.width)! { + 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) + } + } }