You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
613 B
33 lines
613 B
package mightypork.gamecore.resources;
|
|
|
|
|
|
import mightypork.utils.eventbus.BusEvent;
|
|
import mightypork.utils.eventbus.events.flags.SingleReceiverEvent;
|
|
|
|
|
|
/**
|
|
* Request to load a deferred resource.
|
|
*
|
|
* @author Ondřej Hruška (MightyPork)
|
|
*/
|
|
@SingleReceiverEvent
|
|
public class ResourceLoadRequest extends BusEvent<ResourceLoader> {
|
|
|
|
private final LazyResource resource;
|
|
|
|
|
|
/**
|
|
* @param resource resource to load
|
|
*/
|
|
public ResourceLoadRequest(LazyResource resource)
|
|
{
|
|
this.resource = resource;
|
|
}
|
|
|
|
|
|
@Override
|
|
public void handleBy(ResourceLoader handler)
|
|
{
|
|
handler.loadResource(resource);
|
|
}
|
|
}
|
|
|