diff options
Diffstat (limited to 'Penguloon/SoundManager.cs')
| -rw-r--r-- | Penguloon/SoundManager.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Penguloon/SoundManager.cs b/Penguloon/SoundManager.cs index b50e04b..92ba973 100644 --- a/Penguloon/SoundManager.cs +++ b/Penguloon/SoundManager.cs @@ -9,6 +9,7 @@ namespace Penguloon public static SoundEffectInstance BtnClick2 { get; set; } public static SoundEffectInstance BtnClick3 { get; set; } public static SoundEffectInstance PlaceObject { get; set; } + public static SoundEffectInstance GameOver { get; set; } public static void StartBaseline() { @@ -71,6 +72,19 @@ namespace Penguloon PlaceObject.Play(); } + public static void PlayGameOverSound() + { + if (GameOver == null) + { + SoundEffect effect = ContentManager.GetSound("Sounds/gameover"); + GameOver = effect.CreateInstance(); + GameOver.Volume = 1f; + GameOver.IsLooped = false; + } + + GameOver.Play(); + } + public static void PlayBalloonPopSound() { SoundEffect popEffect = ContentManager.GetSound("Sounds/pop"); |
