Ejemplo n.º 1
0
            protected override object ApplyPlayableValue(object currentValue, Playable playable, float playableWeight)
            {
                ScriptPlayable <AnimatorBoolParamPlayableBehaviour> scriptPlayable = (ScriptPlayable <AnimatorBoolParamPlayableBehaviour>)playable;
                AnimatorBoolParamPlayableBehaviour inputBehaviour = scriptPlayable.GetBehaviour();

                return(playableWeight > 0.5f ? inputBehaviour._value : currentValue);
            }
            public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
            {
                ScriptPlayable <AnimatorBoolParamPlayableBehaviour> playable = ScriptPlayable <AnimatorBoolParamPlayableBehaviour> .Create(graph, _data);

                AnimatorBoolParamPlayableBehaviour clone = playable.GetBehaviour();

                clone._clip = this;
                return(playable);
            }