add player to teamcomponent

This commit is contained in:
Jakob Haag 2020-05-15 12:02:07 +02:00
parent 43dd2aa853
commit ac1ad05bac

View File

@ -8,12 +8,14 @@
import SpriteKit
import GameplayKit
import GameKit
class TeamComponent: GKComponent {
let team: Team
let fire: SKEmitterNode
let player: GKPlayer
init(team: Team, position: CGPoint) {
init(team: Team, player: GKPlayer, position: CGPoint) {
fire = SKEmitterNode(fileNamed: "Fire")!
fire.zPosition = -1
fire.position = position
@ -29,6 +31,7 @@ class TeamComponent: GKComponent {
}
self.team = team
self.player = player
super.init()
}