Skip to content

Your Input class is unneeded. #17

Description

@gravypod

I was watching your tutorial and noticed that you created the Input class witch is largely unneeded. You can do the same thing it does more efficiently with

while (Keyboard.next()) {
    char key = Keyboard.getEventCharacter();
    boolean state = Keyboard.getEventKeyState(); // If the key is held down (true) or released (false)
   // TODO: Handle key clicks
}

Another thing to look into is using

int NUM_KEYCODES = Keyboard.getKeyCount();

instead of the current constant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions