diff options
| -rw-r--r-- | Penguloon/Content/Content.mgcb | 12 | ||||
| -rw-r--r-- | Penguloon/Content/Sounds/click3.wav | bin | 0 -> 94280 bytes | |||
| -rw-r--r-- | Penguloon/Content/Sounds/placeobject.wav | bin | 0 -> 54254 bytes | |||
| -rw-r--r-- | Penguloon/ContentPathManager.cs | 2 | ||||
| -rw-r--r-- | Penguloon/Controls/LevelSelector.cs | 1 | ||||
| -rw-r--r-- | Penguloon/Controls/ObjectSelector.cs | 2 | ||||
| -rw-r--r-- | Penguloon/Levels/LevelBase.cs | 1 | ||||
| -rw-r--r-- | Penguloon/SoundManager.cs | 28 |
8 files changed, 45 insertions, 1 deletions
diff --git a/Penguloon/Content/Content.mgcb b/Penguloon/Content/Content.mgcb index f3ab71e..df948a6 100644 --- a/Penguloon/Content/Content.mgcb +++ b/Penguloon/Content/Content.mgcb @@ -787,3 +787,15 @@ /processorParam:TextureFormat=Color /build:Objects/mortarBase.png +#begin Sounds/placeobject.wav +/importer:WavImporter +/processor:SoundEffectProcessor +/processorParam:Quality=Best +/build:Sounds/placeobject.wav + +#begin Sounds/click3.wav +/importer:WavImporter +/processor:SoundEffectProcessor +/processorParam:Quality=Best +/build:Sounds/click3.wav + diff --git a/Penguloon/Content/Sounds/click3.wav b/Penguloon/Content/Sounds/click3.wav Binary files differnew file mode 100644 index 0000000..f82e406 --- /dev/null +++ b/Penguloon/Content/Sounds/click3.wav diff --git a/Penguloon/Content/Sounds/placeobject.wav b/Penguloon/Content/Sounds/placeobject.wav Binary files differnew file mode 100644 index 0000000..a6a5412 --- /dev/null +++ b/Penguloon/Content/Sounds/placeobject.wav diff --git a/Penguloon/ContentPathManager.cs b/Penguloon/ContentPathManager.cs index 9a29509..78da37f 100644 --- a/Penguloon/ContentPathManager.cs +++ b/Penguloon/ContentPathManager.cs @@ -92,7 +92,9 @@ namespace Penguloon { "Sounds/click", "Sounds/click2", + "Sounds/click3", "Sounds/pop", + "Sounds/placeobject", }; public static List<string> TexturePathsPreLoad { get; set; } = new List<string>() diff --git a/Penguloon/Controls/LevelSelector.cs b/Penguloon/Controls/LevelSelector.cs index 64355d0..de3b080 100644 --- a/Penguloon/Controls/LevelSelector.cs +++ b/Penguloon/Controls/LevelSelector.cs @@ -80,7 +80,6 @@ namespace Penguloon.Controls { selectedMap -= 2; - SoundManager.PlayClickSound2(); return; } diff --git a/Penguloon/Controls/ObjectSelector.cs b/Penguloon/Controls/ObjectSelector.cs index 56dff8a..8a48be4 100644 --- a/Penguloon/Controls/ObjectSelector.cs +++ b/Penguloon/Controls/ObjectSelector.cs @@ -108,11 +108,13 @@ namespace Penguloon.Controls if (SelectedObjectIndex != i) { + SoundManager.PlayClickSound2(); SelectedObjectIndex = i; State = State.Selected; } else { + SoundManager.PlayClickSound2(); SelectedObjectIndex = -1; State = State.Idle; } diff --git a/Penguloon/Levels/LevelBase.cs b/Penguloon/Levels/LevelBase.cs index dc8b5af..eb34dae 100644 --- a/Penguloon/Levels/LevelBase.cs +++ b/Penguloon/Levels/LevelBase.cs @@ -149,6 +149,7 @@ namespace Penguloon.Levels Money -= ParentScene.ObjectSeletor.Objects[ParentScene.ObjectSeletor.SelectedObjectIndex].Item2; MoneySpent += ParentScene.ObjectSeletor.Objects[ParentScene.ObjectSeletor.SelectedObjectIndex].Item2; + SoundManager.PlayPlaceObjectSound(); Map.SpawnObject(ParentScene.ObjectSeletor.Objects[ParentScene.ObjectSeletor.SelectedObjectIndex].Item1.GetType(), new Vector2(posToSpawnX, posToSpawnY)); diff --git a/Penguloon/SoundManager.cs b/Penguloon/SoundManager.cs index e665197..b50e04b 100644 --- a/Penguloon/SoundManager.cs +++ b/Penguloon/SoundManager.cs @@ -7,6 +7,8 @@ namespace Penguloon public static SoundEffectInstance Baseline { get; set; } public static SoundEffectInstance BtnClick { get; set; } public static SoundEffectInstance BtnClick2 { get; set; } + public static SoundEffectInstance BtnClick3 { get; set; } + public static SoundEffectInstance PlaceObject { get; set; } public static void StartBaseline() { @@ -43,6 +45,32 @@ namespace Penguloon BtnClick2.Play(); } + public static void PlayClickSound3() + { + if (BtnClick3 == null) + { + SoundEffect effect = ContentManager.GetSound("Sounds/click3"); + BtnClick3 = effect.CreateInstance(); + BtnClick3.Volume = 1f; + BtnClick3.IsLooped = false; + } + + BtnClick3.Play(); + } + + public static void PlayPlaceObjectSound() + { + if (PlaceObject == null) + { + SoundEffect effect = ContentManager.GetSound("Sounds/placeobject"); + PlaceObject = effect.CreateInstance(); + PlaceObject.Volume = 1f; + PlaceObject.IsLooped = false; + } + + PlaceObject.Play(); + } + public static void PlayBalloonPopSound() { SoundEffect popEffect = ContentManager.GetSound("Sounds/pop"); |
