use of org.terasology.engine.core.subsystem.EngineSubsystem in project Terasology by MovingBlocks.
the class TerasologyEngine method preInitSubsystems.
/**
* Gives a chance to subsystems to do something BEFORE managers and Time are initialized.
*/
private void preInitSubsystems() {
changeStatus(TerasologyEngineStatus.PREPARING_SUBSYSTEMS);
for (EngineSubsystem subsystem : getSubsystems()) {
changeStatus(() -> "Pre-initialising " + subsystem.getName() + " subsystem");
subsystem.preInitialise(rootContext);
}
}
use of org.terasology.engine.core.subsystem.EngineSubsystem in project Terasology by MovingBlocks.
the class TerasologyEngine method initSubsystems.
private void initSubsystems() {
changeStatus(TerasologyEngineStatus.INITIALIZING_SUBSYSTEMS);
for (EngineSubsystem subsystem : getSubsystems()) {
changeStatus(() -> "Initialising " + subsystem.getName() + " subsystem");
subsystem.initialise(this, rootContext);
}
}
use of org.terasology.engine.core.subsystem.EngineSubsystem in project Terasology by MovingBlocks.
the class RegisterSystems method step.
@Override
public boolean step() {
componentSystemManager = context.get(ComponentSystemManager.class);
ModuleManager moduleManager = context.get(ModuleManager.class);
TerasologyEngine terasologyEngine = (TerasologyEngine) context.get(GameEngine.class);
for (EngineSubsystem subsystem : terasologyEngine.getSubsystems()) {
subsystem.registerSystems(componentSystemManager);
}
componentSystemManager.loadSystems(moduleManager.getEnvironment(), netMode);
return true;
}
Aggregations