Timeline for How to toggle something using key releases
Current License: CC BY-SA 3.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 8, 2013 at 13:46 | comment | added | Kikaimaru | You should probably store last state of keyboard (from previous frame), and current state of keyboard and then compare. You are probably doing that with this piece of code, but its more complex than it has to be it should be something like if (lastState.isKeyDown(key) && currentState.isKeyUp(key)) | |
Feb 8, 2013 at 6:13 | history | edited | Kwauhn | CC BY-SA 3.0 |
added 2 characters in body
|
Feb 8, 2013 at 4:42 | history | answered | Kwauhn | CC BY-SA 3.0 |