diff --git a/Shared/SneakGame.cs b/Shared/SneakGame.cs index 72f6dfd..e10ad51 100644 --- a/Shared/SneakGame.cs +++ b/Shared/SneakGame.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGame.Framework.Utilities; @@ -67,6 +68,10 @@ namespace SemiColinGames { SoundEffects.Load(Content); Textures.Load(Content); linesOfSight = new LinesOfSight(GraphicsDevice); + SoundEffectInstance music = SoundEffects.IntroMusic.CreateInstance(); + music.IsLooped = true; + music.Volume = 0.1f; + music.Play(); LoadLevel(); } diff --git a/Shared/SoundEffects.cs b/Shared/SoundEffects.cs index b6b9645..067a69d 100644 --- a/Shared/SoundEffects.cs +++ b/Shared/SoundEffects.cs @@ -4,9 +4,11 @@ using Microsoft.Xna.Framework.Content; namespace SemiColinGames { public static class SoundEffects { + public static SoundEffect IntroMusic; public static SoundEffect[] SwordSwings = new SoundEffect[4]; public static void Load(ContentManager content) { + IntroMusic = content.Load("music/playonloop/smash_bros_short"); SwordSwings[0] = content.Load("sfx/zapsplat/sword_whoosh_1"); SwordSwings[1] = content.Load("sfx/zapsplat/sword_whoosh_2"); SwordSwings[2] = content.Load("sfx/zapsplat/sword_whoosh_3");