Exemplo n.º 1
0
    public static void UnitTakeDamage(UnitCombatController attacker, UnitCombatController victim)
    {
        float damage = attacker.unitAttackStats.attackDamage;

        victim.TakeDamage(attacker, damage);
    }
Exemplo n.º 2
0
 public void TakeDamage(UnitCombatController attacker, float damage)
 {
     StartCoroutine(Flasher(GetComponent <Renderer>().material.color));
     health -= damage;
     anim.SetTrigger("Hit");
 }