diff --git a/isometric-park-fna/Engines/InputEngine.cs b/isometric-park-fna/Engines/InputEngine.cs --- a/isometric-park-fna/Engines/InputEngine.cs +++ b/isometric-park-fna/Engines/InputEngine.cs @@ -46,12 +46,14 @@ private int height; private int width; + private SoundEffect sound; private SoundEffect startSound; private SoundEffect endSound; public InputEngine(int menuBarHeight, Camera camera, GraphicsDeviceManager gdm, int height, int width, - SoundEffect startSound, SoundEffect endSound) { + SoundEffect sound, SoundEffect startSound, + SoundEffect endSound) { //initialize to blank for now this.keyboardPrev = new KeyboardState(); this.menuBarHeight = menuBarHeight; @@ -60,6 +62,8 @@ this.graphicsDevice = gdm.GraphicsDevice; this.height = height; this.width = width; + + this.sound = sound; this.startSound = startSound; this.endSound = endSound; } @@ -275,6 +279,7 @@ if (isPlaying && !io.WantCaptureMouse) { if (mouseCur.RightButton == ButtonState.Pressed && mousePrev.RightButton == ButtonState.Released) { + this.sound.Play(1.0f, 0.0f, 0.0f); SendMessage(new JumpCameraMessage {Movement = original_point}); } diff --git a/isometric-park-fna/FNAGame.cs b/isometric-park-fna/FNAGame.cs --- a/isometric-park-fna/FNAGame.cs +++ b/isometric-park-fna/FNAGame.cs @@ -46,6 +46,7 @@ private SpriteBatch tileBatch; // #if DEBUG private SoundEffect sound; + private SoundEffect clickSound; private SoundEffect clickStartSound; private SoundEffect clickEndSound; // #endif @@ -197,7 +198,7 @@ // #if DEBUG this.sound = Content.Load("FNASound"); - // this.clickSound = Content.Load("Click"); + this.clickSound = Content.Load("Click"); this.clickStartSound = Content.Load("ClickPart1"); this.clickEndSound = Content.Load("ClickPart2"); // #endif @@ -272,7 +273,7 @@ WorldBuilder.AddEngine(new InputEngine(Menu.MENU_BAR_HEIGHT, this.camera, gdm, this.simulation.map.MapHeight, this.simulation.map.MapWidth, - this.clickStartSound, this.clickEndSound)); + this.clickSound, this.clickStartSound, this.clickEndSound)); WorldBuilder.AddEngine(new UIEngine(this.Story)); WorldBuilder.AddEngine(new DialogEngine(this.Story, this.grammar)); @@ -432,6 +433,7 @@ batch.Dispose(); // #if DEBUG sound.Dispose(); + clickSound.Dispose(); clickStartSound.Dispose(); clickEndSound.Dispose(); // #endif