Esempio n. 1
0
 /// <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();
 }
Esempio n. 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);
            }
        }
    }
Esempio n. 3
0
 public void ChangeTextCardName(CardInfo cardInfo)
 {
     textCardName.text = cardInfo.GetCard().Name;
 }
Esempio n. 4
0
    private bool CheckIfCurrentParentIsStock(CardInfo myCardInfo)
    {
        Stock stock = myCardInfo.GetCard().transform.parent.GetComponent <Stock>();

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