Esempio n. 1
0
 /// <summary>
 /// Восстанавливает здоровье карты не выше, чем до изначального максимума.
 /// </summary>
 /// <param name="card"></param>
 /// <param name="value"></param>
 public static void LimitedHealCreature(Card card, int value)
 {
     if (card != null && card.HasComponent <CreatureComponent>())
     {
         CreatureComponent creature = card.GetComponent <CreatureComponent>();
         CardManager.CardSetHealth(card, GameMath.Clamp(creature.CurrentHealth + value, 0, creature.BaseHealth));
     }
 }
Esempio n. 2
0
 public static void DamageCreature(Card card, int value)
 {
     if (card != null && card.HasComponent <CreatureComponent>())
     {
         CreatureComponent creature = card.GetComponent <CreatureComponent>();
         CardManager.CardSetHealth(card, creature.CurrentHealth - value);
     }
 }