示例#1
0
        private static void SetValue(BezierAnimationCurve curve, int key, float value)
        {
            var keyframe = curve.GetKeyframeByKey(key);

            keyframe.value = value;
            curve.SetKeyframeByKey(key, keyframe);
        }
示例#2
0
        public int SetKeyframeByKey(int key, Vector3 localPosition, Quaternion locationRotation)
        {
            var curveType = x.GetKeyframeByKey(key).curveType;

            x.SetKeyframeByKey(key, localPosition.x, curveType);
            y.SetKeyframeByKey(key, localPosition.y, curveType);
            z.SetKeyframeByKey(key, localPosition.z, curveType);
            rotX.SetKeyframeByKey(key, locationRotation.x, curveType);
            rotY.SetKeyframeByKey(key, locationRotation.y, curveType);
            rotZ.SetKeyframeByKey(key, locationRotation.z, curveType);
            rotW.SetKeyframeByKey(key, locationRotation.w, curveType);
            dirty = true;
            return(key);
        }