Search in sources :

Example 6 with EngineSubsystem

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);
    }
}
Also used : EngineSubsystem(org.terasology.engine.core.subsystem.EngineSubsystem)

Example 7 with EngineSubsystem

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);
    }
}
Also used : EngineSubsystem(org.terasology.engine.core.subsystem.EngineSubsystem)

Example 8 with EngineSubsystem

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;
}
Also used : EngineSubsystem(org.terasology.engine.core.subsystem.EngineSubsystem) GameEngine(org.terasology.engine.core.GameEngine) ModuleManager(org.terasology.engine.core.module.ModuleManager) TerasologyEngine(org.terasology.engine.core.TerasologyEngine) ComponentSystemManager(org.terasology.engine.core.ComponentSystemManager)

Aggregations

EngineSubsystem (org.terasology.engine.core.subsystem.EngineSubsystem)8 ComponentSystemManager (org.terasology.engine.core.ComponentSystemManager)1 GameEngine (org.terasology.engine.core.GameEngine)1 TerasologyEngine (org.terasology.engine.core.TerasologyEngine)1 ModuleManager (org.terasology.engine.core.module.ModuleManager)1 HibernationSubsystem (org.terasology.engine.core.subsystem.common.hibernation.HibernationSubsystem)1 BindsSubsystem (org.terasology.engine.core.subsystem.config.BindsSubsystem)1 HeadlessAudio (org.terasology.engine.core.subsystem.headless.HeadlessAudio)1 HeadlessGraphics (org.terasology.engine.core.subsystem.headless.HeadlessGraphics)1 HeadlessTimer (org.terasology.engine.core.subsystem.headless.HeadlessTimer)1 LwjglAudio (org.terasology.engine.core.subsystem.lwjgl.LwjglAudio)1 LwjglGraphics (org.terasology.engine.core.subsystem.lwjgl.LwjglGraphics)1 LwjglInput (org.terasology.engine.core.subsystem.lwjgl.LwjglInput)1 LwjglTimer (org.terasology.engine.core.subsystem.lwjgl.LwjglTimer)1 OpenVRInput (org.terasology.engine.core.subsystem.openvr.OpenVRInput)1 PojoPrefab (org.terasology.engine.entitySystem.prefab.internal.PojoPrefab)1 BehaviorTree (org.terasology.engine.logic.behavior.asset.BehaviorTree)1 Activity (org.terasology.engine.monitoring.Activity)1 NetworkSystem (org.terasology.engine.network.NetworkSystem)1 ByteBufferAsset (org.terasology.engine.rendering.gltf.ByteBufferAsset)1