Package org.terasology.input

Examples of org.terasology.input.InputSystem


        newState.init(this);
        for (StateChangeSubscriber subscriber : stateChangeSubscribers) {
            subscriber.onStateChange();
        }
        // drain input queues
        InputSystem inputSystem = CoreRegistry.get(InputSystem.class);
        inputSystem.getMouseDevice().getInputQueue();
        inputSystem.getKeyboard().getInputQueue();
    }
View Full Code Here


    private void initControls() {
        try {
            Keyboard.create();
            Keyboard.enableRepeatEvents(true);
            Mouse.create();
            InputSystem inputSystem = CoreRegistry.putPermanently(InputSystem.class, new InputSystem());
            inputSystem.setMouseDevice(new LwjglMouseDevice());
            inputSystem.setKeyboardDevice(new LwjglKeyboardDevice());
        } catch (LWJGLException e) {
            throw new RuntimeException("Could not initialize controls.", e);
        }
    }
View Full Code Here

    @Override
    public void dispose() {
    }

    private void initControls() {
        InputSystem inputSystem = new InputSystem();
        CoreRegistry.putPermanently(InputSystem.class, inputSystem);
    }
View Full Code Here

        CameraTargetSystem cameraTargetSystem = new CameraTargetSystem();
        CoreRegistry.put(CameraTargetSystem.class, cameraTargetSystem);
        componentSystemManager.register(cameraTargetSystem, "engine:CameraTargetSystem");

        BindsConfig bindsConfig = CoreRegistry.get(Config.class).getInput().getBinds();
        InputSystem inputSystem = CoreRegistry.get(InputSystem.class);
        componentSystemManager.register(inputSystem, "engine:InputSystem");

        bindsConfig.applyBinds(inputSystem, moduleManager);

        return true;
View Full Code Here

TOP

Related Classes of org.terasology.input.InputSystem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.