Пример #1
0
        protected void ReapplyCurveTypes(AnimationCurve curve, bool loop)
        {
            for (var key = 0; key < curve.length; key++)
            {
                KeyframeSettings setting;
                if (!settings.TryGetValue(curve[key].time.ToMilliseconds(), out setting))
                {
                    continue;
                }
                curve.ApplyCurveType(key, setting.curveType, loop);
            }

            if (loop && settings[0].curveType == CurveTypeValues.Smooth)
            {
                curve.SmoothLoop();
            }
        }