private void OnTriggerEnter2D(Collider2D other) { if (other.tag.Equals("Enemy")) { enemyPath = other.GetComponent <EnemyPath>(); enemyPath.ChaseNoisemaker(gameObject); } }