コード例 #1
0
            protected override object ApplyPlayableValue(object currentValue, Playable playable, float playableWeight)
            {
                ScriptPlayable <AnimatorIntParamPlayableBehaviour> scriptPlayable = (ScriptPlayable <AnimatorIntParamPlayableBehaviour>)playable;
                AnimatorIntParamPlayableBehaviour inputBehaviour = scriptPlayable.GetBehaviour();

                return(Mathf.RoundToInt(Mathf.Lerp((int)currentValue, inputBehaviour._value, playableWeight)));
            }
コード例 #2
0
            public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
            {
                ScriptPlayable <AnimatorIntParamPlayableBehaviour> playable = ScriptPlayable <AnimatorIntParamPlayableBehaviour> .Create(graph, _data);

                AnimatorIntParamPlayableBehaviour clone = playable.GetBehaviour();

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