コード例 #1
0
 public bool TryGetFeatureValue(InputFeatureUsage <uint> usage, DateTime time, out uint value)
 {
     if (CheckValidAndSetDefault(out value))
     {
         return(InputDevices.TryGetFeatureValueAtTime_UInt32(m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out value));
     }
     return(false);
 }
コード例 #2
0
        public bool TryGetFeatureValue(InputFeatureUsage <InputTrackingState> usage, DateTime time, out InputTrackingState value)
        {
            uint intValue = 0;

            if (InputDevices.TryGetFeatureValueAtTime_UInt32(m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out intValue))
            {
                value = (InputTrackingState)intValue;
                return(true);
            }
            value = InputTrackingState.None;
            return(false);
        }
コード例 #3
0
        public bool TryGetFeatureValue(InputFeatureUsage <InputTrackingState> usage, DateTime time, out InputTrackingState value)
        {
            bool flag = this.IsValidId();
            bool result;

            if (flag)
            {
                uint num   = 0u;
                bool flag2 = InputDevices.TryGetFeatureValueAtTime_UInt32(this.m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out num);
                if (flag2)
                {
                    value  = (InputTrackingState)num;
                    result = true;
                    return(result);
                }
            }
            value  = InputTrackingState.None;
            result = false;
            return(result);
        }
コード例 #4
0
        public bool TryGetFeatureValue(InputFeatureUsage <uint> usage, DateTime time, out uint value)
        {
            bool flag = this.CheckValidAndSetDefault <uint>(out value);

            return(flag && InputDevices.TryGetFeatureValueAtTime_UInt32(this.m_DeviceId, usage.name, TimeConverter.LocalDateTimeToUnixTimeMilliseconds(time), out value));
        }