简体   繁体   中英

How to delay displaying of Game Center's popup window?

I have integrated Game Center (GC) into my game. It works great, except for an annoying message, which can popup in the middle of intense action, requiring 100% of the gamer's attention:

"Could not connect to Game Center server. Cancel/Retry?"

I don't mind about the message, but the information is not so urgent it has to be displayed immediately. I would like to display it after the user has navigated to the main menu or at some other point. Is there a way to achieve it?

Delaying the following login call for game center did the trick for me.

if([GameCenterManager isGameCenterAvailable]){
    gameCenterManager = [[GameCenterManager alloc] init];
    [gameCenterManager setDelegate:self];
    [gameCenterManager authenticateLocalUser];

    NSLog(@"Game center logged in");
}
else 
    NSLog(@"Please login to game center");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM