0
檢索本土球員排行榜掙扎下載和顯示本地玩家高性分數顯示在遊戲中心 - 當前代碼顯示0,儘管比分是215如何從遊戲中心
GKLeaderboard *leaderboardRequest = [[GKLeaderboard alloc] init];
leaderboardRequest.playerScope = GKLeaderboardPlayerScopeGlobal;
leaderboardRequest.timeScope = GKLeaderboardTimeScopeAllTime;
leaderboardRequest.range = NSMakeRange(1,1);
int64_t personalBest= (int64_t)(leaderboardRequest.localPlayerScore.value * 1000000);
CCLabelTTF *HighScoreLabel = [CCLabelTTF labelWithString:[NSString stringWithFormat:@"%lld",personalBest] fontName:@"MyScriptFont" fontSize:50.0];
HighScoreLabel.positionType = CCPositionTypeNormalized;
HighScoreLabel.position = ccp(0.65f, 0.7f);
[self addChild:HighScoreLabel];
關鍵點我失蹤..是要說明哪個排行榜id doh! leaderboardRequest.category = @「XXXXXXXX」; – user1150531