EStartGame up and running. Moved BGM-play from soundsystem init to EGameStart.

This commit is contained in:
Stiffly
2015-09-25 02:43:34 +02:00
parent 0e6fcfb2ba
commit 650c7ec47c
4 changed files with 90 additions and 59 deletions
+1 -26
View File
@@ -36,26 +36,7 @@ void dd::Systems::SoundSystem::Initialize()
EVENT_SUBSCRIBE_MEMBER(m_EMasterVolume, &SoundSystem::OnMasterVolume);
//Todo: Move this
{
dd::Events::PlaySound e;
e.path = "Sounds/BGM/under-the-sea-instrumental.wav";
e.isAmbient = true;
EventBroker->Publish(e);
}
{
dd::Events::PlaySound e;
e.path = "Sounds/BGM/water-flowing.wav";
e.volume = 0.3f;
e.isAmbient = true;
EventBroker->Publish(e);
}
{
dd::Events::MasterVolume e;
e.isAmbient = true;
e.gain = 1.f;
EventBroker->Publish(e);
}
}
void dd::Systems::SoundSystem::Update(double dt)
@@ -182,12 +163,6 @@ bool dd::Systems::SoundSystem::OnContact(const dd::Events::Contact &event)
}
}
{
dd::Events::StopSound e;
e.path = "Sounds/BGM/water-flowing.wav";
EventBroker->Publish(e);
}
//Send play-sound event
dd::Events::PlaySound e;
e.path = collisionSound->filePath;