public SoundSystem.CueWrapper PlayCue(string sCueName, IEntity xEntity, bool bIsVoice) { if (!this.bSystemActive) { return null; } if (bIsVoice && this.lxVoiceEntities.ContainsKey(xEntity) && this.lxVoiceEntities[xEntity].sName == sCueName) { return null; } SoundSystem.CueWrapper xCueToAdd = new SoundSystem.PositionedAmbientCueWrapper(this.effectSoundBank.GetCue(sCueName), sCueName, this.xAudioListener, xEntity.xTransform); this.lxCueWrappers.Add(xCueToAdd); this.lxCuesInLevel.Add(xCueToAdd); xCueToAdd.Play(); if (bIsVoice) { if (this.lxVoiceEntities.ContainsKey(xEntity)) { this.lxVoiceEntities[xEntity].Stop(); } this.lxVoiceEntities[xEntity] = xCueToAdd; this.dxxReverseVoiceEntities[xCueToAdd] = xEntity; } return xCueToAdd; }
public SoundSystem.CueWrapper PlayCue(string sCueName, TransformComponent xTransform) { if (!this.bSystemActive) { return null; } SoundSystem.CueWrapper xCue = new SoundSystem.PositionedAmbientCueWrapper(this.effectSoundBank.GetCue(sCueName), sCueName, this.xAudioListener, xTransform); this.lxCueWrappers.Add(xCue); this.lxCuesInLevel.Add(xCue); xCue.Play(); return xCue; }