ios - Is there a way to store int value in object GKScore? -
ios - Is there a way to store int value in object GKScore? -
i trying integrate gamecenter app, cant seem work:
- (void) reportscore { gkscore *score = [[gkscore alloc] initwithleaderboardidentifier:@"high_scores_leaderboard"]; [gkscore reportscores:@[score] withcompletionhandler:^(nserror *error) { if (error != nil) { nslog(@"%@", [error localizeddescription]); } }];
}
i utilize above method study score gamecenter. stored score in int:
extern int g_nscore;
is there way me store g_nscore gkscore can run above method?
gkscore has "value
" property, "int64_t
".
why not set ".value
" property of "score
" object "g_nscore
"?
ios objective-c xcode game-center
Comments
Post a Comment