From 264d3ee3136fc5f8370ff04afe7b62bbef0bcce7 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 7 Nov 2019 14:50:10 +0100 Subject: [PATCH] add a soundeffectinstance replay method --- MLEM/Extensions/SoundExtensions.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 MLEM/Extensions/SoundExtensions.cs diff --git a/MLEM/Extensions/SoundExtensions.cs b/MLEM/Extensions/SoundExtensions.cs new file mode 100644 index 0000000..fcd7be8 --- /dev/null +++ b/MLEM/Extensions/SoundExtensions.cs @@ -0,0 +1,12 @@ +using Microsoft.Xna.Framework.Audio; + +namespace MLEM.Extensions { + public static class SoundExtensions { + + public static void Replay(this SoundEffectInstance sound) { + sound.Stop(); + sound.Play(); + } + + } +} \ No newline at end of file