public void OnNotify(BaseGameStateEvent gameEvent) { if (_soundBank.ContainsKey(gameEvent.GetType())) { var sound = _soundBank[gameEvent.GetType()]; sound.Sound.Play(sound.Attributes.Volume, sound.Attributes.Pitch, sound.Attributes.Pan); } }
public void OnNotify(BaseGameStateEvent gameEvent) { if (_soundBank.ContainsKey(gameEvent.GetType())) { var sound = _soundBank[gameEvent.GetType()]; sound.Play(); } }
internal void RegisterSound(BaseGameStateEvent gameEvent, SoundEffect sound, float volume, float pitch, float pan) { _soundBank.Add(gameEvent.GetType(), new SoundBankItem(sound, new SoundAttributes(volume, pitch, pan))); }
public void RegisterSound(BaseGameStateEvent gameEvent, SoundEffect sound) { _soundBank.Add(gameEvent.GetType(), sound); }