public void onAction(String name, boolean isPressed, float tpf) {
        if (inputEnabled) {
            if (name.equals("up") && isPressed) {
                up = true;
            }
            if (name.equals("down") && isPressed) {
                down = true;
            }
            if (name.equals("right") && isPressed) {
                right = true;
            }
            if (name.equals("left") && isPressed) {
                left = true;
            }
        }
    }