init players to basePlayerOne and Two

This commit is contained in:
Jakob Haag 2020-05-15 12:00:01 +02:00
parent f2c6de058c
commit c53ab5f857

View File

@ -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
)