Example #1
0
 private void ResetHandId()
 {
     for (int i = 0; i < cards.Count; i++)
     {
         MainPlayerCard mainPlayerCard = cards[i];
         mainPlayerCard.card.handId = i;
     }
 }
Example #2
0
    public override void AddCard(Card card)
    {
        GameObject go = Instantiate(ResourceManager.GetMainPlayerCardPrefab());

        go.transform.SetParent(cardsTransform);
        MainPlayerCard mainPlayerCard = go.GetComponent <MainPlayerCard>();

        mainPlayerCard.card        = card;
        mainPlayerCard.card.handId = cards.Count;
        cards.Add(mainPlayerCard);
    }
Example #3
0
    public int[] GetSelectedCardsId()
    {
        List <int> result = new List <int>();

        for (int i = 0; i < cards.Count; i++)
        {
            MainPlayerCard card = cards[i];
            if (card.selected)
            {
                result.Add(i);
            }
        }
        return(result.ToArray());
    }