diff --git a/GoldWars/GoldWars/Entities/Base.swift b/GoldWars/GoldWars/Entities/Base.swift index e7c62e1..f00dbb3 100644 --- a/GoldWars/GoldWars/Entities/Base.swift +++ b/GoldWars/GoldWars/Entities/Base.swift @@ -9,21 +9,21 @@ import SpriteKit import GameplayKit -class Base : GKEntity{ - var unitCount:Int - - init(position: CGPoint, team: Team! = nil) { - self.unitCount = 0 +class Base : GKEntity { + var unitCount:Int + + init(position: CGPoint, team: Team! = nil) { + self.unitCount = 0 super.init() - addComponent(DefaultBaseComponent(texture: SKTexture(imageNamed: "Base"), position: position)) - if(team != nil){ - addComponent(TeamComponent(team: team!, position: position)) + addComponent(DefaultBaseComponent(texture: SKTexture(imageNamed: "Base"), position: position)) + if(team != nil){ + addComponent(TeamComponent(team: team!, position: position)) self.unitCount = 100 } } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + }