Пример #1
0
        public void SetWeight(float value)
        {
            if (fader == null)
            {
                fader           = new TweenableFloat(lerper);
                fader.onChange += (v) => { this.weight = v; };
            }

            fader.Value = value;
        }
Пример #2
0
        public Finger(PlayableGraph graph, AnimationClip closed, AnimationClip opened, AvatarMask mask, VariableTweener lerper)
        {
            mixer = AnimationLayerMixerPlayable.Create(graph, 2);
            var openPlayable = AnimationClipPlayable.Create(graph, opened);

            graph.Connect(openPlayable, 0, mixer, 0);
            var closedPlayable = AnimationClipPlayable.Create(graph, closed);

            graph.Connect(closedPlayable, 0, mixer, 1);
            mixer.SetLayerAdditive(0, false);
            mixer.SetLayerMaskFromAvatarMask(0, mask);
            mixer.SetInputWeight(0, 1);
            mixer.SetInputWeight(1, 0);
            crossFadingWeight           = new TweenableFloat(lerper);
            crossFadingWeight.onChange += (value) =>
            {
                mixer.SetInputWeight(0, 1 - value);
                mixer.SetInputWeight(1, value);
            };
        }
Пример #3
0
 public void AddCrossFadingFloat(TweenableFloat value)
 {
     values.Add(value);
 }