Before
if ( other.collider.tag == "Enemy" || other.collider.tag == "Wall" || other.collider.tag == "Bullet" ) { ... }
After
using System.Linq; public static class GenericExtensions { public static bool ContainsAny<T>( this T self, params T[] values ) { return values.Any( c => c.Equals( self ) ); } }
if ( other.collider.tag.ContainsAny( "Enemy", "Wall", "Bullet" ) { ... }