我正在尝试在我的Cocos2D iPhone游戏中实现OpenFeint,但是这里有一些奇怪的事情,我没有找到解决的办法。下面是我初始化OpenFeint时的样子:http://img842.imageshack.us/img842/8564/screenshot20100926at520.png,下面是初始化代码:
[director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft];
NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft], OpenFeintSettingDashboardOrientation,
@"NAME", OpenFeintSettingShortDisplayName,
[NSNumber numberWithBool:NO], OpenFeintSettingEnablePushNotifications,
[NSNumber numberWithBool:YES], OpenFeintSettingAlwaysAskForApprovalInDebug,
[NSNumber numberWithBool:YES], OpenFeintSettingDisableUserGeneratedContent, nil];
[OpenFeint initializeWithProductKey:@"PRODUCTKEY" andSecret:@"SECRET"
andDisplayName:@"NAME" andSettings:settings andDelegates: [OFDelegatesContainer containerWithOpenFeintDelegate:self]];
[[CCDirector sharedDirector] runWithScene: [MainMenuScene node]];发布于 2010-09-29 06:45:05
我在几个地方看到过你的帖子,因为我和你有同样的问题。我刚刚为你找出了一个潜在的解决方案,我想我会回复你。似乎在某些情况下,OpenFeint无法访问密钥窗口,在这种情况下,它会创建自己的窗口,但它的行为可能与您的设置不同。解决方案是通过将窗口添加到设置中,让OpenFeint明确知道要使用哪个窗口。我的设置如下所示,正如你所见,我在我的键控窗口中添加了"OpenFeintSettingPresentationWindow“设置。在这样做之后,它工作得非常好。希望这能有所帮助!
NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight], OpenFeintSettingDashboardOrientation,
window, OpenFeintSettingPresentationWindow,
@"ComingSoon", OpenFeintSettingShortDisplayName,
[NSNumber numberWithBool:YES], OpenFeintSettingEnablePushNotifications,
nil];发布于 2012-03-13 17:55:26
你有可能在你的二进制文件中有错误的方向设置包,删除横向并添加iPhone通用设置包。
发布于 2010-09-27 07:27:25
我不确定具体的问题是什么,但它看起来像是OpenFeint试图在横向显示,但不知何故被旋转,好像它是在肖像模式下一样。oyu是否可以仔细检查以确保您的方向对于您的应用程序的主视图控制器(或者无论您在Cocos2D中如何配置)都是正确的。而且OpenFeint也知道这一点?
https://stackoverflow.com/questions/3800237
复制相似问题