public static SoundHandle PlayMusic() { StopMusic(); autoPlayNext = true; musicHandle = SoundSystem.Play(MusicListAudioEvent, onChangeState: OnMusicChangeState); var soundSource = SoundSystem.GetSource(musicHandle); Instance.PostMessage(Instance, ESustemMessage.MusicManagerChangeMusic, soundSource.EventName, soundSource.ClipName); return(musicHandle); }
public static bool IsExist(SoundHandle handle) { if (handle.Identifier == 0) { return(false); } var source = AllSources[handle.Identifier - 1]; if (source.Handle == handle) { return(true); } return(false); }
public static SoundSource GetSource(SoundHandle handle) { if (handle.Identifier == 0) { return(null); } var source = AllSources[handle.Identifier - 1]; if (source.Handle == handle) { return(source); } return(null); }