public void RegisterToggle(NewToggle toggle) { if (!m_toggles.Contains(toggle)) { m_toggles.Add(toggle); } }
public void UnregisterToggle(NewToggle toggle) { if (m_toggles.Contains(toggle)) { m_toggles.Remove(toggle); } }
private void ValidateToggles(NewToggle t) { if (t == null || !m_toggles.Contains(t)) { throw new ArgumentException(string.Format("{0} is not the part of toggleGroup{1}", new object[] { t, this })); } }
public void NotifyToggleOn(NewToggle toggle) { ValidateToggles(toggle); for (int i = 0; i < m_toggles.Count; i++) { if (m_toggles[i] == toggle) { continue; } m_toggles[i].isOn = false; } }