change ownerShipPlayer on attackBase function
This commit is contained in:
parent
e1b0ac4d87
commit
0dd1664506
@ -32,11 +32,12 @@ class Base: GKEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func attackBase(base: Base, units:Int) -> [GKEntity]{
|
func attackBase(base: Base, units:Int) -> [GKEntity]{
|
||||||
base.changeOwnerShip = true
|
base.changeOwnerShip = true
|
||||||
self.unitCount -= units
|
base.ownerShipPlayer = self.ownerShipPlayer
|
||||||
base.unitCount += units
|
self.unitCount -= units
|
||||||
return [self, base]
|
base.unitCount += units
|
||||||
}
|
return [self, base]
|
||||||
|
}
|
||||||
|
|
||||||
required init?(coder: NSCoder) {
|
required init?(coder: NSCoder) {
|
||||||
fatalError("init(coder:) has not been implemented")
|
fatalError("init(coder:) has not been implemented")
|
||||||
|
Loading…
Reference in New Issue
Block a user