Merge branch '92-bei-angriff-unitcountlabel-anpassen' into 'development'
Resolve "Bei Angriff unitCountLabel anpassen" Closes #92 See merge request marcel.schwarz/software-projekt-2!119
This commit is contained in:
commit
f50d00a416
@ -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)"
|
||||
base.component(ofType: DefaultBaseComponent.self)?.labelNode.text = "\(base.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