コード例 #1
0
 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();
     }
 }
コード例 #2
0
ファイル: Bonuses.cs プロジェクト: CallumD21/HaskellQuest
 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);
         }
     }
 }