From f67c673ca71fc7b420120ca5ce5c0d85bd168d77 Mon Sep 17 00:00:00 2001 From: Jakob Haag Date: Mon, 11 May 2020 18:03:45 +0200 Subject: [PATCH] add gamegit and gkplayer 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 c75a391..116b64f 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, position: CGPoint, player: GKPlayer) { 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() }