Fixed WasKeyPressed and WasKeyReleased

This commit is contained in:
Simon Lübeß
2021-07-19 20:07:30 +02:00
parent b1ad7b5ba3
commit 9b418521af
@@ -51,13 +51,13 @@ namespace GlitchyEngine
// //
public override static bool WasKeyPressed(Key keycode) public override static bool WasKeyPressed(Key keycode)
{ {
int8 state = CurrentState.KeyStates[(int)keycode]; int8 state = LastState.KeyStates[(int)keycode];
return state < 0; return state < 0;
} }
public override static bool WasKeyReleased(Key keycode) public override static bool WasKeyReleased(Key keycode)
{ {
int8 state = CurrentState.KeyStates[(int)keycode]; int8 state = LastState.KeyStates[(int)keycode];
return state >= 0; return state >= 0;
} }