예제 #1
0
        public static void GetInfoSingularPostfix(AnimationKeyInfo __instance, bool __result, float __state, string name, ref float rate, ref Vector3 value, byte type)
        {
            if (!__result)
            {
                return;
            }

            rate = __state;

            if (rate < 0f || rate > 1f)
            {
                var dictInfo = (Dictionary <string, List <AnimationKeyInfo.AnmKeyInfo> >)akf_dictInfo.GetValue(__instance);

                var list = dictInfo[name];

                switch (type)
                {
                case 0:
                    value = SliderMath.CalculatePosition(list, rate);
                    break;

                case 1:
                    value = SliderMath.SafeCalculateRotation(value, name, list, rate);
                    break;

                default:
                    value = SliderMath.CalculateScale(list, rate);
                    break;
                }
            }
        }
예제 #2
0
        public static void GetInfoPostfix(AnimationKeyInfo __instance, bool __result, float __state, string name, ref float rate, ref Vector3[] value, bool[] flag)
        {
            if (!__result)
            {
                return;
            }

            rate = __state;

            if (rate < 0f || rate > 1f)
            {
                var dictInfo = (Dictionary <string, List <AnimationKeyInfo.AnmKeyInfo> >)akf_dictInfo.GetValue(__instance);

                var list = dictInfo[name];

                if (flag[0])
                {
                    value[0] = SliderMath.CalculatePosition(list, rate);
                }

                if (flag[1])
                {
                    value[1] = SliderMath.SafeCalculateRotation(value[1], name, list, rate);
                }

                if (flag[2])
                {
                    value[2] = SliderMath.CalculateScale(list, rate);
                }
            }
        }