我的GKMatch没有球员...? [英] My GKMatch has no players...?

查看:160
本文介绍了我的GKMatch没有球员...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 我在我的iPhone和模拟器上运行我的游戏。

  • 在这两种情况下,我都使用不同的Game Center帐户登录。

  • 我在两个游戏中都去参加比赛。我按现在播放。

  • 最后,两个游戏都会找到一个匹配项并调用以下函数:






  •    - (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFindMatch:(GKMatch *)match 
    {
    self.myMatch = match;
    NSLog(@%d,[[self.myMatch playerIDs] count]);

    }






    我的控制台返回0.不应该返回2吗?

    解决方案

    / p>

    您实际上是否使用GKMatchmaker和GKMatchmakerViewController?



    在测试中,您确定使用了两个不同的游戏中心帐户?



    我恐怕我不熟悉游戏中心系统 - 但我已经添加了100点奖金,所以你可以希望得到一个答案!


    • I successfully made a matchmaking screen appear.
    • I run my game in my iPhone and also in the simulator.
    • In both cases I log in with a different Game Center account.
    • I go to the matchmaking screen in both games. I press "play now". Both games begin looking for a match.
    • Finally, both games find a match and call the function below:

    - (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFindMatch:(GKMatch *)match
    {
        self.myMatch = match;
        NSLog(@"%d",[[self.myMatch playerIDs]count]);
    
    }
    


    But my console returns 0. Shouldn't it return 2 instead?

    解决方案

    Could it be that you are not actually connecting them?

    Are you in fact using GKMatchmaker and GKMatchmakerViewController?

    In your testing, you are sure you are using TWO DIFFERENT game center accounts?

    I'm afraid I'm not familiar with the game center system - but I've added a 100 point bounty so you can hope for an answer!

    这篇关于我的GKMatch没有球员...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆