mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 15:02:03 -08:00
23 lines
515 B
Java
23 lines
515 B
Java
package mindustry.async;
|
|
|
|
public interface AsyncProcess{
|
|
|
|
/** Sync. Called when the world loads. */
|
|
default void init(){}
|
|
|
|
/** Sync. Called when the world resets. */
|
|
default void reset(){}
|
|
|
|
/** Sync. Called at the beginning of the main loop. */
|
|
default void begin(){}
|
|
|
|
/** Async. Called in a separate thread. */
|
|
default void process(){}
|
|
|
|
/** Sync. Called in the end of the main loop. */
|
|
default void end(){}
|
|
|
|
default boolean shouldProcess(){
|
|
return true;
|
|
}
|
|
}
|