void UpdateVue() { SceneHelper.DestroyChildrenInParent(cardParent); overlaytitle.text = title; for (int i = 0; i < cards.Length; i++) { AddCard(cards[i], i); AddButton(cards[i], i); } cardWrapper.sizeDelta = new Vector2(0f, ContentHeight(cards.Length)); }
void UpdateVue() { SceneHelper.DestroyChildrenInParent(cardParent); for (int i = 0; i < cardIndexes.Length; i++) { CardData card = deck.GetCard(cardIndexes[i]); AddCard(card, i); AddButton(card.Title, cardIndexes[i], i); } cardWrapper.sizeDelta = new Vector2(cardIndexes.Length * (cardObjectWidth + padding) + padding, 400); }
void UpdateVue() { SceneHelper.DestroyChildrenInParent(cardParent); deckTitle.text = deck.Title; CardData[] cards = deck.GetCardsSorted(); for (int i = 0; i < cards.Length; i++) { AddCard(cards[i], i, cards.Length); } cardWrapper.sizeDelta = new Vector2(0f, ContentHeight(cards.Length)); }
public void DisplayCards(CardData[] cards, int[] indexes) { SceneHelper.DestroyChildrenInParent(parent); for (int i = 0; i < cards.Length; i++) { GameObject card = Instantiate(cardPrefab); CardUI script = card.GetComponent <CardUI>(); script.Data = cards[i]; card.transform.position = new Vector3(i * (cardWidth + padding), 0f, 0f); card.transform.SetParent(parent, false); } parent.sizeDelta = new Vector2((cardWidth + padding) * cards.Length - padding, cardHeight); }
public void DisplayCard(CardData data) { if (data == null) { SceneHelper.DestroyChildrenInParent(parent); } else { SceneHelper.DestroyChildrenInParent(parent); GameObject card = Instantiate(cardPrefab); CardUI script = card.GetComponent <CardUI>(); script.Data = data; card.transform.SetParent(parent, false); } }
void UpdateVue() { SceneHelper.DestroyChildrenInParent(mainKeywordParent); SceneHelper.DestroyChildrenInParent(associatedKeywordParent); SetCard(mainCard, cardData, mainKeywordParent); if (cardData.AssociatedCard == null) { associatedCard.gameObject.SetActive(false); } else { SetCard(associatedCard, cardData.AssociatedCard, associatedKeywordParent); associatedCard.gameObject.SetActive(true); } }
public void Clear() { SceneHelper.DestroyChildrenInParent(parent); }