Subarashii... Subarashiiiii ~

This commit is contained in:
Stiffly
2015-10-19 14:59:05 +02:00
parent f2dab5bd1b
commit cda75de366
11 changed files with 20 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -76,7 +76,7 @@ protected:
e.FrameName = m_Name;
EventBroker->Publish(e);
Events::PlaySound soundEvent;
soundEvent.FilePath = "Sounds/GUI/hover.wav";
soundEvent.FilePath = "Sounds/GUI/hover-n.wav";
EventBroker->Publish(soundEvent);
} else if (!isOver && m_MouseIsOver) { // Leave
+1 -1
View File
@@ -82,7 +82,7 @@ private:
}
else {
Events::PlaySound e;
e.FilePath = "Sounds/GUI/click.wav";
e.FilePath = "Sounds/GUI/click-n.wav";
EventBroker->Publish(e);
}
+4
View File
@@ -38,6 +38,10 @@ public:
void Update(double dt) override;
private:
const std::string MENU_BGM = "Sounds/BGM/eastern-music.wav";
const std::string GAME_BGM = "Sounds/BGM/under-the-sea-n.wav";
const std::string WATER_BGM = "Sounds/BGM/water-flowing.wav";
float m_BGMMasterVolume = 1.f;
float m_SFXMasterVolume = 1.f;
std::map<ALuint, Sound*> m_BGMSourcesToBuffers;
+14 -2
View File
@@ -43,6 +43,13 @@ void dd::Systems::SoundSystem::Initialize()
m_SFXMasterVolume = ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<float>("Audio.SFXVolume", 1.f);
m_BGMMasterVolume = ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<float>("Audio.BGMVolume", 1.f);
//TODO: Move this
Events::PlaySound e;
e.FilePath = MENU_BGM;
e.IsAmbient = true;
e.Gain = 0.2f;
EventBroker->Publish(e);
}
void dd::Systems::SoundSystem::Update(double dt)
@@ -180,15 +187,20 @@ bool dd::Systems::SoundSystem::OnContact(const dd::Events::Contact &event)
bool dd::Systems::SoundSystem::OnGameStart(const dd::Events::GameStart &event)
{
{
dd::Events::StopSound e;
e.FilePath = MENU_BGM;
EventBroker->Publish(e);
}
{
dd::Events::PlaySound e;
e.FilePath = "Sounds/BGM/under-the-sea-instrumental.wav";
e.FilePath = GAME_BGM;
e.IsAmbient = true;
EventBroker->Publish(e);
}
{
dd::Events::PlaySound e;
e.FilePath = "Sounds/BGM/water-flowing.wav";
e.FilePath = WATER_BGM;
e.Gain = 0.3f;
e.IsAmbient = true;
EventBroker->Publish(e);