From 13bc1b46d5183824929b16e198ef1946c554e5fd Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Tue, 23 Jun 2020 20:52:55 +0200 Subject: [PATCH] Update base label only when was not empty before --- GoldWars/GoldWars/Entities/Base.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GoldWars/GoldWars/Entities/Base.swift b/GoldWars/GoldWars/Entities/Base.swift index 87c6f8b..ba1bbdc 100644 --- a/GoldWars/GoldWars/Entities/Base.swift +++ b/GoldWars/GoldWars/Entities/Base.swift @@ -50,7 +50,7 @@ class Base: GKEntity{ base.unitCount += units self.component(ofType: TeamComponent.self)?.unitcountLabel.text = "\(self.unitCount)" - if playerMoveType == .TxnMove { + if base.component(ofType: TeamComponent.self)?.unitcountLabel.text != "" { base.component(ofType: TeamComponent.self)?.unitcountLabel.text = "\(base.unitCount)" }