public IAnimatedBehavior Remapping(Dictionary <QualifiedAnimation, AnimationClip> remapping, Dictionary <BlendTree, BlendTree> blendRemapping) { return(Maybe( SingleAnimatedBehavior.Remap(remapping, Resting), SingleAnimatedBehavior.Remap(remapping, Squeezing), HandSide )); }
public static IAnimatedBehavior Maybe(QualifiedAnimation resting, QualifiedAnimation leftSqueezing, QualifiedAnimation rightSqueezing, QualifiedAnimation bothSqueezing) { if (AreAllIdentical(resting, leftSqueezing, rightSqueezing, bothSqueezing)) { return(SingleAnimatedBehavior.Of(bothSqueezing)); } return(Of(resting, leftSqueezing, rightSqueezing, bothSqueezing)); }
public static IAnimatedBehavior Maybe(QualifiedAnimation resting, QualifiedAnimation squeezing, HandSide handSide) { if (resting == squeezing) { return(SingleAnimatedBehavior.Of(squeezing)); } return(AnalogAnimatedBehavior.Of(resting, squeezing, handSide)); }
public IAnimatedBehavior Remapping(Dictionary <QualifiedAnimation, AnimationClip> remapping, Dictionary <BlendTree, BlendTree> blendRemapping) { var newQualificationsOfTree = QualificationsOfTree .Select(qualification => remapping.ContainsKey(qualification) ? qualification.NewInstanceWithClip(remapping[qualification]) : qualification) .ToList(); return(Of( blendRemapping[Resting], SingleAnimatedBehavior.Remap(remapping, LeftSqueezing), SingleAnimatedBehavior.Remap(remapping, RightSqueezing), SingleAnimatedBehavior.Remap(remapping, BothSqueezing), newQualificationsOfTree )); }
protected bool Equals(SingleAnimatedBehavior other) { return(Posing.Equals(other.Posing)); }