fix crash on spamming finish button

This commit is contained in:
Jakob Haag 2020-06-02 09:34:32 +02:00
parent a086a7779b
commit eaa71d1d73

View File

@ -67,7 +67,7 @@ class HUD: GKEntity {
onButtonPress: {DataService.sharedInstance.localRoundData.hasAttackBoost = true} onButtonPress: {DataService.sharedInstance.localRoundData.hasAttackBoost = true}
) )
finishButton = ButtonNode( finishButton = SingeClickButtonNode(
textureName: "yellow_button04", textureName: "yellow_button04",
text: "Finish Round", text: "Finish Round",
isEnabled: true, isEnabled: true,
@ -111,6 +111,7 @@ class HUD: GKEntity {
func startWithDuration(){ func startWithDuration(){
roundTimer.startTimer() roundTimer.startTimer()
finishButton.isEnabled = true
self.roundTimer.roundEnded = "Syncing" self.roundTimer.roundEnded = "Syncing"
RoundCalculatorService.sharedInstance.isCalculating = false RoundCalculatorService.sharedInstance.isCalculating = false
} }