Пример #1
0
    private void OnTriggerEnter(Collider other)
    {
        UnitHealth unit = other.GetComponent <UnitHealth>();

        if (unit != null)
        {
            unit.Hit(damage, null);
        }
    }
Пример #2
0
    public override void DamageTarget()
    {
        UnitHealth unitHealth = target.GetComponent <UnitHealth> ();

        unitHealth.Hit(damage, attacker);
    }