From c53ab5f85744b2d975dd0a08c2b1c49f07945dd9 Mon Sep 17 00:00:00 2001 From: Jakob Haag Date: Fri, 15 May 2020 12:00:01 +0200 Subject: [PATCH] init players to basePlayerOne and Two --- GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift b/GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift index beff433..fa20823 100644 --- a/GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift +++ b/GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift @@ -8,6 +8,7 @@ import Foundation import SpriteKit +import GameKit class TwoPlayerDefaultTestMap: MapProtocol { @@ -24,6 +25,7 @@ class TwoPlayerDefaultTestMap: MapProtocol { // Create Bases let basePlayerOne = Base( position: CGPoint(x: self.size.width * 0.1, y: self.size.height / 2), + player: (MatchmakingHelper.sharedInstance.isServer) ? GKLocalPlayer.local : MatchmakingHelper.sharedInstance.mpMatch?.players[0], team: .team1 ) @@ -46,6 +48,7 @@ class TwoPlayerDefaultTestMap: MapProtocol { let basePlayerTwo = Base( position: CGPoint(x: self.size.width * 0.9, y: self.size.height / 2), + player: (!MatchmakingHelper.sharedInstance.isServer) ? GKLocalPlayer.local : MatchmakingHelper.sharedInstance.mpMatch?.players[0], team: .team2 )