void OnGetStats(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); switch (eachStat.StatisticName) { case "PlayerLevel": playerLevel = eachStat.Value; break; case "GameLevel": gameLevel = eachStat.Value; break; case "PlayerHealth": playerHealth = eachStat.Value; break; case "PlayerDamage": playerDamage = eachStat.Value; break; case "PlayerHighScore": playerHighScore = eachStat.Value; break; } } }
void OnDataDownload(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); switch (eachStat.StatisticName) { case "UserID": Player.UserID = eachStat.Value; break; case "Ticket": Player.tickets = eachStat.Value; break; case "Coin": Player.coins = eachStat.Value; break; case "Dollar": Player.dollar = eachStat.Value; break; } } LoggedIn(); FirstScreen script = FirScreen.GetComponent <FirstScreen>(); script.Play(); }
void OnGetStats(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); switch (eachStat.StatisticName) { case "PlayerPoints": playerpoints = eachStat.Value; break; case "Kills": kills = eachStat.Value; break; case "playerhealth": playerhealth = eachStat.Value; break; case "playerHighScore": playerhighScore = eachStat.Value; break; } } }
public void OnGetStats(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); // Using a switch might not be optimal, but we use it currently to verify our stats switch (eachStat.StatisticName) { case "PlayerLevel": playerLevel = eachStat.Value; break; case "GameLevel": gameLevel = eachStat.Value; break; case "PlayerHealth": playerHealth = eachStat.Value; break; case "PlayerHighScore": playerHighScore = eachStat.Value; break; } } }
void OnSuccess(GetPlayerStatisticsResult result) { foreach (StatisticValue value in result.Statistics) { // Todo: cache stats so you can use them immediately as needed } }
private void GetPlayerStatsCallback1(GetPlayerStatisticsResult result) { var testContext = (UUnitTestContext)result.CustomData; _testInteger = 0; foreach (var eachStat in result.Statistics) { if (eachStat.StatisticName == TEST_STAT_NAME) { _testInteger = eachStat.Value; } } _testInteger = (_testInteger + 1) % 100; // This test is about the Expected value changing - but not testing more complicated issues like bounds var updateRequest = new UpdatePlayerStatisticsRequest { Statistics = new List <StatisticUpdate> { new StatisticUpdate { StatisticName = TEST_STAT_NAME, Value = _testInteger } } }; clientInstance.UpdatePlayerStatistics(updateRequest, PlayFabUUnitUtils.ApiActionWrapper <UpdatePlayerStatisticsResult>(testContext, UpdatePlayerStatsCallback), PlayFabUUnitUtils.ApiActionWrapper <PlayFabError>(testContext, SharedErrorCallback), testContext); }
private void SuccessStat(GetPlayerStatisticsResult result) { playFabmanager.Player_Score = result.Statistics[0].Value; playFabmanager.LoadingMessage("Loading Profile Success..."); playFabmanager.LoadingHide(); GetBalance(); }
void OnGetStatistics(GetPlayerStatisticsResult result) { m_loadingText.SetActive(false); Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); } int totalGameCount = 0; foreach (var eachStat in result.Statistics) { foreach (var value in sumValues) { if (eachStat.StatisticName == value) { totalGameCount += eachStat.Value; } } } AddStatisticsField(TOTAL_GAMES, totalGameCount); result.Statistics.Sort((StatisticValue val1, StatisticValue val2) => { return(val1.StatisticName.CompareTo(val2.StatisticName)); }); foreach (var eachStat in result.Statistics) { if (statistics.ContainsKey(eachStat.StatisticName)) { AddStatisticsField(statistics[eachStat.StatisticName], eachStat.Value); } } }
void GetScoreSucces(GetPlayerStatisticsResult result) { foreach (var eachData in result.Statistics) { lastScore = eachData.Value; } }
void OnGetStats(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); } }
private static void OnGetPlayerStatisticsSuccess(GetPlayerStatisticsResult result) { //TODO update to use new PF_Bridge.RaiseCallbackSuccess("", PlayFabAPIMethods.GetUserStatistics, MessageDisplayStyle.none); foreach (var each in result.Statistics) { userStatistics[each.StatisticName] = each.Value; } }
private void GetStatsSuccess(GetPlayerStatisticsResult obj) { //print(" Stats received successfully "); // output statistics foreach (var stat in obj.Statistics) { print(" Statistic: " + stat.StatisticName + " value: " + stat.Value); } }
public static int TryGetInStatistics(this GetPlayerStatisticsResult Result, string Identifier, int PreviousValue) { StatisticValue statistic = Result.Statistics.Find(T => T.StatisticName == Identifier); if (statistic != null) { return(statistic.Value); } return(PreviousValue); }
private void GetStatsSuccess(GetPlayerStatisticsResult obj) { print("Stats wurden erfolgreich empfangen"); // Output statistics foreach (var stat in obj.Statistics) { print("Statistic: " + stat.StatisticName + " Stats value: " + stat.Value); } }
public static void OnGetLocalPlayerStatistics(GetPlayerStatisticsResult Result) { AllTimesTotalScore = Result.TryGetInStatistics(AllTimesTotalScoreIdentifier, AllTimesTotalScore); BiggestScore = Result.TryGetInStatistics(BiggestScoreIdentifier, BiggestScore); for (int LevelId = 1; LevelId <= MaxLevelReached; ++LevelId) { LevelRecord Record = GetRecord(LevelId); Record.OnGetLocalPlayerStatistics(Result); } }
public static void StoreItemsFromJson(GetPlayerStatisticsResult res) { Items.Clear(); List <StatisticValue> allStatistics = res.Statistics; for (int i = 0; i < allStatistics.Count; i++) { var statistic = new FMUserStatistic(allStatistics[i].StatisticName, allStatistics[i].Value); Items.Add(statistic); } }
void OnGetStatistics(GetPlayerStatisticsResult result) { //Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { //Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); switch (eachStat.StatisticName) { case "Hat": playerHat = eachStat.Value; break; case "Accessories": Playeraccessory = eachStat.Value; break; case "Top": playerTop = eachStat.Value; break; case "Jacket": playerJacket = eachStat.Value; break; case "Underware": playerUnderware = eachStat.Value; break; case "Bottom": playerBottom = eachStat.Value; break; case "Shoes": playerShoes = eachStat.Value; break; case "Skin": playerSkin = eachStat.Value; break; case "Sex": playerSex = eachStat.Value; break; case "Head": playerHead = eachStat.Value; break; } } run = false; }
private void OnGetscore(GetPlayerStatisticsResult result) { foreach (var eachStat in result.Statistics) { switch (eachStat.StatisticName) { case "Overall Score": totalscore = eachStat.Value; break; } } PlayerPrefs.SetInt("TOTALSCORE", totalscore); }
void OnGetStatistics(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); switch (eachStat.StatisticName) { case "PlayerKillCount": playerTotalKills = eachStat.Value; break; } } }
void OnGetStats(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); switch (eachStat.StatisticName) { case "Exp": exp = eachStat.Value; break; } } }
private void OnGetStats(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) //result.Statistics - list of all stats elements { Debug.Log($"Statistic ( {eachStat.StatisticName} ): {eachStat.Value})"); switch (eachStat.StatisticName) { case "PlayerScore": playerScore = eachStat.Value; GM.SetScore(playerScore); break; } } }
private void OnGotPlayerStatistics(GetPlayerStatisticsResult result) { var statisticsDictionary = new Dictionary <string, int>(); foreach (var stat in result.Statistics) { statisticsDictionary.Add(stat.StatisticName, stat.Value); } var getInventoryResult = new GetPlayerStatisticsCommandResult { StatisticsDictionary = statisticsDictionary }; Callback?.Invoke(getInventoryResult); }
/// <summary> /// 統計情報の取得に成功 /// </summary> /// <param name="result"></param> private void OnGetStatistics(GetPlayerStatisticsResult result) { valueList.Clear(); // 通信終了 waitConnect.RemoveWait(gameObject.name); Debug.Log("スコア(統計情報)の取得に成功:"); foreach (var eachStat in result.Statistics) { valueList.Add(eachStat); Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); } isGet = true; }
void OnGetStats(GetPlayerStatisticsResult result) { foreach (var eachStat in result.Statistics) { switch (eachStat.StatisticName) { case "Satoshi": PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest() { FunctionName = "UpdateLeaderboard", // Arbitrary function name (must exist in your uploaded cloud.js file) FunctionParameter = new { BBTCValue = sendCoins, BBTCHighscoreValue = sendCoins, SatoshiValue = sendCoins }, // The parameter provided to your function GeneratePlayStreamEvent = true, // Optional - Shows this event in PlayStream }, nothing1 => { }, nothing2 => { }); break; } } }
void OnGetStats(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { //Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); switch (eachStat.StatisticName) { case "PlayerLevel": dataManager.SetPlayerLevel(eachStat.Value); break; } } // dataManager.AfkFarmHorsLigne(); }
private void GetPlayerStatsCallback2(GetPlayerStatisticsResult result) { var testContext = (UUnitTestContext)result.CustomData; var actualValue = int.MinValue; // a value that shouldn't actually occur in this test foreach (var eachStat in result.Statistics) { if (eachStat.StatisticName == TEST_STAT_NAME) { actualValue = eachStat.Value; } } testContext.IntEquals(_testInteger, actualValue); testContext.EndTest(UUnitFinishState.PASSED, actualValue.ToString()); }
public void OnGetStats(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); switch (eachStat.StatisticName) { case "PlayerLevel": playerLevel = eachStat.Value; break; case "PlayerGemAmount": playerGemAmount = eachStat.Value; break; } } }
void OnGetStatistics(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); switch (eachStat.StatisticName) { case "Money": money = eachStat.Value; break; case "Shafts": shafts = eachStat.Value; break; } } }
private void OnWinCountSuccess(GetPlayerStatisticsResult result) { if (!CakeRaceMenu.IsCakeRaceMenuOpen) { return; } string value = PlayFabLeaderboard.Leaderboard.CakeRaceWins.ToString(); foreach (StatisticValue statisticValue in result.Statistics) { if (statisticValue.StatisticName.Equals(value)) { this.SetWinCount(statisticValue.Value); return; } } this.SetWinCount(0); }
private void OnGetStatistics(GetPlayerStatisticsResult result) { Debug.Log("Received the following Statistics:"); foreach (var eachStat in result.Statistics) { //Debug.Log("Statistic (" + eachStat.StatisticName + "): " + eachStat.Value); switch (eachStat.StatisticName) { case "PlayerGold": playerGold = eachStat.Value; UpdateGoldText(); break; default: break; } } }