Ejemplo n.º 1
0
        public void CrossFadeGesture(RuntimeAnimatorController rtc, AvatarMask avatarMask,
                                     float fadeIn, float fadeOut, float speed,
                                     params PlayableGesture.Parameter[] parameters)
        {
            if (this.gestures.Count == 0)
            {
                this.gestures.Add(PlayableGestureRTC.Create(
                                      rtc, avatarMask,
                                      fadeIn, fadeOut, speed,
                                      ref this.graph,
                                      ref this.mixerGesturesInput,
                                      ref this.mixerGesturesOutput,
                                      parameters
                                      ));
            }
            else
            {
                PlayableGesture previous = gestures[this.gestures.Count - 1];
                previous.StretchDuration(fadeIn);

                this.gestures.Add(PlayableGestureRTC.CreateAfter(
                                      rtc, avatarMask,
                                      fadeIn, fadeOut, speed,
                                      ref this.graph,
                                      previous,
                                      parameters
                                      ));
            }
        }
Ejemplo n.º 2
0
        public void CrossFadeGesture(AnimationClip animationClip, AvatarMask avatarMask,
                                     float fadeIn, float fadeOut, float speed)
        {
            if (this.gestures.Count == 0)
            {
                this.gestures.Add(PlayableGestureClip.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(PlayableGestureClip.CreateAfter(
                                      animationClip, avatarMask,
                                      fadeIn, fadeOut, speed,
                                      ref this.graph,
                                      previous
                                      ));
            }
        }