need help!!

Hi,
I’m writing a radar script based on tags and I was thinking if I can write it a little bit different. My code looks like this:
void OnTriggerEnter (Collider other)
{
if (other.gameObject.tag == “Enemy”)
{
myTarget = other.gameObject.transform;
audio.Play ();
}
else if (other.gameObject.tag == “EnemyAir”)
{
myTarget = other.gameObject.transform;
audio.Play ();
}
else if(other.gameObject.tag == “EnemyTank”)
{
myTarget = other.gameObject.transform;
audio.Play();
}
}

}
now I don’t like so many else if statements so I was wondering can and how can I write it i one if statement ?

You can use the || (or) keyword

if (other.gameObject.tag == “Enemy” || other.gameObject.tag == “EnemyAir”) {

}

You can chain those as much as you want

if (other.gameObject.tag == “Enemy” || other.gameObject.tag == “EnemyAir” || other.gameObject.tag == “Enemy3”) {

}