private void OnTriggerEnter2D(Collider2D _other) { if (_other.GetComponent <IMaxHeight>() != null) { Destroy(gameObject); return; } IEnemy enemy = _other.GetComponent <IEnemy>(); if (enemy != null) { enemy.BulletHit(); m_collider2D.enabled = false; Destroy(gameObject); } }