From eaa71d1d7364e248c7f9f4130e0574ae3a8ebc57 Mon Sep 17 00:00:00 2001 From: Jakob Haag Date: Tue, 2 Jun 2020 09:34:32 +0200 Subject: [PATCH] fix crash on spamming finish button --- GoldWars/GoldWars/Entities/HUD.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GoldWars/GoldWars/Entities/HUD.swift b/GoldWars/GoldWars/Entities/HUD.swift index aaf2f57..507ec4d 100644 --- a/GoldWars/GoldWars/Entities/HUD.swift +++ b/GoldWars/GoldWars/Entities/HUD.swift @@ -67,7 +67,7 @@ class HUD: GKEntity { onButtonPress: {DataService.sharedInstance.localRoundData.hasAttackBoost = true} ) - finishButton = ButtonNode( + finishButton = SingeClickButtonNode( textureName: "yellow_button04", text: "Finish Round", isEnabled: true, @@ -111,6 +111,7 @@ class HUD: GKEntity { func startWithDuration(){ roundTimer.startTimer() + finishButton.isEnabled = true self.roundTimer.roundEnded = "Syncing" RoundCalculatorService.sharedInstance.isCalculating = false }