We will now learn how to implement a loading screen in the game when we transition between different levels.
Usually, when a level is being loaded in games, we are presented with a loading screen. This is a strategy used in cases where the number of images or initializing data is so high that it takes some amount of time to load them. This strategy gives time for the game to load while simultaneously providing a visual cue to the user that something is happening in the game. In our case, we are going to asynchronously load assets into the game while showing the loading screen:
assetManager provides the functionality ...