diff --git a/ZoFo/Content/Content.mgcb b/ZoFo/Content/Content.mgcb index ea0d2f4..c966a97 100644 --- a/ZoFo/Content/Content.mgcb +++ b/ZoFo/Content/Content.mgcb @@ -73,12 +73,6 @@ /processorParam:Quality=Best /build:sounds/Tabletki 2.wav -#begin sounds/Tabletki.mp3 -/importer:Mp3Importer -/processor:SongProcessor -/processorParam:Quality=Best -/build:sounds/Tabletki.mp3 - #begin sounds/Zombi napal.wav /importer:WavImporter /processor:SoundEffectProcessor @@ -91,18 +85,6 @@ /processorParam:Quality=Best /build:sounds/Zombi stoit.wav -#begin Textures/AnimationTextures/Character/hr-level1_idle_gun.png -/importer:TextureImporter -/processor:TextureProcessor -/processorParam:ColorKeyColor=255,0,255,255 -/processorParam:ColorKeyEnabled=True -/processorParam:GenerateMipmaps=False -/processorParam:PremultiplyAlpha=True -/processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False -/processorParam:TextureFormat=Color -/build:Textures/AnimationTextures/Character/hr-level1_idle_gun.png - #begin Textures/AnimationTextures/Character/hr-level1_idle.png /importer:TextureImporter /processor:TextureProcessor @@ -115,6 +97,18 @@ /processorParam:TextureFormat=Color /build:Textures/AnimationTextures/Character/hr-level1_idle.png +#begin Textures/AnimationTextures/Character/hr-level1_idle_gun.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:Textures/AnimationTextures/Character/hr-level1_idle_gun.png + #begin Textures/AnimationTextures/Character/hr-level1_mining_tool-1.png /importer:TextureImporter /processor:TextureProcessor @@ -139,18 +133,6 @@ /processorParam:TextureFormat=Color /build:Textures/AnimationTextures/Character/hr-level1_mining_tool-2.png -#begin Textures/AnimationTextures/Character/hr-level1_running_gun.png -/importer:TextureImporter -/processor:TextureProcessor -/processorParam:ColorKeyColor=255,0,255,255 -/processorParam:ColorKeyEnabled=True -/processorParam:GenerateMipmaps=False -/processorParam:PremultiplyAlpha=True -/processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False -/processorParam:TextureFormat=Color -/build:Textures/AnimationTextures/Character/hr-level1_running_gun.png - #begin Textures/AnimationTextures/Character/hr-level1_running.png /importer:TextureImporter /processor:TextureProcessor @@ -163,6 +145,18 @@ /processorParam:TextureFormat=Color /build:Textures/AnimationTextures/Character/hr-level1_running.png +#begin Textures/AnimationTextures/Character/hr-level1_running_gun.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:Textures/AnimationTextures/Character/hr-level1_running_gun.png + #begin Textures/AnimationTextures/unicorn.png /importer:TextureImporter /processor:TextureProcessor diff --git a/ZoFo/Content/sounds/Tabletki.mp3 b/ZoFo/Content/sounds/Tabletki.mp3 deleted file mode 100644 index 1a44967..0000000 Binary files a/ZoFo/Content/sounds/Tabletki.mp3 and /dev/null differ diff --git a/ZoFo/GameCore/GUI/MainMenuGUI.cs b/ZoFo/GameCore/GUI/MainMenuGUI.cs index e0d0c15..5d258eb 100644 --- a/ZoFo/GameCore/GUI/MainMenuGUI.cs +++ b/ZoFo/GameCore/GUI/MainMenuGUI.cs @@ -40,6 +40,7 @@ public class MainMenuGUI : AbstractGUI }; playButton.LeftButtonPressed += () => { + AppManager.Instance.SoundManager.StartAmbientSound("Loot"); AppManager.Instance.SetGUI(new SelectModeMenu()); }; Elements.Add(playButton); @@ -54,6 +55,7 @@ public class MainMenuGUI : AbstractGUI }; optionButton.LeftButtonPressed += () => { + AppManager.Instance.SoundManager.StartAmbientSound("Loot"); AppManager.Instance.SetGUI(new OptionsGUI()); }; Elements.Add(optionButton); diff --git a/ZoFo/GameCore/GameManagers/SoundManager.cs b/ZoFo/GameCore/GameManagers/SoundManager.cs index 0494dae..7e8d408 100644 --- a/ZoFo/GameCore/GameManagers/SoundManager.cs +++ b/ZoFo/GameCore/GameManagers/SoundManager.cs @@ -6,7 +6,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using System.Linq; -using DangerousD.GameCore.Graphics; + using Newtonsoft.Json; using Microsoft.Xna.Framework.Media; @@ -20,23 +20,28 @@ namespace ZoFo.GameCore.GameManagers public void LoadSounds() // метод для загрузки звуков из папки { - var k = Directory.GetFiles("../../..//Content//sounds").Where(x => x.EndsWith("wav")); - + //List sounds = AppManager.Instance.Content.Load>("sounds/"); + + var k = Directory.GetFiles(Directory.GetCurrentDirectory() + "//Content//sounds").Where(x => x.EndsWith("xnb")); if (k.Count() > 0) { - string[] soundFiles = k.Select(x => x.Split("\\").Last().Split("/").Last().Replace(".wav", "")).ToArray();// папка со звуками там где exe + string[] soundFiles = k.Select(x => x.Split("\\").Last().Split("/").Last().Replace(".xnb", "")).ToArray();// папка со звуками там где exe foreach (var soundFile in soundFiles) { Sounds.Add(soundFile, AppManager.Instance.Content.Load("sounds//" + soundFile)); } } - - if (k.Count() > 0) + /*/if (sounds.Count() > 0) { + foreach (var soundFile in sounds) + { + Sounds.Add(soundFile, AppManager.Instance.Content.Load("sounds/" + soundFile)); + } + }/*/ + - } } public void StartAmbientSound(string soundName) // запустить звук у которого нет позиции diff --git a/ZoFo/ZoFo.csproj b/ZoFo/ZoFo.csproj index c3a2b36..b4a9088 100644 --- a/ZoFo/ZoFo.csproj +++ b/ZoFo/ZoFo.csproj @@ -11,8 +11,11 @@ Icon.ico + + + @@ -32,7 +35,6 @@ -