summaryrefslogtreecommitdiff
path: root/Penguloon/SoundManager.cs
diff options
context:
space:
mode:
authoraldrikboy <aldrikboy@gmail.com>2018-01-13 16:37:23 +0100
committeraldrikboy <aldrikboy@gmail.com>2018-01-13 16:37:23 +0100
commit8a4eb6a05b95290cc1d8f26b8c285d391f37fe4e (patch)
tree27444f301d8645eeb02b0b7a22b72090bb98159f /Penguloon/SoundManager.cs
parentd26927ed5be011c8200e31e2c6f92394c279647d (diff)
game over sound
Diffstat (limited to 'Penguloon/SoundManager.cs')
-rw-r--r--Penguloon/SoundManager.cs14
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");