Input system complete (untested)

This commit is contained in:
2014-03-07 02:53:52 +01:00
parent b1f0bc7cce
commit 95a36794e3
6 changed files with 53 additions and 13 deletions
+9
View File
@@ -1,6 +1,8 @@
#ifndef InputSystem_h__
#define InputSystem_h__
#include <array>
#include "System.h"
#include "Renderer.h"
#include "Components/Input.h"
@@ -14,10 +16,17 @@ public:
InputSystem(World* world, Renderer* renderer)
: System(world), m_Renderer(renderer) { }
void Update(double dt) override;
void Update(double dt, EntityID entity, EntityID parent) override;
private:
Renderer* m_Renderer;
std::array<int, GLFW_KEY_LAST> m_CurrentKeyState;
std::array<int, GLFW_KEY_LAST> m_LastKeyState;
std::array<int, GLFW_MOUSE_BUTTON_LAST> m_CurrentMouseState;
std::array<int, GLFW_MOUSE_BUTTON_LAST> m_LastMouseState;
float m_CurrentMouseDeltaX, m_CurrentMouseDeltaY;
float m_LastMouseX, m_LastMouseY;
};