private void updateBand(float z_pos) { int new_band = (int)(-1 * (z_pos / 5)) + 1; if (new_band == stim_pos || new_band == last_band) { return; } else if (new_band < 0) { otherScript.ResetBand(last_band); last_band = -1; //otherScript.HighlightBand(0, last_band); //last_band = 0; } else if (new_band > max_band) { otherScript.ResetBand(last_band); last_band = -1; //otherScript.HighlightBand(max_band, last_band); //last_band = max_band; } else { otherScript.HighlightBand(new_band, last_band); last_band = new_band; //this.GetComponent<Transform>().position = new Vector3(); } }