void OnTriggerEnter(Collider other) { int layerID = (int)Mathf.Pow(2, other.gameObject.layer); if (relevantToValues.Contains(layerID)) { occupied++; masterTrigger.FOO(); } }