Hide label with unit counts when attacking a base
This commit is contained in:
parent
e10d57968c
commit
15fb959315
@ -46,11 +46,13 @@ class Base: GKEntity{
|
||||
if base.ownershipPlayer != GKLocalPlayer.local {
|
||||
base.changeOwnership = true
|
||||
}
|
||||
base.ownershipPlayer = self.ownershipPlayer
|
||||
self.unitCount -= units
|
||||
base.unitCount += units
|
||||
self.component(ofType: DefaultBaseComponent.self)?.labelNode.text = "\(self.unitCount)"
|
||||
if base.ownershipPlayer == GKLocalPlayer.local {
|
||||
base.component(ofType: DefaultBaseComponent.self)?.labelNode.text = "\(base.unitCount)"
|
||||
}
|
||||
base.ownershipPlayer = self.ownershipPlayer
|
||||
DataService.sharedInstance.addMove(playerMove: PlayerMove(fromBase: self.baseID,
|
||||
toBase: base.baseID,
|
||||
unitCount: units * playerMoveType.rawValue)
|
||||
|
Loading…
Reference in New Issue
Block a user