private void OnPlayfabCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle displayStyle) { if (method == PlayFabAPIMethods.SavePlayerInfo) { //PF_PlayerData.GetCharacterDataById(selectedSlot.saved.characterDetails.CharacterId); PF_PlayerData.GetCharacterData(); } else if (method == PlayFabAPIMethods.GetCharacterReadOnlyData) { RefreshData(); equipController.Refresh(); } }
void HandleCharacterRequest(Action <string> callback = null, CharacterFilters filter = CharacterFilters.AllCharacter) { Action afterGetCharacter = () => { // ENABLE THIS AFTER WE HAVE A CONSISTENT WAY TO HIDE TINTS //ShowTint(); Action afterGetData = () => { this.floatingChaPrompt.Init(callback, filter); }; PF_PlayerData.GetCharacterData(afterGetData); }; PF_PlayerData.GetPlayerCharacters(afterGetCharacter); }
public static void CharacterSelectDataRefresh() { //Debug.Log("Ran CharacterSelectDataRefresh"); PF_PlayerData.GetUserAccountInfo(); PF_GameData.GetTitleData(); //PF_GameData.GetTitleNews(); PF_GameData.GetCatalogInfo(); //PF_GameData.GetOffersCatalog(); System.Action action = () => { PF_PlayerData.GetCharacterData(); }; PF_PlayerData.GetPlayerCharacters(action); //PF_PlayerData.GetCharacterData(); //PF_PlayerData.GetUserStatistics(); }
public void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle style) { switch (method) { case PlayFabAPIMethods.GetTitleData_General: case PlayFabAPIMethods.GetAccountInfo: isTitleDataLoaded |= method == PlayFabAPIMethods.GetTitleData_General; isPlayerInventoryLoaded |= method == PlayFabAPIMethods.GetAccountInfo; int extraCount = 0; InventoryCategory temp; if (PF_PlayerData.inventoryByCategory != null && PF_PlayerData.inventoryByCategory.TryGetValue("ExtraCharacterSlot", out temp)) { extraCount = temp.count; } maxCharacterSlots = PF_GameData.StartingCharacterSlots + extraCount; break; case PlayFabAPIMethods.GetAllUsersCharacters: isPlayerCharatersLoaded = true; PF_PlayerData.GetCharacterData(); PF_PlayerData.GetCharacterStatistics(); break; case PlayFabAPIMethods.DeleteCharacter: ResetDataChecks(); GameController.CharacterSelectDataRefresh(); break; case PlayFabAPIMethods.GrantCharacterToUser: ResetDataChecks(); GameController.CharacterSelectDataRefresh(); break; case PlayFabAPIMethods.GetCharacterReadOnlyData: isCharacterDataLoaded = true; break; case PlayFabAPIMethods.GetUserStatistics: isUserStatsLoaded = true; break; } CheckToInit(); }
private void HandleCallbackSuccess(string details, PlayFabAPIMethods method, MessageDisplayStyle displayStyle) { switch (method) { case PlayFabAPIMethods.GetTitleData: break; case PlayFabAPIMethods.GetAccountInfo: isAccountInfoLoaded = true; break; case PlayFabAPIMethods.GetCharacterReadOnlyData: isCharacterDataLoaded = true; SetSavedTeamData(); break; case PlayFabAPIMethods.UpdateUserData: isUserDataUpdated = true; SetSavedTeamData(); teamUiController.Init(); break; case PlayFabAPIMethods.GrantCharacterToUser: PF_PlayerData.GetPlayerCharacters(() => { PF_PlayerData.GetCharacterData(() => { CheckIsNewPlayer(); }); }); break; } CheckToContinue(); }