Search in sources :

Example 1 with TimeSystem

use of org.terasology.engine.core.subsystem.headless.device.TimeSystem in project Terasology by MovingBlocks.

the class InputSystemTests method setUp.

@BeforeEach
public void setUp() {
    Context context = new ContextImpl();
    setUpLocalPlayer(context);
    setUpDisplayDevice(context);
    setUpBindsManager(context);
    setUpTargetSystem(context);
    context.put(Time.class, new TimeSystem());
    inputSystem = new InputSystem();
    InjectionHelper.inject(inputSystem, context);
    testKeyboard = new TestKeyboard();
    inputSystem.setKeyboardDevice(testKeyboard);
    clientEntityKeyEvents = new ArrayList<>();
    characterEntityKeyEvents = new ArrayList<>();
}
Also used : Context(org.terasology.engine.context.Context) InputSystem(org.terasology.engine.input.InputSystem) ContextImpl(org.terasology.engine.context.internal.ContextImpl) TimeSystem(org.terasology.engine.core.subsystem.headless.device.TimeSystem) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with TimeSystem

use of org.terasology.engine.core.subsystem.headless.device.TimeSystem in project Terasology by MovingBlocks.

the class HeadlessTimer method initTimer.

private void initTimer(Context context) {
    time = new TimeSystem();
    context.put(Time.class, time);
}
Also used : TimeSystem(org.terasology.engine.core.subsystem.headless.device.TimeSystem)

Aggregations

TimeSystem (org.terasology.engine.core.subsystem.headless.device.TimeSystem)2 BeforeEach (org.junit.jupiter.api.BeforeEach)1 Context (org.terasology.engine.context.Context)1 ContextImpl (org.terasology.engine.context.internal.ContextImpl)1 InputSystem (org.terasology.engine.input.InputSystem)1