private void CharCallBack(ClientModels.ListUsersCharactersResult charResult) { foreach (var character in charResult.Characters) if (character.CharacterName.ToLower() == charName.ToLower()) characterId = character.CharacterId; if (!string.IsNullOrEmpty(characterId)) GetCharacterInventory(); }
private void LoginCallBack(ClientModels.LoginResult loginResult) { pfLoginExample.playFabId = loginResult.PlayFabId; gameObject.SendMessage("OnPfLoginComplete"); // Alert any other example components that login is complete }
private void ConsumeItemCallback(ClientModels.UnlockContainerItemResult unlockResult) { GetUserInventory_C(); GetCharacterInventory_C(); }
private void ConsumeItemCallback(ClientModels.ConsumeItemResult consumeResult) { GetUserInventory_C(); GetCharacterInventory_C(); }
private void GetCharacterItemsCallback_C(ClientModels.GetCharacterInventoryResult getResult) { charItems = getResult.Inventory; sb.Length = 0; for (int i = 0; i < getResult.Inventory.Count; i++) { if (i != 0) sb.Append(", "); sb.Append(getResult.Inventory[i].DisplayName); } charInventory = sb.ToString(); }
private void GetCatalogCallback(ClientModels.GetCatalogItemsResult catalogResult) { catalogItems = catalogResult.Catalog; consumableItemIds.Clear(); containerItemIds.Clear(); foreach (var each in catalogItems) { if (each.Container != null) containerItemIds.Add(each.ItemId); else if (each.Consumable != null && each.Consumable.UsageCount > 0) consumableItemIds.Add(each.ItemId); } }
private void GetCharVcCallback(ClientModels.GetCharacterInventoryResult getResult) { characterVirtualCurrency = getResult.VirtualCurrency; foreach (var pair in getResult.VirtualCurrency) virutalCurrencyTypes.Add(pair.Key); }
private void GetUserInventoryCallback(ClientModels.GetUserInventoryResult getResult) { userItems = getResult.Inventory; }
private void GetCharInventoryCallback(ClientModels.GetCharacterInventoryResult getResult) { if (getResult.CharacterId == character1Id) char1Items = getResult.Inventory; else if (getResult.CharacterId == character2Id) char2Items = getResult.Inventory; }