Update base label only when was not empty before
This commit is contained in:
parent
d05364708b
commit
13bc1b46d5
@ -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)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user