public void update(float delta) {
        for(GUI gui:guiLayer){
            gui.update();
        }

        if(!removeGuiLayer.isEmpty()){
            guiLayer.removeAll(removeGuiLayer);
            removeGuiLayer.clear();
        }

        if(!addGuiLayer.isEmpty()){
            guiLayer.addAll(addGuiLayer);
            addGuiLayer.clear();
        }

        root.updateAll();
    }