init players to basePlayerOne and Two
This commit is contained in:
parent
f2c6de058c
commit
c53ab5f857
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import SpriteKit
|
import SpriteKit
|
||||||
|
import GameKit
|
||||||
|
|
||||||
class TwoPlayerDefaultTestMap: MapProtocol {
|
class TwoPlayerDefaultTestMap: MapProtocol {
|
||||||
|
|
||||||
@ -24,6 +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),
|
||||||
|
player: (MatchmakingHelper.sharedInstance.isServer) ? GKLocalPlayer.local : MatchmakingHelper.sharedInstance.mpMatch?.players[0],
|
||||||
team: .team1
|
team: .team1
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -46,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.isServer) ? GKLocalPlayer.local : MatchmakingHelper.sharedInstance.mpMatch?.players[0],
|
||||||
team: .team2
|
team: .team2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user