gpt4 book ai didi

ios - GKTurnBasedMatch 忽略 playerAttributes

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:46:50 25 4
gpt4 key购买 nike

当我创建以下 GKRequest 对象以创建回合制游戏时:

GKMatchRequest *gameRequest = [[GKMatchRequest alloc] init];
gameRequest.minPlayers = 2;
gameRequest.maxPlayers = 2;
gameRequest.playerAttributes = MY_ROLE_1;

此请求不应与具有相同 playerAttributes 的另一个请求匹配,但它是。有谁知道回合制游戏是否会忽略 playerAttributes?

最佳答案

根据此页面:http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/MatchmakingwithGameCenter/MatchmakingwithGameCenter.html#//apple_ref/doc/uid/TP40008304-CH12-SW6

Your game defines a complete set of roles; all roles defined by your game must be filled by the time the match is created. This means there is a careful coordination between the roles that you define and the number of players allowed in the match. Thus, player attributes require additional design and testing effort.

可以创建空座位的回合制游戏,并在轮到玩家时找到玩家。如果上述陈述为真,则回合制游戏将忽略 playerAttributes,因为它们无法在创建比赛时全部填充,否则。

关于ios - GKTurnBasedMatch 忽略 playerAttributes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13715293/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com