Interface SimpleResourceReloadListener<T>

Type Parameters:
T - The data object.
All Superinterfaces:
IdentifiableResourceReloadListener, ResourceReloader

public interface SimpleResourceReloadListener<T> extends IdentifiableResourceReloadListener
A simplified version of the "resource reload listener" interface, hiding the peculiarities of the API.

In essence, there are two stages:

  • load: create an instance of your data object containing all loaded and processed information,
  • apply: apply the information from the data object to the game instance.

The load stage should be self-contained as it can run on any thread! However, the apply stage is guaranteed to run on the game thread.

For a fully synchronous alternative, consider using SynchronousResourceReloader in conjunction with IdentifiableResourceReloadListener.

  • Method Details