
#include "Input.h"
#include <Windows.h>


Input::Input(Type type)
	: m_key(static_cast<int>(type))
	, m_wasPressed(false)
	, m_isPressed(false)
{
}


void Input::Poll(void)
{
	m_isPressed = ((::GetAsyncKeyState(m_key) & 0x8000) != 0);
}


void Input::Next(void)
{
	m_wasPressed = m_isPressed;
}
