Exemplo n.º 1
0
        private void ShowTalon(int cards, string talonCardCode = null)
        {
            transform.DOMove(showPosition, 1f);
            cardsInTalon          = cards;
            CardsLeftText.text    = cards.ToString();
            TalonDisplay.enabled  = true;
            TrumpCard.enabled     = true;
            TrumpSuitIcon.enabled = false;

            if (cards <= 1)
            {
                TalonDisplay.enabled = false;
            }

            if (cards == 0)
            {
                TrumpCard.enabled     = false;
                TrumpSuitIcon.enabled = true;
            }

            if (talonCardCode != null)
            {
                TrumpCard.sprite = CardUtil.GetSprite(talonCardCode);

                int suitNumber = CardUtil.Suit(talonCardCode);
                TrumpSuitIcon.sprite = _suits[suitNumber];
            }
        }