From 86a16c1d78c000905190331b7380002906a4c74c Mon Sep 17 00:00:00 2001 From: Aldin Duraki Date: Thu, 25 Jun 2020 19:32:11 +0200 Subject: [PATCH] ... --- GoldWars/GoldWars/Entities/Modal.swift | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/GoldWars/GoldWars/Entities/Modal.swift b/GoldWars/GoldWars/Entities/Modal.swift index cfc1e14..0407dba 100644 --- a/GoldWars/GoldWars/Entities/Modal.swift +++ b/GoldWars/GoldWars/Entities/Modal.swift @@ -92,22 +92,22 @@ class Modal: GKEntity{ super.init() switch modaltype { - case .BaseAttack, .BaseMoveOwnUnits: - let text = (modaltype == .BaseAttack) ? "Angriff" : "Senden" - addComponent(SliderComponent(width: 300, position: CGPoint(x: anchorPoint.x , y: anchorPoint.y - 15))) - addComponent(ButtonComponent(textureName: "yellow_button04", text: text, position: CGPoint(x: anchorPoint.x , y: anchorPoint.y - 95), isEnabled: true, onButtonPress: { - self.sendUnits(currentDraggedBase: currentDraggedBase, touchLocation: touchLocation!, gameScene: gameScene, collisionBase: collisionBase) - EntityManager.gameEMInstance.removeModal() - })) - case .QuitGame: - addComponent(ButtonComponent(textureName: "yellow_button04", text: "Verlassen", position: CGPoint(x: anchorPoint.x , y: anchorPoint.y - 95), isEnabled: true, onButtonPress: { - EntityManager.gameEMInstance.removeModal() - GameCenterManager.sharedInstance.sendStateToPeers(state: State(state: 6)) - GameCenterManager.sharedInstance.opponentQuit = false - GameCenterManager.sharedInstance.quitGame = true - })) - case .PauseGame: - print("") + case .BaseAttack, .BaseMoveOwnUnits: + let text = (modaltype == .BaseAttack) ? "Angriff" : "Senden" + addComponent(SliderComponent(width: 300, position: CGPoint(x: anchorPoint.x , y: anchorPoint.y - 15))) + addComponent(ButtonComponent(textureName: "yellow_button04", text: text, position: CGPoint(x: anchorPoint.x , y: anchorPoint.y - 95), isEnabled: true, onButtonPress: { + self.sendUnits(currentDraggedBase: currentDraggedBase, touchLocation: touchLocation!, gameScene: gameScene, collisionBase: collisionBase) + EntityManager.gameEMInstance.removeModal() + })) + case .QuitGame: + addComponent(ButtonComponent(textureName: "yellow_button04", text: "Verlassen", position: CGPoint(x: anchorPoint.x , y: anchorPoint.y - 95), isEnabled: true, onButtonPress: { + EntityManager.gameEMInstance.removeModal() + GameCenterManager.sharedInstance.sendStateToPeers(state: State(state: 6)) + GameCenterManager.sharedInstance.opponentQuit = false + GameCenterManager.sharedInstance.quitGame = true + })) + case .PauseGame: + break }