Exemple #1
0
 public void SetCard(ItemHeroCard card)
 {
     heroID           = card.heroID;
     txtHeroName.text = card.txtHeroName.text;
     imgHero.texture  = card.imgHero.texture;
     objEmpty.SetActive(false);
 }
Exemple #2
0
 public void EquipHeroCard(ItemHeroCard card)
 {
     if (equipedCards[0].objEmpty.activeSelf)
     {
         equipedCards[0].SetCard(card);
     }
     else if (equipedCards[1].objEmpty.activeSelf)
     {
         equipedCards[1].SetCard(card);
     }
     else if (equipedCards[2].objEmpty.activeSelf)
     {
         equipedCards[2].SetCard(card);
     }
 }
Exemple #3
0
 public void SetOwnedHeroesJson(JGetShopItem[] itemHeroes)
 {
     hero_owned = PlayerData.jHome.hero_owned;
     ownedCards = new List <ItemHeroCard> ();
     for (int i = 0; i < itemHeroes.Length; i++)
     {
         for (int j = 0; j < hero_owned.Length; j++)
         {
             if (hero_owned[j] == itemHeroes[i].hero_type_id)
             {
                 ItemHeroCard ihc = Instantiate(prefabItemHeroCard, parentCards);
                 ihc.SetData(itemHeroes[i]);
                 ownedCards.Add(ihc);
             }
         }
     }
 }