Update base label only when was not empty before

This commit is contained in:
Marcel Schwarz 2020-06-23 20:52:55 +02:00
parent d05364708b
commit 13bc1b46d5

View File

@ -50,7 +50,7 @@ class Base: GKEntity{
base.unitCount += units base.unitCount += units
self.component(ofType: TeamComponent.self)?.unitcountLabel.text = "\(self.unitCount)" 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)" base.component(ofType: TeamComponent.self)?.unitcountLabel.text = "\(base.unitCount)"
} }