Game Center与Sprite Kit集成? [英] Game Center integration with Sprite Kit?
本文介绍了Game Center与Sprite Kit集成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用Sprite Kit Xcode模板使用Game Center或GameKit Framework?
在Sprite工具包中,它使用场景;但通常要查看排行榜,例如你需要presentModalViewController,但这在SKView中是不可能的。
How can I use Game Center or the GameKit Framework with a Sprite Kit Xcode template? In Sprite kit, it uses Scenes; but normally to view the leaderboards for example you need to "presentModalViewController" but that is not possible in SKView.
我如何验证播放器以及所有其他有趣的东西在iOS 6中。
And how can I authenticate the player and all that other fun stuff in iOS 6.
提前致谢!
推荐答案
你可以像这样认证
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) {
if (error == nil)
{
static_setEnable( true );
NSLog(@" Authenticate local player complete");
}
else
{
static_setEnable( false );
NSLog(@"Authenticate local player Error: %@", [error description]);
}
}];
}
这篇关于Game Center与Sprite Kit集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文