1

我正在使用NextpeerinCocos进行多人游戏,并且想为NextpeerSettingInitialDashboardOrientation. 我为此使用此代码:

 NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
                              [NSNumber numberWithBool:FALSE], NextpeerSettingSupportsDashboardRotation,
                              [NSNumber numberWithInt:NPNotificationPosition_BOTTOM], NextpeerSettingNotificationPosition,
                              [NSNumber numberWithBool:FALSE], NextpeerSettingInitialDashboardOrientation,
                              nil];

[Nextpeer initializeWithProductKey:@"ID" andSettings:settings andDelegates:
 [NPDelegatesContainer containerWithNextpeerDelegate:self notificationDelegate:nil tournamentDelegate:self currencyDelegate:nil]];

但是我收到了这个警告,而且我的方向没有设置为portrait. 它设置为Landscape. 我的默认方向是portrait.

Nextpeer warning: The desired orientation (1) isn't supported by the currently integrated Nextpeer's resource bundle.
  • 如何更改NextpeerSettingSupportsDashboardRotation

  • 如何解决此警告?

4

1 回答 1

0

Nextpeer根据您的项目方向和普遍支持有不同的资源包。您需要确保集成了相应的资源包。例如,如果您是横向通用的,那么您需要NPResources_iPad_iPhone_Landscape按照 iOS 集成指南中的说明在项目中设置捆绑包。

为了将NextpeerSettingSupportsDashboardRotation值更改为 TRUE,只需像这样更改对象值:

 NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
                          [NSNumber numberWithBool:TRUE], NextpeerSettingSupportsDashboardRotation,
                          [NSNumber numberWithInt:NPNotificationPosition_BOTTOM], NextpeerSettingNotificationPosition,
                          [NSNumber numberWithBool:FALSE], NextpeerSettingInitialDashboardOrientation,
                          nil];
于 2014-12-16T17:37:28.220 回答