Exemple #1
0
 public void DeActiveCard(HandCardObject handCard)
 {
     if (!deactiveList.Contains(handCard))
     {
         deactiveList.Add(handCard);
         handCard.gameObject.SetActive(false);
         SetCardPosition();
     }
 }
Exemple #2
0
    private HandCardObject ActiveCard()
    {
        HandCardObject active = deactiveList[0];

        activeList.Add(active);
        deactiveList.Remove(active);
        active.gameObject.SetActive(true);
        return(active);
    }
Exemple #3
0
 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);
     }
 }
Exemple #4
0
    //Add from Deck
    public void DrawHand(Card data)
    {
        if (data == null)
        {
            return;
        }
        HandCardObject newCard = ActiveCard();

        newCard.SetCardData(data);
        newCard.transform.position = drawStartPosition.position;

        SetCardPosition();
    }
Exemple #5
0
 /// <summary>
 /// ActiveList에서 지우기만 , DeActivate는 따로해줘야함
 /// 일케안하면 오류생김
 /// </summary>
 public void RemoveFromActive(HandCardObject co)
 {
     activeList.Remove(co);
     SetCardPosition();
 }