Search in sources :

Example 1 with ConsoleSystem

use of org.terasology.engine.logic.console.ConsoleSystem in project Terasology by MovingBlocks.

the class AbstractState method initEntityAndComponentManagers.

protected void initEntityAndComponentManagers(boolean isHeadless) {
    verifyNotNull(context);
    CoreRegistry.setContext(context);
    // let's get the entity event system running
    EntitySystemSetupUtil.addEntityManagementRelatedClasses(context);
    entityManager = context.get(EngineEntityManager.class);
    eventSystem = context.get(EventSystem.class);
    context.put(Console.class, new ConsoleImpl(context));
    if (!isHeadless) {
        NUIManager nuiManager = new NUIManagerInternal((TerasologyCanvasRenderer) context.get(CanvasRenderer.class), context);
        context.put(NUIManager.class, nuiManager);
    }
    componentSystemManager = new ComponentSystemManager(context);
    context.put(ComponentSystemManager.class, componentSystemManager);
    componentSystemManager.register(new ConsoleSystem(), "engine:ConsoleSystem");
    componentSystemManager.register(new CoreCommands(), "engine:CoreCommands");
}
Also used : EngineEntityManager(org.terasology.engine.entitySystem.entity.internal.EngineEntityManager) ConsoleSystem(org.terasology.engine.logic.console.ConsoleSystem) ConsoleImpl(org.terasology.engine.logic.console.ConsoleImpl) EventSystem(org.terasology.engine.entitySystem.event.internal.EventSystem) NUIManager(org.terasology.engine.rendering.nui.NUIManager) CoreCommands(org.terasology.engine.logic.console.commands.CoreCommands) NUIManagerInternal(org.terasology.engine.rendering.nui.internal.NUIManagerInternal) ComponentSystemManager(org.terasology.engine.core.ComponentSystemManager)

Aggregations

ComponentSystemManager (org.terasology.engine.core.ComponentSystemManager)1 EngineEntityManager (org.terasology.engine.entitySystem.entity.internal.EngineEntityManager)1 EventSystem (org.terasology.engine.entitySystem.event.internal.EventSystem)1 ConsoleImpl (org.terasology.engine.logic.console.ConsoleImpl)1 ConsoleSystem (org.terasology.engine.logic.console.ConsoleSystem)1 CoreCommands (org.terasology.engine.logic.console.commands.CoreCommands)1 NUIManager (org.terasology.engine.rendering.nui.NUIManager)1 NUIManagerInternal (org.terasology.engine.rendering.nui.internal.NUIManagerInternal)1