void OnTriggerEnter(Collider other) { if (TriggerCondictions(other)) { if (attackObject != null) { attackObject.OnHit(this, other); } } }
private void OnEnter(Collider other) { //Debug.Log("Enter" + other.gameObject.name); if (TriggerCondictions(other)) { if (attackObject != null) { attackObject.OnHit(this, other); if (disableHitBoxOnHit && trigger.enabled) { trigger.enabled = false; } } } }