private void HandleSoundMessage(IMessageProvider provider) { if (m_sfxPlayer) { SoundMessage message = provider.GetMessage <SoundMessage>(); m_sfxPlayer.Play((int)message.sfxId); } }
public static void PlaySound(SfxId sfxId) { SoundMessage soundMessage = GameContext.messageDispatcher.AddMessage <SoundMessage>(); soundMessage.sfxId = sfxId; }