public void StopAll(AudioAssetType type, bool includeClaimedChannels = false) { foreach(AudioChannel channel in channels) { if(includeClaimedChannels && channel.IsClaimed) { continue; } if(channel.IsPlaying && channel.AudioAsset.Type == type) { channel.Stop(); } } }
public void StopAll(AudioAssetType type, bool includeClaimedChannels = false) { foreach (AudioChannel channel in channels) { if (!includeClaimedChannels && claimedChannels.Contains(channel)) { continue; } if (channel.IsPlaying && channel.AudioAsset.Type == type) { channel.Stop(); } } }