private void OnTriggerEnter(Collider other) { ITakeDamage droid = other.GetComponent <ITakeDamage>(); if (droid is EnemyHealth) { droid?.OnHit(damage); } }