mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Fixed WasKeyPressed and WasKeyReleased
This commit is contained in:
@@ -51,13 +51,13 @@ namespace GlitchyEngine
|
||||
//
|
||||
public override static bool WasKeyPressed(Key keycode)
|
||||
{
|
||||
int8 state = CurrentState.KeyStates[(int)keycode];
|
||||
int8 state = LastState.KeyStates[(int)keycode];
|
||||
return state < 0;
|
||||
}
|
||||
|
||||
public override static bool WasKeyReleased(Key keycode)
|
||||
{
|
||||
int8 state = CurrentState.KeyStates[(int)keycode];
|
||||
int8 state = LastState.KeyStates[(int)keycode];
|
||||
return state >= 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user