core/src/de/lksbhm/gdx/resources/ResourceConsumerManager.java
/**
	 * Returns a {@link ResourceConsumer} with the given class. If the manager
	 * has not managed an instance of the required type yet, a new instance will
	 * be created using the consumer's mandatory default constructor.
	 * 
	 * @param consumer
	 * @param actuallyLoadResources
	 * @param state
	 * @return
	 */
Returns a  ResourceConsumer with the given class. If the manager
has not managed an instance of the required type yet, a new instance will
be created using the consumer's mandatory default constructor.


Returns a ResourceConsumer with the given class . If the manager has not managed an instance of the required type yet a new instance will be created using the consumer ' s mandatory default constructor .
public <T extends ResourceConsumer> void obtainConsumerInstanceAndLoadResources(
			Class<T> consumer,
			final ResourceConsumerObtainedCallback<T> callback) {
		@SuppressWarnings("unchecked")
		final T instance = (T) lruCache.access(consumer);
		if (instance == null) {
			releaseMemoryIfNecessary();
			final T newInstance = instantiateConsumer(consumer);
			final AssetManager manager = game.getAssetManager();
			newInstance.requestResources(manager);
			if (newInstance.isRequestingLoadingAnimation()) {
				game.animateLoad(
						new LoadableAssetManager(game.getAssetManager()),
						newInstance.getClass(), new Runnable() {
							@Override
							public void run() {
								newInstance.onResourcesLoaded(manager);
								callback.onObtained(newInstance);
							}
						});
			} else {
				manager.finishLoading();
				newInstance.onResourcesLoaded(manager);
				callback.onObtained(newInstance);
			}
		} else {
			callback.onObtained(instance);
		}
	}
public < T extends ResourceConsumer > void obtainConsumerInstanceAndLoadResources ( Class < T > consumer , final ResourceConsumerObtainedCallback < T > callback ) { @ SuppressWarnings ( "unchecked" ) final T instance = ( T ) lruCache . access ( consumer ) ; if ( instance == null ) { releaseMemoryIfNecessary ( ) ; final T newInstance = instantiateConsumer ( consumer ) ; final AssetManager manager = game . getAssetManager ( ) ; newInstance . requestResources ( manager ) ; if ( newInstance . isRequestingLoadingAnimation ( ) ) { game . animateLoad ( new LoadableAssetManager ( game . getAssetManager ( ) ) , newInstance . getClass ( ) , new Runnable ( ) { @ Override public void run ( ) { newInstance . onResourcesLoaded ( manager ) ; callback . onObtained ( newInstance ) ; } } ) ; } else { manager . finishLoading ( ) ; newInstance . onResourcesLoaded ( manager ) ; callback . onObtained ( newInstance ) ; } } else { callback . onObtained ( instance ) ; } }
Returns a {@link ResourceConsumer} with the given class.
Returns a { @link ResourceConsumer } with the given class .