Example #1
0
    public void NextCard(ref Card card)
    {
        if (!hand.HaveCard(CardType.GivenOut))
        {
            card.gameObject.SetActive(false);
            return;
        }

        card.FillingCard(hand.NextCard());
    }
Example #2
0
    /// <summary>
    /// Выигрывает first, если second умер и у него на руке больше нет карт
    /// </summary>
    /// <param name="first"></param>
    /// <param name="second"></param>
    /// <param name="secondHand"></param>
    /// <returns></returns>
    bool UpdateWin(Card first, Card second, HandSO secondHand)
    {
        bool healtLessZero = !second.health.IsLife();

        if (healtLessZero)
        {
            secondHand.AddDeath();
        }

        return(first.health.IsLife() && healtLessZero && !secondHand.HaveCard(CardType.Life));
    }