private void Start() { man = tempo.GetComponent <TempoManager>(); tapSound = SoundUtils.MakeSource(tapSound, gameObject.AddComponent <AudioSource>()); informer = TempoStartInformer.GetInstance(); textShower = GetComponent <FlyingTextShower>(); }
private void PlayMusic() { // do calculations and set everything up double bpm = TempoUtils.FlipBpmInterval(secsPerBeat); MusicClip clip = GetClip(bpm); currentSong.clip = clip.clip; currentSong.pitch = (float)TempoUtils.GetPitchModifierFromBpm(bpm, clip.bpm); currentSong = SoundUtils.MakeSource(currentSong, GetAudioSource()); currentSong.source.PlayDelayed((float)(AudioSettings.dspTime - (manager.GetCurrentBeatTime() + secsPerBeat))); }