private void LateUpdate()
 {
     if (currentCard)
     {
         currentCard.SetPositon(Vector3.Lerp(currentCard.transform.position, new Vector3(HAD_MousePointer.Instance.InfoImpact.point.x, HAD_GameManager.Instance.FirstPlanHeight, HAD_MousePointer.Instance.InfoImpact.point.z), lerpGrab));
     }
 }
Exemple #2
0
    public void DiscardCard(HAD_Card _card)
    {
        if (!_card)
        {
            return;
        }

        _card.SetPositon(anchorDiscardPile);
        _card.Owner.DiscardPile.AddCard(_card);
        _card.Discard = true;

        if (_card.ItsBoard)
        {
            _card.ItsBoard.RemoveCard(_card);
            return;
        }

        if (_card.Owner.Hand.ExistCard(_card))
        {
            _card.Owner.Hand.RemoveCard(_card);
            return;
        }

        if (_card.Owner.Deck.ExistCard(_card))
        {
            _card.Owner.Deck.RemoveCard(_card);
        }
    }