Esempio n. 1
0
 private void GetMonstersFromCloud()
 {
     PlayFabClientAPI.GetPlayerStatistics(new GetPlayerStatisticsRequest(),
                                          result =>
     {
         foreach (var stat in result.Statistics)
         {
             if (stat.StatisticName == "MonstersKilled")
             {
                 playerDataSaver.SetMonstersKilled(stat.Value);
                 monstersKilled    = playerDataSaver.GetMonstersKilled();
                 monstersText.text = monstersKilled.ToString();
             }
         }
     },
                                          error => Debug.LogError(error.GenerateErrorReport()));
 }