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 @@ -43,7 +43,9 @@ private MouseState mousePrev = new MouseState(); private SpriteBatch batch; +#if DEBUG private SoundEffect sound; +#endif private SpriteFont monoFont; private SpriteFont largeMonoFont; @@ -185,7 +187,9 @@ // Create the batch... batch = new SpriteBatch(GraphicsDevice); +#if DEBUG sound = Content.Load("FNASound"); +#endif Tile.TileSetTexture = Content.Load(@"part4_tileset"); var texture = Content.Load(@"solid_tileset"); @@ -396,7 +400,9 @@ protected override void UnloadContent() { batch.Dispose(); +#if DEBUG sound.Dispose(); +#endif Tile.TileSetTexture.Dispose(); Logging.Success("Disposed of Tile texture."); if (Quad.PixelTexture != null) @@ -485,12 +491,14 @@ #region input // #region misc_keys +#if DEBUG if (keyboardCur.IsKeyDown(Keys.OemBackslash) && keyboardPrev.IsKeyUp(Keys.OemBackslash) && keyboardCur.IsKeyDown(Keys.LeftShift)) { sound.Play(volume, pitch, pan); } +#endif if (keyboardCur.IsKeyDown(Keys.V) && keyboardPrev.IsKeyUp(Keys.V)) { // debugWindow.swap();