// Use this for initialization
 void Start()
 {
     this.speed      = 20;
     audi            = gameObject.GetComponent <AudioSource>();
     soundController = GameObject.Find("SoundController");
     sound           = soundController.GetComponent <MainSoundController>();
     //  sound.someMethod(Instrument());
 }
Esempio n. 2
0
 void Start()
 {
     if (instance != null)
     {
         Destroy(gameObject);
         Debug.Log("One Music Destroyed");
         return;
     }
     instance = this;
     DontDestroyOnLoad(gameObject);
     muteSound();
 }
Esempio n. 3
0
 void Start()
 {
     if (instance != null)
     {
         Destroy(gameObject);
         Debug.Log("One Music Destroyed");
         return;
     }
     instance = this;
     DontDestroyOnLoad(gameObject);
     checkSound();
     Screen.sleepTimeout = SleepTimeout.NeverSleep;
 }