コード例 #1
0
        public NativeInputDeviceManager()
        {
            attachedDevices = new List <NativeInputDevice>();
            detachedDevices = new List <NativeInputDevice>();

            systemDeviceProfiles = new List <NativeInputDeviceProfile>(NativeInputDeviceProfileList.Profiles.Length);
            customDeviceProfiles = new List <NativeInputDeviceProfile>();

            AddSystemDeviceProfiles();

            var options = new NativeInputOptions();

            options.enableXInput = InputManager.NativeInputEnableXInput;
            options.preventSleep = InputManager.NativeInputPreventSleep;

            if (InputManager.NativeInputUpdateRate > 0)
            {
                options.updateRate = (UInt16)InputManager.NativeInputUpdateRate;
            }
            else
            {
                options.updateRate = (UInt16)Mathf.FloorToInt(1.0f / Time.fixedDeltaTime);
            }

            Native.Init(options);
        }
コード例 #2
0
        public NativeInputDeviceManager()
        {
            attachedDevices      = new List <NativeInputDevice>();
            detachedDevices      = new List <NativeInputDevice>();
            systemDeviceProfiles = new List <NativeInputDeviceProfile>(NativeInputDeviceProfileList.Profiles.Length);
            customDeviceProfiles = new List <NativeInputDeviceProfile>();
            deviceEvents         = new uint[32];
            AddSystemDeviceProfiles();
            NativeInputOptions options = new NativeInputOptions
            {
                enableXInput = InputManager.NativeInputEnableXInput,
                preventSleep = InputManager.NativeInputPreventSleep
            };

            if (InputManager.NativeInputUpdateRate != 0)
            {
                options.updateRate = (ushort)InputManager.NativeInputUpdateRate;
            }
            else
            {
                options.updateRate = (ushort)Mathf.FloorToInt(1f / Time.fixedDeltaTime);
            }
            Native.Init(options);
        }
コード例 #3
0
ファイル: Native.cs プロジェクト: JeffAntonelli/MetalStormNul
 public static void Init(NativeInputOptions options)
 {
 }
コード例 #4
0
ファイル: Native.cs プロジェクト: JeffAntonelli/MetalStormNul
 public static extern void Init(NativeInputOptions options);
コード例 #5
0
ファイル: Native.cs プロジェクト: gamesketches/Apotheosis
 public static void Init(NativeInputOptions options)
 {
     SetDebugPrintFunc(OnDebugPrint);
     Init(OnDeviceAttached, OnDeviceDetached, options);
 }
コード例 #6
0
ファイル: Native.cs プロジェクト: gamesketches/Apotheosis
 static extern void Init(DeviceAttachedCallback deviceAttached, DeviceDetachedCallback deviceDetached, NativeInputOptions options);