public void toggleDeleteButtons() { if (deleteButtonsMove) { return; } index = -1; moveDeleteButtons(); deleteButtonsMove = true; for (int i = 0; i < changeNameButtons.Count; i++) { if (!changeNameButtons [i].interactable) { changeNameButtons [i].gameObject.SetActive(true); changeNameButtons [i].interactable = true; } else { changeNameButtons [i].gameObject.SetActive(false); changeNameButtons [i].interactable = false; } } if (!deleteButtonsShow) { addPlayerButton.disableButton(); } else { addPlayerButton.enableButton(); } }
public void switchPlayButton() { for (int i = 0; i < layout.buttons.Count; i++) { if (layout.buttons [i].GetComponent <PS_PlayerButton> ().isSelected) { playButton.enableButton(); return; } } playButton.disableButton(); }