private void Start() { bonus = FindObjectOfType <BonusInfo>(); //Change the playable ship to the correct ship ChangeShip(); Time.timeScale = 1f; //If there is something to load then load it if (PlayerPrefs.GetInt("SI_Load") == 1) { Load(); } }
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); } } }