review changes

This commit is contained in:
Jakob Haag 2020-06-17 23:34:48 +02:00
parent 71c01d589c
commit 5aa10e3fc5

View File

@ -143,7 +143,7 @@ class EntityManager {
if snapBase.ownership != nil {
getOwnerBySnapBase = GameCenterManager.sharedInstance.getGKPlayerByUsername(displayName: snapBase.ownership!)
} else {
if( entity.component(ofType: TeamComponent.self) != nil ) {
if entity.component(ofType: TeamComponent.self) != nil {
runExplosion(base: base)
entity.component(ofType: TeamComponent.self)!.fire.removeFromParent()
entity.component(ofType: TeamComponent.self)!.unitcountLabel.removeFromParent()
@ -158,7 +158,7 @@ class EntityManager {
}
base.ownershipPlayer = getOwnerBySnapBase
if (entity.component(ofType: TeamComponent.self) != nil) {
if entity.component(ofType: TeamComponent.self) != nil {
entity.component(ofType: TeamComponent.self)!.change(to: getTeamByPlayer(playerName: snapBase.ownership!), to: getOwnerBySnapBase!)
} else {
entity.addComponent(TeamComponent(