Пример #1
0
        static PropertyPath make_property_path(PropIdentity identity)
        {
            var neighborInfo   = typeof(RUtils <>).MakeGenericType(identity.Type);
            var neighborMethod = neighborInfo.GetMethod("make_property_path", BindingFlags.Static | BindingFlags.NonPublic);

            return((PropertyPath)neighborMethod?.Invoke(null, new object[] { identity.Path }));
        }
Пример #2
0
        /// <summary>
        /// Returns an structure for manipulating property what placed on <paramref name="path"/>, if we start looking from specified <paramref name="contextType"/>.
        /// Is will return null, when path is wrong.
        /// </summary>
        /// <param name="contextType"></param> //todo: documentation
        /// <param name="path"></param>
        /// <returns></returns>
        public static PropertyPath GetPropertyPath(this Type contextType, string path)
        {
            var identity = new PropIdentity(contextType, path);

            if (_propertyPaths.TryGetValue(identity, out var propertyPath))
            {
                return(propertyPath);
            }

            propertyPath = make_property_path(identity);
            if (!_propertyPaths.TryAdd(identity, propertyPath))
            {
                propertyPath = _propertyPaths[identity];
            }

            return(propertyPath);
        }
Пример #3
0
 public bool Equals(PropIdentity other)
 {
     return(other != null && other.Path == Path && other.Type == Type);
 }
Пример #4
0
 public static extern bool PNPropSetParent(int avatarIndex, PropIdentity propId, int parentBoneId);
Пример #5
0
 public static extern bool PNPropHandleNodeAsBVHPart(int avatarIndex, PropIdentity propId, bool enable);
Пример #6
0
 public static extern bool PNPropEnable(int avatarIndex, PropIdentity propId, bool enable);
Пример #7
0
 public static extern bool PNPropSetInfo(int avatarIndex, PropIdentity propId, PropInformation pi);
Пример #8
0
 public static extern bool PNPropGetInfo(int avatarIndex, PropIdentity propId, ref PropInformation piBuff);
Пример #9
0
 public static extern bool PNPropSetDirection(int avatarIndex, PropIdentity propId, Vector3_t rotate);
Пример #10
0
 public static extern bool PNPropSetEndOffset(int avatarIndex, PropIdentity propId, Vector3_t offset);
Пример #11
0
 public static extern bool PNPropSetLength(int avatarIndex, PropIdentity propId, float probLength);
Пример #12
0
 public static extern bool PNPropRemoveSensor(int avatarIndex, PropIdentity propId);
Пример #13
0
 public static extern bool PNPropBindSensor(int avatarIndex, PropIdentity propId, int sensorId);