init player1 to playerOneBase and player2 to playerTwoBase on init

This commit is contained in:
Jakob Haag 2020-05-11 18:05:43 +02:00
parent 5b11dacbaa
commit 0c9abe0d08

View File

@ -25,8 +25,7 @@ class TwoPlayerDefaultTestMap: MapProtocol {
// Create Bases // Create Bases
let basePlayerOne = Base( let basePlayerOne = Base(
position: CGPoint(x: self.size.width * 0.1, y: self.size.height / 2), position: CGPoint(x: self.size.width * 0.1, y: self.size.height / 2),
// ToDo: not final version. Better would be something like MatchmakingHelper.spieler1 but does not work yet player: MatchmakingHelper.sharedInstance.mpMatch?.players[0],
player: GKLocalPlayer.local,
team: .team1 team: .team1
) )
@ -49,6 +48,7 @@ class TwoPlayerDefaultTestMap: MapProtocol {
let basePlayerTwo = Base( let basePlayerTwo = Base(
position: CGPoint(x: self.size.width * 0.9, y: self.size.height / 2), position: CGPoint(x: self.size.width * 0.9, y: self.size.height / 2),
player: MatchmakingHelper.sharedInstance.mpMatch?.players[1],
team: .team2 team: .team2
) )