コード例 #1
0
 public IAnimatedBehavior Remapping(Dictionary <QualifiedAnimation, AnimationClip> remapping, Dictionary <BlendTree, BlendTree> blendRemapping)
 {
     return(Maybe(
                SingleAnimatedBehavior.Remap(remapping, Resting),
                SingleAnimatedBehavior.Remap(remapping, Squeezing),
                HandSide
                ));
 }
コード例 #2
0
        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));
        }
コード例 #3
0
        public static IAnimatedBehavior Maybe(QualifiedAnimation resting, QualifiedAnimation squeezing, HandSide handSide)
        {
            if (resting == squeezing)
            {
                return(SingleAnimatedBehavior.Of(squeezing));
            }

            return(AnalogAnimatedBehavior.Of(resting, squeezing, handSide));
        }
コード例 #4
0
        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
                       ));
        }
コード例 #5
0
 protected bool Equals(SingleAnimatedBehavior other)
 {
     return(Posing.Equals(other.Posing));
 }