예제 #1
0
    protected void CreateDOT(Entity entity)
    {
        float defense = Damage.CalculateDefense(unit.damageType, unit.damageSource, entity.unit.resists);

        Damage.DOT dot = Damage.CalculateDot(unit.damageType, unit.damage, defense, entity.unit.maxHealth);
        entity.TakeDOT(dot);
    }
예제 #2
0
 IEnumerator DOTTick(Damage.DOT dot)
 {
     for (int i = 0; i < (dot.duration / 0.1f); i++)
     {
         unit.healthBar.color = new Color(0.2f, 0, 0.2f);
         TakeDamage(dot.damagePerTick);
         yield return(new WaitForSeconds(0.1f));
     }
     unit.healthBar.color = new Color(0, 255, 0);
 }
예제 #3
0
 public void TakeDOT(Damage.DOT dot)
 {
     StartCoroutine(DOTTick(dot));
 }