Exemplo n.º 1
0
        public void CrossFadeGesture(AnimationClip animationClip, AvatarMask avatarMask,
                                     float fadeIn, float fadeOut, float speed)
        {
            if (this.gestures.Count == 0)
            {
                this.gestures.Add(PlayableGesture.Create(
                                      animationClip, avatarMask,
                                      fadeIn, fadeOut, speed,
                                      ref this.graph,
                                      ref this.mixerGesturesInput,
                                      ref this.mixerGesturesOutput
                                      ));
            }
            else
            {
                PlayableGesture previous = gestures[this.gestures.Count - 1];
                previous.StretchDuration(fadeIn);

                this.gestures.Add(PlayableGesture.CreateAfter(
                                      animationClip, avatarMask,
                                      fadeIn, fadeOut, speed,
                                      ref this.graph,
                                      previous
                                      ));
            }
        }
Exemplo n.º 2
0
        // GESTURE METHODS: -----------------------------------------------------------------------

        public void PlayGesture(AnimationClip animationClip, AvatarMask avatarMask,
                                float fadeIn, float fadeOut, float speed)
        {
            this.StopGesture(fadeIn);
            this.gestures.Add(PlayableGesture.Create(
                                  animationClip, avatarMask,
                                  fadeIn, fadeOut, speed,
                                  ref this.graph,
                                  ref this.mixerGesturesInput,
                                  ref this.mixerGesturesOutput
                                  ));
        }