Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Game Center Formatting Time

What do you set the value to be for the scoreReporter to show up as a correct time in game center leader-board. What do you need to covert the seconds to show up properly in the leader-board. Any help would be greatly appreciated.

Here is the code I have:

GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:@"BestTime"] autorelease];
scoreReporter.value = TotalSeconds * 10;
like image 681
Apple Developer Avatar asked Jul 11 '11 02:07

Apple Developer


People also ask

Does Game Center sync between devices?

To Sync game progress across multiple Android devices, you need to Log-In to all devices using the same Google Play Google Services ID and then play the game. To sync your game progress on iOS device: 1. Enter Device Settings, find & select Game Center.

Can your contacts see your Game Center?

Your friends can see the games that have access to your Game Center account (this works accross multiple devices since you can have a single Game Center account for multiple devices).

Does Game Center save game data?

Make sure you have connected your game to Game Center. It is the only way to save, recover and sync your progress.

What does Game Center do on iPhone?

When you sign in with your Apple ID, you will be signed in to Game Center automatically. Game Center allows you to engage in game-related activities such as participation in leaderboards; multiplayer games; finding, viewing, and challenging friends; and tracking achievements.


1 Answers

Seconds are fine if you have defined your leaderboard score format type to "Elapsed time - To the second". You just need

scoreReporter.value = TotalSeconds
like image 163
Luis Avatar answered Sep 20 '22 00:09

Luis