Cleanup, optimization

This commit is contained in:
Anuken 2020-05-01 16:35:18 -04:00
parent 3101fc8056
commit 135b87fdb2
20 changed files with 138 additions and 154 deletions

View file

@ -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;
}
}