Exemple #1
0
 void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
     if (songIndex < 0)
     {
         songIndex = UnityEngine.Random.Range(0, songs.Count);
     }
     Pulse.setBPM(songs[songIndex].GetComponent <Song>().beatsPerMinute);
     Pulse.setOffset(songs[songIndex].GetComponent <Song>().offsetInSeconds);
     Pulse.setNumberOfBeats(songs[songIndex].GetComponent <Song>().totalNumberOfBeats);
 }