Added Destructor. (improved StopSound and PlayBGM events)

This commit is contained in:
Stiffly
2014-06-04 15:21:05 +02:00
parent f9426745f7
commit 2ef5d49f7e
7 changed files with 64 additions and 29 deletions
+22
View File
@@ -85,6 +85,28 @@ void InputManager::Update(double dt)
EventBroker->Publish(e);
}
if(m_CurrentKeyState[GLFW_KEY_P])
{
Events::StopSound e;
e.Emitter = 1;
EventBroker->Publish(e);
}
if(m_CurrentKeyState[GLFW_KEY_L])
{
Events::PlayBGM e;
e.Resource = "Sounds/BGM/WilliamTellOverture.mp3";
e.Loop = true;
EventBroker->Publish(e);
}
if(m_CurrentKeyState[GLFW_KEY_O])
{
Events::PlayBGM e;
e.Resource = "Sounds/BGM/DiesIrae.mp3";
e.Loop = true;
EventBroker->Publish(e);
}
// // Lock mouse while holding LMB
// if (m_CurrentMouseState[GLFW_MOUSE_BUTTON_LEFT])