예제 #1
0
 public IEnumerator HealCoroutine(OutOfCombatHeal healInfo, EntityController entity)
 {
     while (true)
     {
         if ((Time.time > healInfo.TimeSinceLastAttack) &&
             (entity.GetHealth() < entity.GetMaxHealth()) &&
             (Time.time - entity.GetLastTimeAttacked() > healInfo.TimeSinceLastAttack))
         {
             entity.AddHealth(healInfo.HealAmount);
         }
         yield return(new WaitForSeconds(healInfo.TimeBetweenHealTicks));
     }
 }
예제 #2
0
 public OutOfCombatHeal(OutOfCombatHeal buff) : base(buff)
 {
     TimeSinceLastAttack  = buff.TimeSinceLastAttack;
     HealAmount           = buff.HealAmount;
     TimeBetweenHealTicks = buff.TimeBetweenHealTicks;
 }
예제 #3
0
 public void Heal(OutOfCombatHeal healInfo, EntityController entity)
 {
     StartCoroutine(HealCoroutine(healInfo, entity));
 }