public void tick() {
        up = keys[KeyEvent.VK_UP];
        down = keys[KeyEvent.VK_DOWN];
        left = keys[KeyEvent.VK_LEFT];
        right = keys[KeyEvent.VK_RIGHT];
        enter = keys[KeyEvent.VK_ENTER] || keys[KeyEvent.VK_E];
        use = keys[KeyEvent.VK_X];
        attack = keys[KeyEvent.VK_C];
        escape = keys[KeyEvent.VK_ESCAPE];
        for(int i = 0; i < keys.length; i++){
            if(clickedBuffer[i] && !clicked[i]){
                clicked[i] = true;
                clickedBuffer[i] = false;
            }else if(clicked[i]){
                clicked[i] = false;
            }
        }
    }