void OnTriggerEnter(Collider other) { if (other as CapsuleCollider) { if (attackComponent != null) { if (attackComponent.IsAttacking()) { damageTargetsDel(other.transform); } } } }