mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 20:58:34 +01:00
add a soundeffectinstance replay method
This commit is contained in:
parent
55286e9e83
commit
264d3ee313
1 changed files with 12 additions and 0 deletions
12
MLEM/Extensions/SoundExtensions.cs
Normal file
12
MLEM/Extensions/SoundExtensions.cs
Normal file
|
@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue