Пример #1
0
 public void Awake()
 {
     Player    = GameObject.FindGameObjectWithTag("Player");
     _instance = this;
     if (PlayerPrefs.HasKey("MusicOn"))
     {
         if (PlayerPrefs.GetInt("MusicOn") == 1)
         {
             musicCtr.isOn        = true;
             musicSource.enabled  = true;
             musicSource2.enabled = true;
         }
         else
         {
             musicCtr.isOn        = false;
             musicSource.enabled  = false;
             musicSource2.enabled = false;
         }
     }
     else
     {
         musicCtr.isOn        = true;
         musicSource.enabled  = true;
         musicSource2.enabled = true;
     }
 }
Пример #2
0
 void Start()
 {
     ctr = GameObject.FindGameObjectWithTag("Player").transform.GetChild(5).GetComponent <GameCtr>();
     if (SceneManager.GetActiveScene().buildIndex == 25)
     {
         ctr.LoadGame();
     }
 }
Пример #3
0
 void Start()
 {
     ctr = GameObject.FindGameObjectWithTag("Player").transform.GetChild(5).GetComponent <GameCtr>();
     ctr.LoadGame();
 }
Пример #4
0
 private void Awake()
 {
     Instance = this;
 }