Пример #1
0
 void ResetCardPoints()
 {
     currentCardPoints = currentMaxCardPoints;
     if (OnUpdateCardPoints != null)
     {
         OnUpdateCardPoints.Invoke(currentCardPoints);
     }
 }
Пример #2
0
    void UpdateCurrentCardPoints(CardObject cardObject)
    {
        currentCardPoints -= cardObject.cardDefinition.cost;
        if (OnUpdateCardPoints != null)
        {
            OnUpdateCardPoints.Invoke(currentCardPoints);
        }

        if (currentCardPoints == 0)
        {
            if (OnAllCardPointsUsed != null)
            {
                OnAllCardPointsUsed.Invoke();
            }
        }
    }