Ejemplo n.º 1
0
    private void InitializeCards(int amountOfSlots)
    {
        cards = PlayerAndEnemyDeckHolder.GetPreparedCardsForThePlayerWithTheRandomCards();

        for (int i = 0; i < amountOfSlots; i++)
        {
            PutCardInIndexWithSmoothMovement(cards[i], i);

            ChildMaker.CopySizeDelta(slots[i], cards[i].GetRectTransform());
        }
    }
Ejemplo n.º 2
0
    private void PopulateAmountOfEachCard()
    {
        amountOfEachCard = new int[cards.Length];

        int[] cardAmounts = CardsCollection.GetCardsCollectionAmounts();

        Card[] currentDeck = PlayerAndEnemyDeckHolder.GetPreparedCardsForThePlayerWithTheRandomCards();

        // For each card on Deck, subtract 1 from it's amount in the collection.
        for (int i = 0; i < cards.Length; i++)
        {
            int amount = cardAmounts[i];
            for (int k = 0; k < currentDeck.Length; k++)
            {
                if (cards[i].IsAnotherInstanceOf(currentDeck[k]))
                {
                    amount--;
                }
            }

            amountOfEachCard[i] = amount;
        }
    }