F3: Toggle drawing bounding boxes
This commit is contained in:
@@ -47,6 +47,10 @@ void Systems::InputSystem::Update(double dt)
|
||||
if (m_CurrentKeyState[GLFW_KEY_F2] && !m_LastKeyState[GLFW_KEY_F2]) {
|
||||
m_Renderer->DrawNormals(!m_Renderer->DrawNormals());
|
||||
}
|
||||
// Bounds
|
||||
if (m_CurrentKeyState[GLFW_KEY_F3] && !m_LastKeyState[GLFW_KEY_F3]) {
|
||||
m_Renderer->DrawBounds(!m_Renderer->DrawBounds());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,9 @@ void Systems::SoundSystem::UpdateEntity(double dt, EntityID entity, EntityID par
|
||||
|
||||
void Systems::SoundSystem::PlaySound(std::shared_ptr<Components::SoundEmitter> emitter, std::string fileName)
|
||||
{
|
||||
if (m_Sources.find(emitter.get()) == m_Sources.end())
|
||||
return;
|
||||
|
||||
ALuint buffer = LoadFile(fileName);
|
||||
ALuint source = m_Sources[emitter.get()];
|
||||
alSourcei(source, AL_BUFFER, buffer);
|
||||
|
||||
Reference in New Issue
Block a user