///getData() /// <summary> /// Use PlayFab API call to get data. /// </summary> /// Pre-Condition: Must be Logged in. /// Post-Condition: Get all the data through GetMaxLevel function. private void getData() { int currentMax = 0; for (int i = 1; i <= 2; i++) { if (pf.GetIntValue("Challenge Level " + i) != "" || pf.GetIntValue("Challenge Level " + i) != pf.GetIntValue("Nothing")) { if (currentMax < i) { currentMax = i; } } } MaxLevel = currentMax; _PlayFabService.Data(PlayFabService.PlayerDataTypes.GetData); }
///ClearData() /// <summary> /// Clear data from the logged PlayFab account and device. /// </summary> ///Pre-Condition: Must be signed into a PlayFab account ///Post-Condition: Data from the logged PlayFab account and device will be delete. private void ClearData() { pf.ResetData(); _PlayFabService.Data(PlayFabService.PlayerDataTypes.ClearData); Display(); }