C++ ScoreController::GetTopScores()
From J2Play
Contents |
Description
Get the top score record in leader board of all users.
Syntax
const ScoreRecordSet* ScoreController::GetTopScores(int limit);
Parameters
* @param limit, the count of score record trying to retrieve
Return Value
@return const pointer to ScoreRecordSet object.
Examples
Here is the example to get the top 10 scores in leader board
ScoreController* scorecon = CGDKInstnace::GetInstance()->GetScoreController();
if (score)
{
const ScoreRecordSet* toprecord = scorecon->GetTopScores(10);
if (toprecord)
{
// TODO: process the score records
score->DestroyScoreRecordSet(toprecord);
}
}
