mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 23:11:12 -08:00
Cleanup, optimization
This commit is contained in:
parent
3101fc8056
commit
135b87fdb2
20 changed files with 138 additions and 154 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue