Added a announcer volume channel.

This commit is contained in:
stiffly
2016-02-24 15:08:39 +01:00
parent cf3d1b5b00
commit 7dbb9e452b
7 changed files with 86 additions and 6 deletions
+2 -4
View File
@@ -36,8 +36,7 @@ bool SoundSystem::OnPlayerSpawned(const Events::PlayerSpawned &e)
{
if (e.PlayerID == -1) { // Local player
m_World->AttachComponent(e.Player.ID, "Listener");
Events::PlaySoundOnEntity go;
go.EmitterID = LocalPlayer.ID;
Events::PlayAnonuncerVoice go;
go.FilePath = "Audio/announcer/" + m_Announcer + "/go.wav";
m_EventBroker->Publish(go);
// TEMP: starts bgm
@@ -92,13 +91,12 @@ bool SoundSystem::OnCaptured(const Events::Captured & e)
{
int homeTeam = (int)m_World->GetComponent(e.CapturePointID, "Team")["Team"];
int team = (int)m_World->GetComponent(LocalPlayer.ID, "Team")["Team"];
Events::PlaySoundOnEntity ev;
Events::PlayAnonuncerVoice ev;
if (team == homeTeam) {
ev.FilePath = "Audio/announcer/" + m_Announcer + "/objective_achieved.wav";
} else {
ev.FilePath = "Audio/announcer/" + m_Announcer + "/objective_failed.wav"; // have not been tested
}
ev.EmitterID = LocalPlayer.ID;
m_EventBroker->Publish(ev);
// Temp for play test.
m_DrumsIsPlaying = false;