//When the confirmation panel is being displayed the buttons should not be interactable private void SetButtonsUnclickable() { //Loop through the buttons setting the interactable ones to not interactable for (int i = 0; i < buttons.Length; i++) { if (bonusInfo.GetUnlocked(i)) { buttons[i].interactable = false; } } }
private void Start() { bonusInfo = FindObjectOfType <BonusInfo>(); //Loop throught the buttons for (int i = 0; i < buttons.Length; i++) { //If the ship is unlocked then the button should be interactable //If the ship is locked it shouldnt be interactable buttons[i].interactable = bonusInfo.GetUnlocked(i); //If the ship is unlocked then unlock its button if (bonusInfo.GetUnlocked(i)) { UnlockButton(i); } } }