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.
40 lines
586 B
40 lines
586 B
package mightypork.gamecore.core.init;
|
|
|
|
|
|
import mightypork.gamecore.core.MainLoop;
|
|
|
|
|
|
/**
|
|
* Task to add a resource loader.<br>
|
|
* By default the async resource loader is used
|
|
*
|
|
* @author Ondřej Hruška (MightyPork)
|
|
*/
|
|
public abstract class InitTaskMainLoop extends InitTask {
|
|
|
|
/** The loader. */
|
|
protected MainLoop loop;
|
|
|
|
|
|
@Override
|
|
public void run()
|
|
{
|
|
loop = getLoopImpl();
|
|
app.setMainLoop(loop);
|
|
}
|
|
|
|
|
|
/**
|
|
* Create a loader impl
|
|
*
|
|
* @return loader
|
|
*/
|
|
protected abstract MainLoop getLoopImpl();
|
|
|
|
|
|
@Override
|
|
public String getName()
|
|
{
|
|
return "main_loop";
|
|
}
|
|
}
|
|
|