예제 #1
0
        public static Nolo_ControllerStates GetControllerStatesByDeviceType(int deviceIndex)
        {
            Update();
            Nolo_ControllerStates result = new Nolo_ControllerStates();

            switch (deviceIndex)
            {
            case 1:
                result.buttons        = noloData.leftData.Buttons;
                result.touches        = noloData.leftData.Touched;
                result.touchpadAxis.x = noloData.leftData.TouchAxis.x;
                result.touchpadAxis.y = noloData.leftData.TouchAxis.y;
                break;

            case 2:
                result.buttons        = noloData.rightData.Buttons;
                result.touches        = noloData.rightData.Touched;
                result.touchpadAxis.x = noloData.rightData.TouchAxis.x;
                result.touchpadAxis.y = noloData.rightData.TouchAxis.y;
                break;

            default:
                break;
            }
            return(result);
        }
예제 #2
0
        public static NoloVR_Plugins.Nolo_ControllerStates GetControllerStatesByDeviceType(int deviceIndex)
        {
            NoloVR_Plugins.Nolo_ControllerStates result = new NoloVR_Plugins.Nolo_ControllerStates();
            Nolo_ControllerStates state = get_Nolo_ControllerStates(deviceIndex);

            result.buttons        = state.buttons;
            result.touches        = state.touches;
            result.touchpadAxis.x = state.touchpadAxis.x;
            result.touchpadAxis.y = state.touchpadAxis.y;
            return(result);
        }