public void DeActiveCard(HandCardObject handCard) { if (!deactiveList.Contains(handCard)) { deactiveList.Add(handCard); handCard.gameObject.SetActive(false); SetCardPosition(); } }
private HandCardObject ActiveCard() { HandCardObject active = deactiveList[0]; activeList.Add(active); deactiveList.Remove(active); active.gameObject.SetActive(true); return(active); }
public void MakeCards(int num) { for (int i = 0; i < num; i++) { HandCardObject cardObject = ArchLoader.instance.GetCardObject(); deactiveList.Add(cardObject); cardObject.gameObject.SetActive(false); cardObject.SetParent(transform); cardObject.SetHand(this); } }
//Add from Deck public void DrawHand(Card data) { if (data == null) { return; } HandCardObject newCard = ActiveCard(); newCard.SetCardData(data); newCard.transform.position = drawStartPosition.position; SetCardPosition(); }
/// <summary> /// ActiveList에서 지우기만 , DeActivate는 따로해줘야함 /// 일케안하면 오류생김 /// </summary> public void RemoveFromActive(HandCardObject co) { activeList.Remove(co); SetCardPosition(); }