Cleanup, optimization
This commit is contained in:
@@ -3,17 +3,21 @@ package mindustry.async;
|
||||
public interface AsyncProcess{
|
||||
|
||||
/** Sync. Called when the world loads. */
|
||||
void init();
|
||||
default void init(){}
|
||||
|
||||
/** Sync. Called when the world resets. */
|
||||
void reset();
|
||||
default void reset(){}
|
||||
|
||||
/** Sync. Called at the beginning of the main loop. */
|
||||
void begin();
|
||||
default void begin(){}
|
||||
|
||||
/** Async. Called in a separate thread. */
|
||||
void process();
|
||||
default void process(){}
|
||||
|
||||
/** Sync. Called in the end of the main loop. */
|
||||
void end();
|
||||
default void end(){}
|
||||
|
||||
default boolean shouldProcess(){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user