Example #1
0
 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();
 }
Example #2
0
 private void LoginCallBack(ClientModels.LoginResult loginResult)
 {
     pfLoginExample.playFabId = loginResult.PlayFabId;
     gameObject.SendMessage("OnPfLoginComplete"); // Alert any other example components that login is complete
 }
Example #3
0
 private void ConsumeItemCallback(ClientModels.UnlockContainerItemResult unlockResult)
 {
     GetUserInventory_C();
     GetCharacterInventory_C();
 }
Example #4
0
 private void ConsumeItemCallback(ClientModels.ConsumeItemResult consumeResult)
 {
     GetUserInventory_C();
     GetCharacterInventory_C();
 }
Example #5
0
 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();
 }
Example #6
0
        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);
            }
        }
Example #7
0
 private void GetCharVcCallback(ClientModels.GetCharacterInventoryResult getResult)
 {
     characterVirtualCurrency = getResult.VirtualCurrency;
     foreach (var pair in getResult.VirtualCurrency)
         virutalCurrencyTypes.Add(pair.Key);
 }
Example #8
0
 private void GetUserInventoryCallback(ClientModels.GetUserInventoryResult getResult)
 {
     userItems = getResult.Inventory;
 }
Example #9
0
 private void GetCharInventoryCallback(ClientModels.GetCharacterInventoryResult getResult)
 {
     if (getResult.CharacterId == character1Id)
         char1Items = getResult.Inventory;
     else if (getResult.CharacterId == character2Id)
         char2Items = getResult.Inventory;
 }