// 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);
         }
     });
 }
Exemplo n.º 2
0
 void LoadScoresFromLeaderboard(LumosLeaderboard leaderboard, Action <IScore[]> callback)
 {
     leaderboard.LoadScores(100, 0,
                            success => {
         if (success)
         {
             callback(leaderboard.scores);
         }
         else
         {
             if (callback != null)
             {
                 callback(null);
             }
         }
     }
                            );
 }
Exemplo n.º 3
0
	void LoadScoresFromLeaderboard (LumosLeaderboard leaderboard, Action<IScore[]> callback)
	{
		leaderboard.LoadScores(100, 0,
			success => {
				if (success) {
					callback(leaderboard.scores);
				} else {
					if (callback != null) {
						callback(null);
					}
				}
			}
		);
	}