From ac1ad05bac8b7645cbb3c9e7ce19ef3eeb4c4817 Mon Sep 17 00:00:00 2001 From: Jakob Haag Date: Fri, 15 May 2020 12:02:07 +0200 Subject: [PATCH] add player to teamcomponent --- GoldWars/GoldWars/Components/TeamComponent.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GoldWars/GoldWars/Components/TeamComponent.swift b/GoldWars/GoldWars/Components/TeamComponent.swift index 379a1cc..2369f7b 100644 --- a/GoldWars/GoldWars/Components/TeamComponent.swift +++ b/GoldWars/GoldWars/Components/TeamComponent.swift @@ -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() }