Exemplo n.º 1
0
 ///Should two provided directables be able to cross-blend?
 public static bool CanCrossBlend(this IDirectable directable, IDirectable other)
 {
     if (directable == null || other == null)
     {
         return(false);
     }
     if ((directable.canCrossBlend || other.canCrossBlend) && directable.GetType() == other.GetType())
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 2
0
        ///Can the directable scale (adjust length)?
        public static bool CanScale(this IDirectable directable)
        {
            var lengthProp = directable.GetType().GetProperty("length", BindingFlags.Instance | BindingFlags.Public);

            return(lengthProp != null && lengthProp.CanWrite && lengthProp.DeclaringType != typeof(ActionClip));
        }
Exemplo n.º 3
0
        ///Does the directable has real blend out ability?
        public static bool CanBlendOut(this IDirectable directable)
        {
            var blendOutProp = directable.GetType().GetProperty("blendOut", BindingFlags.Instance | BindingFlags.Public);

            return(blendOutProp != null && blendOutProp.CanWrite && directable.blendOut != -1 && blendOutProp.DeclaringType != typeof(ActionClip));
        }