init 100 units to the team-bases on init
This commit is contained in:
parent
e8654fbf54
commit
c6d1adce9b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user