Every game has information that the player needs to know, and LibGDX tackles this with an API called Scene2D to help us develop and manage the UI with easy, clean, and powerful implementations.
The preceding image is an example of the UI for our game. It's displaying the Score (top left), a Health bar, an Oxigen bar, and an Energy bar (bottom middle), and a pause button (top right).
Scene2D is LibGDX's scene graph; its basically, a scene where actors play. It consists of scenes that contain nods and can contain them on various layers. The benefit of using this approach is based on performance, productivity, portability, and scalability