Cache difference of buttons down now and in the past
Closed this issue · 0 comments
GlenDC commented
Right now to check wether or not a button/key has just been pressed, we check wether it's currently down and not yet previously. This is not a huge problem, but it's certainly not the best way. So it is probably better just to compute the difference and cache it, when assigning the fresh list to our state.
A cached list can be added both for keys and buttons, replacing previousButtonsDown and making the IsButtonJustInSet and IsKeyCodeJustInSet redundant.
This will also make the Update Logic a lot simpler...