init 100 units to the team-bases on init

This commit is contained in:
Jakob Haag 2020-05-02 14:03:41 +02:00
parent e8654fbf54
commit c6d1adce9b

View File

@ -14,13 +14,12 @@ class Base : GKEntity{
init(textureName:String, team: Team?,position: CGPoint ) {
self.unitCount = 0
super.init()
super.init()
addComponent(DefaultBaseComponent(texture: SKTexture(imageNamed: textureName), position: position))
if(team != nil){
addComponent(TeamComponent(team: team!, position: position))
}
self.unitCount = 100
}
}
required init?(coder: NSCoder) {