public static void StopMusic(this SoundComponent soundComponent) { if (!s_MusicSerialId.HasValue) { return; } soundComponent.StopSound(s_MusicSerialId.Value); }
public static void StopMusic(this SoundComponent soundComponent) { if (!s_MusicSerialId.HasValue) { return; } soundComponent.StopSound(s_MusicSerialId.Value, FadeVolumeDuration); s_MusicSerialId = null; }
/// <summary> /// 停止播放声音。 /// </summary> /// <param name="serialId">要停止播放声音的序列编号。</param> /// <returns>是否停止播放声音成功。</returns> public bool StopSound(int serialId) { return(m_SoundMethods.StopSound(serialId)); }