private void Awake() { Intro = gameObject.AddComponent <SongyPart> (); Loop = gameObject.AddComponent <SongyPart> (); Outro = gameObject.AddComponent <SongyPart> (); Loop.ShouldLoop = true; }
void AddClips(string[] clipNames, SongyPart songyPart) { foreach (var name in clipNames) { if (GetClipByName(name) != null) { Debug.LogWarning($"You are trying to add the SongyClip named {name} twice. Dont do that plz. "); continue; } songyPart.AddClip(FolderPath, name); } }
public void StopAndPlayNext(SongyPart nextSongPart) { Stop(); nextSongPart.SchedulePlay(EndsPlayingDspTime); }
public void PlayClipAfter(SongyPart songPart) { var dspTime = songPart.EndsPlayingDspTime; SchedulePlay(dspTime); }