// Loads the scores for a leaderboard // It also loads friend scores automatically public static void LoadScores(LumosLeaderboard leaderboard, int limit, int offset) { leaderboard.LoadScores(limit, offset, (success) => { if (success) { Debug.Log("Loaded scores for: " + leaderboard.id); // access scores using leaderboard.scores } else { Debug.LogWarning("Unable to load scores for " + leaderboard.id); } }); }
void LoadScoresFromLeaderboard(LumosLeaderboard leaderboard, Action <IScore[]> callback) { leaderboard.LoadScores(100, 0, success => { if (success) { callback(leaderboard.scores); } else { if (callback != null) { callback(null); } } } ); }
void LoadScoresFromLeaderboard (LumosLeaderboard leaderboard, Action<IScore[]> callback) { leaderboard.LoadScores(100, 0, success => { if (success) { callback(leaderboard.scores); } else { if (callback != null) { callback(null); } } } ); }