/// <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(); }
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); } } }
public void ChangeTextCardName(CardInfo cardInfo) { textCardName.text = cardInfo.GetCard().Name; }
private bool CheckIfCurrentParentIsStock(CardInfo myCardInfo) { Stock stock = myCardInfo.GetCard().transform.parent.GetComponent <Stock>(); return((stock != null) ? true : false); }