// InputManager.cpp #include "InputManager.h" #include void InputManager::Update(GLFWwindow* window) { if (!window) { return; } // Update the state of each key for (int key = 0; key <= GLFW_KEY_LAST; ++key) { m_KeyStates[key] = glfwGetKey(window, key) == GLFW_PRESS; } } bool InputManager::IsKeyPressed(KeyCode key) const { int keyInt = static_cast(key); if (keyInt >= 0 && keyInt <= GLFW_KEY_LAST) { return m_KeyStates[keyInt]; } return false; }