/// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="value"></param>
 public CardInfo(CardInfo cardInfo)
 {
     this.reversed        = cardInfo.GetReversed();
     this.pos             = cardInfo.GetPos();
     this.childOrder      = cardInfo.GetChildOrder();
     this.parentTransform = cardInfo.GetParent();
     this.card            = cardInfo.GetCard();
 }
Exemple #2
0
    private void ShowPrefferCards()
    {
        for (int j = 0; j < hand.childCount; j++)
        {
            temp     = hand.GetChild(j).gameObject;
            cardInfo = temp.GetComponent <CardInfo>();
            cardData = cardInfo.GetCard();

            if (cardData.Suit != prefferSuit)
            {
                temp.GetComponent <Image>().color = hideColor;
                cardInfo.SetAvalible(false);
            }
            else
            {
                temp.GetComponent <Image>().color = whiteColor; cardInfo.SetAvalible(true);
            }
        }
    }
Exemple #3
0
 public void ChangeTextCardName(CardInfo cardInfo)
 {
     textCardName.text = cardInfo.GetCard().Name;
 }
Exemple #4
0
    private bool CheckIfCurrentParentIsStock(CardInfo myCardInfo)
    {
        Stock stock = myCardInfo.GetCard().transform.parent.GetComponent <Stock>();

        return((stock != null) ? true : false);
    }