0
我需要匹配3個玩家,1個嚮導和2個戰士作爲屬性。 GKMatch如何做到這一點?下面的代碼片斷是從我的代碼Gamecenter配對
var wizard = true
enum Role : UInt32 {
case wizard = 0xffff0000
case warrior = 0x0000ffff
}
let matchRequest = GKMatchRequest()
matchRequest.minPlayers = 3
matchRequest.maxPlayers = 3
matchRequest.playerAttributes = wizard ? Role.wizard.rawValue : Role.warrior.rawValue
let matchMakerViewController = GKMatchmakerViewController(matchRequest: matchRequest)
matchMakerViewController.matchmakerDelegate = self
presentingViewController?.presentViewController(matchMakerViewController, animated: false, completion:nil)
兩名球員,1名嚮導和1名戰士設置的一切,工作正常,但我需要2對勇士的比賽。
預先感謝您
感謝您的回覆,但這不適用於我的情況,因爲遊戲中的兩名戰士都是完全平等的。 – mjeragh