Exemplo n.º 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));
     }
 }
Exemplo n.º 2
0
 public OutOfCombatHeal(OutOfCombatHeal buff) : base(buff)
 {
     TimeSinceLastAttack  = buff.TimeSinceLastAttack;
     HealAmount           = buff.HealAmount;
     TimeBetweenHealTicks = buff.TimeBetweenHealTicks;
 }
Exemplo n.º 3
0
 public void Heal(OutOfCombatHeal healInfo, EntityController entity)
 {
     StartCoroutine(HealCoroutine(healInfo, entity));
 }