public void OnHit(AttackInfo aInfo)
    {
        print(enemy.gameObject.name + " hit in " + gameObject.name);
        aInfo.damage *= damage_mod;
        if (enemy.OnTakeDamage(this, aInfo))
        {
            rb.AddForceAtPosition(aInfo.impulse * aInfo.damage * 5, aInfo.point, ForceMode.Impulse);
        }

        aInfo.blocked = true;
        ParticleCaster.Cast(aInfo.point, aInfo.normal, particle);
    }
    public virtual void OnHit(AttackInfo aInfo)
    {
        if (!dead)
        {
            StartCoroutine(FadeOut(fragile ? 0.5f : 5, fragile ? 0.5f : 2));
        }

        dead                = true;
        transform.parent    = null;
        ragdoll.isKinematic = false;
        ragdoll.AddForceAtPosition(aInfo.impulse * aInfo.damage * 5, aInfo.point, ForceMode.Impulse);
        ragdoll.maxAngularVelocity = 50;
        ragdoll.angularVelocity    = transform.InverseTransformVector(aInfo.impulse) * 50;

        aInfo.damage *= 0.5f;
        ParticleCaster.Cast(aInfo.point, aInfo.normal, particle);
    }
 public virtual void OnHit(AttackInfo aInfo)
 {
     aInfo.blocked = true;
     ParticleCaster.Cast(aInfo.point, aInfo.normal, particle);
 }