private void OnTriggerEnter(Collider other) { UnitHealth unit = other.GetComponent <UnitHealth>(); if (unit != null) { unit.Hit(damage, null); } }
public override void DamageTarget() { UnitHealth unitHealth = target.GetComponent <UnitHealth> (); unitHealth.Hit(damage, attacker); }