Inheritance: PlayFab.SharedModels.PlayFabResultCommon
コード例 #1
0
 public void GetClientLbCallback(PlayFab.ClientModels.GetLeaderboardResult result)
 {
     if (result.Leaderboard.Count > 0)
     {
         lastReceivedMessage = "Get Client Leaderboard Successful";
     }
     else
     {
         lastReceivedMessage = "Get Client Leaderboard, empty";
     }
 }
コード例 #2
0
 private void ConstructLeaderboard(PlayFab.ClientModels.GetLeaderboardResult result)
 {
     LeaderboardHighScores.Clear();
     foreach (PlayFab.ClientModels.PlayerLeaderboardEntry entry in result.Leaderboard)
     {
         if (entry.DisplayName != null)
         {
             LeaderboardHighScores.Add(entry.DisplayName, (uint)entry.StatValue);
         }
         else
         {
             LeaderboardHighScores.Add(entry.PlayFabId, (uint)entry.StatValue);
         }
     }
     leaderboardLoaded = true;
 }
コード例 #3
0
    private void GetLeaderboardSucessCallback(PlayFab.ClientModels.GetLeaderboardResult result)
    {
        //Verifica se o resultado não veio nulo.
        if (result != null && result.Leaderboard != null)
        {
            //Pega o objeto que representa o Leaderboard.
            GameObject leaderboardGameObject = GameObject.Find("Leadeboard");

            //Percorre cada uma das 5 linhas que podem vir no Leaderboard e atualiza os campos na cena da Unity
            foreach (PlayFab.ClientModels.PlayerLeaderboardEntry leadeboardLine in result.Leaderboard)
            {
                GetUserInfoAndUpdateLeaderboard(leadeboardLine, leaderboardGameObject, result);
            }

            loadTransform();
        }
    }
コード例 #4
0
        private void ConstructLeaderboard(PlayFab.ClientModels.GetLeaderboardResult result)
        {
            LeaderboardHighScores.Clear();

            foreach (PlayFab.ClientModels.PlayerLeaderboardEntry entry in result.Leaderboard)
            {
                if (entry.DisplayName != null)
                {
                    LeaderboardHighScores.Add(entry.DisplayName, (uint)entry.StatValue);
                }
                else
                {
                    LeaderboardHighScores.Add(entry.PlayFabId, (uint)entry.StatValue);
                }
            }

/*			LeaderboardHighScores.Add ("ueryetyu",89);
 *                      LeaderboardHighScores.Add ("qewyqey",88);
 *                      LeaderboardHighScores.Add ("ddarhddd",50);
 *                      LeaderboardHighScores.Add ("eewetheee dgld",49);
 *                      LeaderboardHighScores.Add ("arhadh",47);
 *                      LeaderboardHighScores.Add ("byeryj",30);
 *                      LeaderboardHighScores.Add ("kfjlcl",39);
 *                      LeaderboardHighScores.Add ("fjlfhl dfgjlfhj",37);
 *                      LeaderboardHighScores.Add ("adasdfhht",90);
 *                      LeaderboardHighScores.Add ("uexvb rasdfyetyu",89);
 *                      LeaderboardHighScores.Add ("qeasdfwyqey",88);
 *                      LeaderboardHighScores.Add ("da bb xvvsdfdarhddd",50);
 *                      LeaderboardHighScores.Add ("eeasdfwetheee dgld",49);
 *                      LeaderboardHighScores.Add ("arab sdghadh",47);
 *                      LeaderboardHighScores.Add ("byfgb beryj",30);
 *                      LeaderboardHighScores.Add ("kfxsxvb dxvgbjlcl",39);
 *                      LeaderboardHighScores.Add ("fjfxb gblfhl dfgjlfhj",37);
 *                      LeaderboardHighScores.Add ("adfxb dnhht",90);
 *                      LeaderboardHighScores.Add ("ufdg eryetyu",89);
 *                      LeaderboardHighScores.Add ("qedcx fgnwyqey",88);
 *                      LeaderboardHighScores.Add ("dddfgnarhddd",50);
 *                      LeaderboardHighScores.Add ("eeadfwetheee dgld",49);
 *                      LeaderboardHighScores.Add ("ab rhadh",47);
 *                      LeaderboardHighScores.Add ("bybxc eryj",30);
 *                      LeaderboardHighScores.Add ("kfjdaflcl",39);
 *                      LeaderboardHighScores.Add ("fjcxblfhl dfgjlfhj",37);
 */

            leaderboardLoaded = true;
        }
コード例 #5
0
    public void LoadLeaderboard(PlayFab.ClientModels.GetLeaderboardResult lbResult)
    {
        LeaderboardHighScores.Clear();

        foreach (PlayFab.ClientModels.PlayerLeaderboardEntry entry in lbResult.Leaderboard)
        {
            if (entry.DisplayName != null)
            {
                LeaderboardHighScores.Add(entry.DisplayName, (uint)entry.StatValue);
            }
            else
            {
                LeaderboardHighScores.Add(entry.PlayFabId, (uint)entry.StatValue);
            }
        }
        Initialize();
    }
コード例 #6
0
ファイル: PlayFabApiTest.cs プロジェクト: yen-igaw/UnitySDK
 private void GetClientLbCallback(GetLeaderboardResult result)
 {
     var testContext = (UUnitTestContext)result.CustomData;
     testContext.True(result.Leaderboard.Count > 0, "Client leaderboard should not be empty");
     testContext.EndTest(UUnitFinishState.PASSED, null);
 }
コード例 #7
0
 public void GetClientLbCallback(GetLeaderboardResult result)
 {
     if (result.Leaderboard.Count > 0)
         lastReceivedMessage = "Get Client Leaderboard Successful";
     else
         lastReceivedMessage = "Get Client Leaderboard, empty";
 }
コード例 #8
0
 /// <summary>
 /// Callback to be called when loading the leaderboard starting from a defined position completes.
 /// </summary>
 /// <param name="result">Leaderboard returned.</param>
 void OnGetLeaderboardFromPositionResult(GetLeaderboardResult result)
 {
     OnLeaderboardLoadedCallback(result.Leaderboard);
 }