///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); }
///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)); }
///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)); }