Beispiel #1
0
    private void AddCardToSpot(BlackJackTableSpot spot, CardDeck.CardDefinition definition)
    {
        // Spawn card Display and give to player
        Card newCard = GameObject.Instantiate(m_CardPrefab, m_CardSpawnPoint.position, m_CardSpawnPoint.rotation);

        newCard.InitializeCard(m_CardSprites[definition.Index], definition);
        spot.MoveCardToSpot(newCard);
    }
Beispiel #2
0
    private void DealCardToSpot(BlackJackTableSpot spot)
    {
        Debug.Log("Dealing Cards");
        // get card definition
        CardDeck.CardDefinition cardDefinition = m_CurrentDeck.GetCardDefinition();
        if (cardDefinition == null && m_DeckNumber < m_NumberOfDecks)
        {
            m_DeckNumber++;
            m_CurrentDeck.Initialize();
            cardDefinition = m_CurrentDeck.GetCardDefinition();
        }
        // Spawn card Display and give to player
        Card newCard = GameObject.Instantiate(m_CardPrefab, m_CardSpawnPoint.position, m_CardSpawnPoint.rotation);

        newCard.InitializeCard(m_CardSprites[cardDefinition.Index], cardDefinition);
        spot.MoveCardToSpot(newCard);
    }