public bool ContainsButton(GameObject button) { bool buttonAvailable = false; if (button != null) { buttonAvailable = AvailableButtonsList.Contains(button); } return(buttonAvailable); }
public void SwitchSelectedButton(GameObject selectedButton) { if (AvailableButtonsList.Count > 0) { if (AvailableButtonsList.Contains(selectedButton)) { int indexToUse = AvailableButtonsList.IndexOf(selectedButton); SwitchSelectedButton(indexToUse); } else { Debug.Log(this + " does not contain " + selectedButton + "."); } } else { Debug.Log("There are not buttons in the list"); } }
public int IndexOfButton(GameObject button) { return(AvailableButtonsList.IndexOf(button)); }