diff options
| author | aldrikboy <aldrikboy@gmail.com> | 2018-01-13 16:37:23 +0100 |
|---|---|---|
| committer | aldrikboy <aldrikboy@gmail.com> | 2018-01-13 16:37:23 +0100 |
| commit | 8a4eb6a05b95290cc1d8f26b8c285d391f37fe4e (patch) | |
| tree | 27444f301d8645eeb02b0b7a22b72090bb98159f /Penguloon/SoundManager.cs | |
| parent | d26927ed5be011c8200e31e2c6f92394c279647d (diff) | |
game over sound
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"); |
