addMusic
This commit is contained in:
parent
79d26896c7
commit
b62fcb760f
7 changed files with 21 additions and 4 deletions
|
@ -62,6 +62,12 @@
|
|||
/processorParam:Quality=Best
|
||||
/build:sounds/Background menu music.wav
|
||||
|
||||
#begin sounds/Background music.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/Background music.wav
|
||||
|
||||
#begin sounds/Button click.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
|
|
BIN
ZoFo/Content/sounds/Background music.wav
Normal file
BIN
ZoFo/Content/sounds/Background music.wav
Normal file
Binary file not shown.
|
@ -25,6 +25,7 @@ public class HUD : AbstractGUI
|
|||
Elements.Add(pauseButton);
|
||||
pauseButton.LeftButtonPressed += () =>
|
||||
{
|
||||
AppManager.Instance.SoundManager.StartAmbientSound("Button click");
|
||||
AppManager.Instance.SetGUI(new PauseGUI());
|
||||
};
|
||||
}
|
||||
|
|
|
@ -46,7 +46,9 @@ public class PauseGUI : AbstractGUI
|
|||
};
|
||||
exitButton.LeftButtonPressed += () =>
|
||||
{
|
||||
AppManager.Instance.SoundManager.StopAllSounds();
|
||||
AppManager.Instance.SoundManager.StartAmbientSound("Button click");
|
||||
AppManager.Instance.SoundManager.StartAmbientSound("Background menu music");
|
||||
AppManager.Instance.SetGUI(new MainMenuGUI());
|
||||
};
|
||||
Elements.Add(exitButton);
|
||||
|
|
|
@ -38,6 +38,8 @@ public class SelectModeMenu : AbstractGUI
|
|||
};
|
||||
singleButton.LeftButtonPressed += () =>
|
||||
{
|
||||
AppManager.Instance.SoundManager.StopAllSounds();
|
||||
AppManager.Instance.SoundManager.StartAmbientSound("Background music");
|
||||
AppManager.Instance.SoundManager.StartAmbientSound("Button click");
|
||||
// single
|
||||
Server server = new Server();
|
||||
|
@ -82,7 +84,9 @@ public class SelectModeMenu : AbstractGUI
|
|||
Elements.Add(bTExit);
|
||||
bTExit.LeftButtonPressed += () =>
|
||||
{
|
||||
|
||||
AppManager.Instance.SoundManager.StartAmbientSound("Button click");
|
||||
|
||||
AppManager.Instance.SetGUI(new MainMenuGUI());
|
||||
};
|
||||
}
|
||||
|
|
|
@ -63,12 +63,14 @@ namespace ZoFo.GameCore.GameManagers
|
|||
ItemManager = new ItemManager.ItemManager();
|
||||
Instance = this;
|
||||
InputManager = new InputManager();
|
||||
SoundManager = new SoundManager();
|
||||
SoundManager.LoadSounds();
|
||||
SettingsManager = new SettingsManager();
|
||||
SettingsManager.LoadSettings();
|
||||
SoundManager = new SoundManager();
|
||||
|
||||
AssetManager = new AssetManager();
|
||||
SoundManager.LoadSounds();
|
||||
|
||||
|
||||
SoundManager.StartAmbientSound("Background menu music");
|
||||
|
||||
currentGUI = new MainMenuGUI();
|
||||
debugHud = new DebugHUD();
|
||||
|
|
|
@ -28,18 +28,20 @@ namespace ZoFo.GameCore.GameManagers
|
|||
public void SetMainVolume(float volume)
|
||||
{
|
||||
settingsContainer.MainVolume = volume;
|
||||
//AppManager.Instance.SoundManager.Update();
|
||||
AppManager.Instance.SoundManager.Update();
|
||||
SaveSettings();
|
||||
}
|
||||
public void SetMusicVolume(float volume)
|
||||
{
|
||||
settingsContainer.MusicVolume = volume;
|
||||
//AppManager.Instance.SoundManager.Update();
|
||||
SaveSettings();
|
||||
|
||||
}
|
||||
public void SetSoundEffectsVolume(float volume)
|
||||
{
|
||||
settingsContainer.SoundEffectsVolume = volume;
|
||||
// AppManager.Instance.SoundManager.Update();
|
||||
SaveSettings();
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue