示例#1
0
    public override void GetDamage(Unit sender, float damage)
    {
        sender.TriggerGetDamageBuffs(sender, damage);
        CurrentHealth -= damage;
        //UpdateHealth();
        if (CurrentHealth <= 0)
        {
            UnitDie();
        }

        if (Vector3.Distance(transform.position, sender.transform.position) < RangeAggroWhenAttack)
        {
            AttackScript.Aggro(sender);
        }
    }