Example #1
0
    public Sprite GetSprite(GameVariables.CardType cardValue, GameVariables.SuitType suitType)
    {
        if (suitType == GameVariables.SuitType.Joker || cardValue == GameVariables.CardType.Joker)
        {
            return(cardSprites[52]);
        }
        int _index = ((int)suitType - 1) * SUIT_LENGTH + (int)cardValue - 1;

        return(cardSprites[_index]);
    }
Example #2
0
 internal void Init(GameVariables.CardType cardValue, GameVariables.SuitType suitType)
 {
     this.cardValue   = cardValue;
     this.suitType    = suitType;
     cardImage.sprite = CardController.GetInstance.GetSprite(cardValue, suitType);
     wildCardJ.SetActive(GamePlayManager.GetInstance.wildCard.suitValue == suitType &&
                         GamePlayManager.GetInstance.wildCard.cardValue == cardValue);
     if (cardValue == GameVariables.CardType.Ace)
     {
         cardValueIndex = 14;
     }
     else
     {
         cardValueIndex = (int)cardValue;
     }
 }
Example #3
0
 internal void SetDetail(GameVariables.CardType cardValue, GameVariables.SuitType suitType)
 {
     image.sprite = CardController.GetInstance.GetSprite(cardValue, suitType);
     wildCardJ.SetActive(GamePlayManager.GetInstance.wildCard.suitValue == suitType &&
                         GamePlayManager.GetInstance.wildCard.cardValue == cardValue);
 }